/**
 * Notice Frontend Styles
 * @version 1.1.0
 */

/* ========== TICKER ========== */
.hp-notice-ticker-wrap {
    display: flex;
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
    height: 40px;
    align-items: center;
    /*margin: 15px 0;*/
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.hp-ticker-label {
    background:#003d82;
    color: #fff;
    padding: 0 1rem;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.hp-ticker-icon {
    font-size: 1.5rem;
    color:white;
}

.hp-ticker-content-box {
    flex: 1;
    overflow: hidden;
    height: 100%;
    min-width: 0;
}

.hp-ticker-items {
    display: flex;
    white-space: nowrap;
    height: 100%;
    animation: hp-ticker-scroll 15s linear infinite;
    align-items: center;
}

.hp-ticker-items:hover {
    animation-play-state: paused;
}

.hp-ticker-item {
    padding: 0 1rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    flex-shrink: 0;
    height: 100%;
    border-right: 1px solid #eee;
}

.hp-ticker-link {
    color: #1f2937;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 600;
    transition: color 0.2s;
}

.hp-ticker-link:hover {
    color: #003d82;
}

.hp-ticker-date {
    color: #6b7280;
    font-size: 0.7rem;
    font-weight: 500;
}

.hp-new-badge {
    background: #dc2626;
    color: #fff;
    font-size: 0.5rem;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 2px;
    letter-spacing: 0.3px;
     animation: blink 1s infinite;
}



@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}







.hp-ticker-view-all {
    padding: 0 1rem;
    color: #003d82;
    font-weight: 700;
    font-size: 0.75rem;
    text-decoration: none;
    border-left: 1px solid #ddd;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.2s;
    flex-shrink: 0;
    height: 100%;
}

.hp-ticker-view-all:hover {
    background: #f9fafb;
}

.hp-arrow {
    font-size: 1.1rem;
    transition: transform 0.2s;
}

.hp-ticker-view-all:hover .hp-arrow {
    transform: translateX(2px);
}

@keyframes hp-ticker-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ========== ARCHIVE ========== */
.hp-notices-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
}

.hp-archive-header {
    margin-bottom: 1rem;
}

.hp-archive-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.25rem 0;
}

.hp-archive-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* ========== CONTROLS ========== */
.hp-archive-controls-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.hp-archive-controls {
    display: flex;
    gap: 0.75rem;
    align-items: stretch;
    flex-wrap: wrap;
}

/* Search */
.hp-search-box {
    flex: 1;
    min-width: 220px;
    display: flex;
}

.hp-search-box input {
    flex: 1;
    height: 36px;
    padding: 0 0.75rem;
    border: 1px solid #d1d5db;
    border-right: none;
    border-radius: 4px 0 0 4px;
    font-size: 0.85rem;
    transition: border-color 0.2s;
}

.hp-search-box input:focus {
    outline: none;
    border-color: #003d82;
    box-shadow: 0 0 0 1px #003d82;
}

.hp-search-btn {
    height: 36px;
    padding: 0 1rem;
    background: #003d82;
    color: #fff;
    border: 1px solid #003d82;
    border-radius: 0 4px 4px 0;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

.hp-search-btn:hover {
    background: #002a5c;
}

/* Filter controls row */
.hp-filter-controls {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Shared label + select block */
.hp-year-filter,
.hp-category-filter {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.hp-year-filter label,
.hp-category-filter label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #4b5563;
    white-space: nowrap;
}

.hp-year-filter select,
.hp-category-filter select {
    height: 36px;
    padding: 0 2rem 0 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.85rem;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.6rem center;
}

.hp-year-filter select {
    min-width: 110px;
}

.hp-category-filter select {
    min-width: 150px;
}

.hp-year-filter select:focus,
.hp-category-filter select:focus {
    outline: none;
    border-color: #003d82;
    box-shadow: 0 0 0 1px #003d82;
}

/* Clear button */
.hp-clear-filters {
    height: 36px;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0 0.875rem;
    background: #fff;
    border: 1px solid #dc3545;
    color: #dc3545;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.hp-clear-filters:hover {
    background: #dc3545;
    color: #fff;
}

/* ========== TABLE ========== */
.hp-notices-table-wrapper {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(0,0,0,0.03);
    margin-bottom: 1rem;
}

.hp-notices-table {
    width: 100%;
    border-collapse: collapse;
}

.hp-notices-table thead {
    background: #1e3a5f;
}

.hp-notices-table thead th {
    color: #fff;
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.7rem 0.75rem;
    text-align: left;
}

.hp-notices-table tbody tr {
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.1s;
}

.hp-notices-table tbody tr:hover {
    background: #f9fafb;
}

.hp-notices-table tbody td {
    padding: 0.8rem 0.75rem;
    vertical-align: middle;
}

/* Column widths */
.hp-col-sno      { width: 50px; }
.hp-col-date     { width: 100px; }
.hp-col-category { width: 130px; }
.hp-col-action   { width: 120px; }

.hp-td-sno,
.hp-td-date,
.hp-td-action,
.hp-td-category  { text-align: center; }

.hp-notice-sno {
    font-weight: 600;
    color: #6b7280;
    font-size: 0.8rem;
}

.hp-notice-date-cell {
    color: #4b5563;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.hp-notice-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.hp-notice-table-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    margin: 0;
}

.hp-notice-table-description {
    font-size: 0.8rem;
    color: #4b5563;
    line-height: 1.4;
    margin: 0;
}

.hp-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    padding: 0.45rem 1rem;
    background: #003d82;
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
    cursor: pointer;
}

.hp-download-btn:hover {
    background: #002a5c;
    color: #fff;
}

.hp-no-document {
    color: #9ca3af;
    font-size: 0.8rem;
}

/* Row highlight */
.hp-highlighted-notice {
    background: #fffbeb !important;
    border-left: 3px solid #f59e0b;
}

.hp-flash-highlight {
    animation: flashHighlight 1.5s ease;
}

@keyframes flashHighlight {
    0%, 100% { background: #fffbeb; }
    50%       { background: #fef3c7; }
}

/* Empty state */
.hp-no-results {
    text-align: center;
    padding: 2rem 1.5rem !important;
}

.hp-no-results-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #4b5563;
    margin: 0 0 0.3rem 0;
}

.hp-no-results-content p {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0;
}

/* ========== PAGINATION ========== */
.hp-notices-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0;
    flex-wrap: wrap;
}

.hp-page-btn {
    background: #fff;
    color: #003d82;
    border: 2px solid #003d82;
    padding: 0.4rem 0.9rem;
    border-radius: 3px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    transition: all 0.2s;
}

.hp-page-btn:hover {
    background: #003d82;
    color: #fff;
}

.hp-page-numbers {
    display: flex;
    gap: 0.3rem;
}

.hp-page-number {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    font-weight: 600;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.15s;
    border: 1px solid #e5e7eb;
}

.hp-page-number:not(.active) {
    color: #6b7280;
    background: #f9fafb;
}

.hp-page-number:not(.active):hover {
    background: #e5e7eb;
    color: #003d82;
}

.hp-page-number.active {
    background: #003d82;
    color: #fff;
    border-color: #003d82;
}

.hp-page-dots {
    display: flex;
    align-items: center;
    padding: 0 0.3rem;
    color: #d1d5db;
}

/* ========== CATEGORY BADGES ========== */
.hp-notice-category-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.72rem;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.hp-cat-tender        { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }
.hp-cat-circular      { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.hp-cat-office-order  { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.hp-cat-public        { background: #ffedd5; color: #9a3412; border: 1px solid #fed7aa; }
.hp-cat-recruitment   { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.hp-cat-promotion     { background: #e0e7ff; color: #3730a3; border: 1px solid #c7d2fe; }
.hp-cat-transfer      { background: #fae8ff; color: #86198f; border: 1px solid #f5d0fe; }
.hp-cat-regularisation{ background: #ccfbf1; color: #115e59; border: 1px solid #99f6e4; }
.hp-cat-retirement    { background: #fce7f3; color: #9d174d; border: 1px solid #fbcfe8; }
.hp-cat-other         { background: #f3f4f6; color: #374151; border: 1px solid #e5e7eb; }

/* ========== RESPONSIVE ========== */
@media (max-width: 900px) {
    .hp-filter-controls {
        flex-wrap: wrap;
    }

    .hp-category-filter select {
        min-width: 130px;
    }
}

@media (max-width: 768px) {


.hp-ticker-icon-txt{
    display:none;
}

    .hp-notices-archive {
        padding: 1rem 0.5rem;
    }

    .hp-archive-title {
        font-size: 1.3rem;
    }

    .hp-archive-controls {
        flex-direction: column;
    }

    .hp-search-box {
        min-width: 100%;
    }

    .hp-filter-controls {
        width: 100%;
    }

    .hp-year-filter,
    .hp-category-filter {
        flex: 1;
    }

    .hp-year-filter select,
    .hp-category-filter select {
        width: 100%;
        min-width: unset;
    }

    .hp-notices-table-wrapper {
        overflow: visible;
        border: none;
        background: transparent;
    }

    .hp-notices-table thead {
        display: none;
    }

    .hp-notices-table tbody {
        display: block;
    }

    .hp-notices-table tbody tr {
        display: block;
        margin-bottom: 0.75rem;
        border: 1px solid #e5e7eb;
        border-radius: 4px;
        padding: 0.75rem;
        background: #fff;
    }

    .hp-notices-table tbody td {
        display: block;
        padding: 0.3rem 0;
        border: none;
        text-align: left !important;
    }

    .hp-notice-sno,
    .hp-notice-date-cell {
        display: inline-block;
        background: #f3f4f6;
        padding: 0.2rem 0.5rem;
        border-radius: 3px;
        font-size: 0.7rem;
    }

    .hp-notice-date-cell {
        margin-left: 0.4rem;
    }

    .hp-td-info {
        margin: 0.5rem 0;
    }

    .hp-td-action {
        margin-top: 0.75rem;
    }

    .hp-download-btn {
        width: 100%;
    }

    .hp-ticker-view-all span:first-child {
        display: none;
    }
}

@media print {
    .hp-ticker-view-all,
    .hp-notices-pagination,
    .hp-new-badge,
    .hp-archive-controls-wrapper,
    .hp-download-btn {
        display: none;
    }
}