/* ══════════════════════════════════════════════
   MSB Search Results — Component Styles
   Refined Layout: Boxed sections, Custom Tab style
   ══════════════════════════════════════════════ */

/* ─── Variables & Root ─── */
.msb-search {
    --s-orange: #F4600C;
    --s-orange-light: #FEEFE7;
    --s-orange-border: #F8A06D;
    --s-navy: #091E42;
    --s-text-primary: #111111;
    --s-text-secondary: #091E42;
    --s-text-muted: #666666;
    --s-border: #DEE5EF;
    --s-bg: #FFFFFF;
    --s-input-bg: #F7F8F9;
    --s-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    --s-radius: 12px;
    --s-transition: 0.2s ease;

    max-width: 1366px;
    margin: 0 auto;
    padding: 12px 24px;
    color: var(--s-text-primary);
    font-family: 'Inter', -apple-system, sans-serif;
}

.msb-search * {
    box-sizing: border-box;
}

/* ════════════════════════════════════════════
   1. BOXED CONTAINERS
   ════════════════════════════════════════════ */
.msb-search__header-box {
    background: var(--s-bg);
    border-radius: var(--s-radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--s-shadow);
}

.msb-search__item-box {
    background: var(--s-bg);
    border: 1px solid transparent;
    border-radius: var(--s-radius);
    padding: 12px;
    margin-bottom: 12px;
    box-shadow: var(--s-shadow);
    transition: transform var(--s-transition), box-shadow var(--s-transition), border-color var(--s-transition);
}

.msb-search__item-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    border-color: var(--s-orange);
}

/* ════════════════════════════════════════════
   2. SEARCH BAR
   ════════════════════════════════════════════ */
.msb-search__bar {
    margin-bottom: 24px;
}

.msb-search__form {
    display: flex;
    align-items: center;
    gap: 12px;
}

.msb-search__input-wrap {
    flex: 1;
    height: 44px !important;
    position: relative;
    display: flex;
    align-items: center;
}

.msb-search__icon {
    position: absolute;
    left: 0px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--s-navy);
    z-index: 1;
    display: flex;
    align-items: center;
}

.msb-search__icon img {
    width: 44px;
    height: 44px;
    display: block;
}

.msb-search__input {
    width: 100%;
    height: 44px !important;
    padding: 0 16px 0 44px !important;
    border: 1px solid #E2E8F0;
    margin: 0px;
    border-radius: 8px !important;
    font-size: 15px;
    font-weight: 500;
    color: var(--s-navy);
    background: var(--s-input-bg);
    outline: none;
    transition: all var(--s-transition);
    box-sizing: border-box;
}

.msb-search__input::placeholder {
    color: #A6AEBB;
    opacity: 1;
    /* Match design darkness */
    font-weight: 500;
}

.msb-search__input:focus {
    border-color: var(--s-orange);
    background: #FFF;
}

.msb-search__submit {
    height: 44px;
    padding: 0 32px;
    margin: 0px;
    background: #FFF;
    border: 1px solid var(--s-orange);
    border-radius: 8px !important;
    /* Match input border radius */
    color: var(--s-orange);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--s-transition);
    white-space: nowrap;
    text-transform: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}


/* ════════════════════════════════════════════
   3. FILTERS (Custom Tab Style)
   ════════════════════════════════════════════ */
.msb-search__filters-desktop {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.msb-search__filter-label {
    font-size: 12px;
    color: var(--s-text-muted);
    margin-bottom: 10px;
    display: block;
}

.msb-search__pills,
.msb-search__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.msb-search__pill,
.msb-search__tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--s-border);
    border-radius: 32px;
    font-size: 16px;
    font-weight: 500;
    color: var(--s-text-secondary);
    text-decoration: none;
    background: #FFF;
    transition: all var(--s-transition);
    cursor: pointer;
}

.msb-search__pill:hover,
.msb-search__tab:hover {
    color: var(--s-orange);
}

.msb-search__pill--active,
.msb-search__tab--active {
    color: var(--s-orange);
    background-color: var(--s-orange-light);
    border-color: var(--s-orange-border);
    font-weight: 500;
}

.msb-search__tab-count {
    margin-left: 4px;
    font-weight: 500;
}

/* ════════════════════════════════════════════
   4. REDUNDANT UI CLEANUP
   ════════════════════════════════════════════ */
.msb-search__mobile-filters {
    display: none;
    /* Hidden on desktop */
}

/* ════════════════════════════════════════════
   5. RESULTS LIST
   ════════════════════════════════════════════ */

.msb-search__item {
    text-decoration: none;
    color: inherit;
    display: block;
}

.msb-search__item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.msb-search__item-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--s-navy);
    margin: 0;
}

.msb-search__item-date {
    font-size: 13px;
    color: var(--s-text-muted);
}

.msb-search__item-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--s-text-muted);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ─── Keyword Highlight ─── */
.msb-search__highlight {
    color: var(--s-orange);
    background: transparent;
    font-weight: inherit;
    font-style: normal;
}

/* ════════════════════════════════════════════
   6. EMPTY STATE (No Results)
   ════════════════════════════════════════════ */
.msb-search__empty {
    min-height: 453px;
    display: flex;
    align-items: center;
    justify-content: center;
    /* background: #FFF; */
    border-radius: 12px;
    margin-top: 24px;
    text-align: center;
}

.msb-search__empty-inner {
    max-width: 480px;
    padding: 40px 20px;
}

.msb-search__empty-icon {
    margin-bottom: 4px;
}

.msb-search__empty-icon img {
    width: 100px;
    height: 100px;
    margin: 0 auto;
}

.msb-search__empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--s-navy);
    margin: 0 0 12px;
}

.msb-search__empty-subtext {
    font-size: 14px;
    color: var(--s-text-muted);
    line-height: 20px;
}

/* ════════════════════════════════════════════
   7. PAGINATION
   ════════════════════════════════════════════ */
.msb-search__pagination {
    margin-top: 32px;
    display: flex;
    justify-content: flex-end;
    /* Right aligned as requested */
}

.msb-search__pages {
    display: flex;
    align-items: center;
    gap: 8px;
}

.msb-search__pages a,
.msb-search__pages span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 8px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 500;
    color: #091E42;
    text-decoration: none;
    transition: all var(--s-transition);
}

.msb-search__pages a:hover {
    color: var(--s-orange);
}

.msb-search__pages .current {
    border-color: #F8A06D;
    /* Using a lighter orange for border to match design */
    color: var(--s-orange);
    background-color: transparent;
}

.msb-search__pages .disabled {
    color: #6B788E;
    pointer-events: none;
}

.msb-search__pages .dots {
    border: none;
    background: transparent;
    color: #6B788E;
}

/* ════════════════════════════════════════════
   7. RESPONSIVE
   ════════════════════════════════════════════ */
@media (max-width: 768px) {
    .msb-search {
        padding: 12px 16px;
    }

    .msb-search__header-box {
        padding: 12px;
        margin-bottom: 12px;
    }

    .msb-search__form {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }

    .msb-search__input-wrap {
        order: 1;
        margin-bottom: 12px;
    }

    .msb-search__mobile-filters {
        order: 2;
        display: block !important;
        margin-top: 0;
    }

    .msb-search__submit {
        order: 3;
        width: 100%;
        margin-top: 8px;
    }

    /* Filters on Mobile */
    .msb-search__filters-desktop {
        display: none;
    }


    .msb-search__mobile-filter {
        margin-bottom: 12px;
    }

    .msb-search__select {
        width: 100%;
        height: 44px;
        border: 1px solid var(--s-border);
        border-radius: 8px;
        padding: 0 16px;
        background: #FFF;
        font-size: 14px;
        color: var(--s-text-primary);
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23666' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 16px center;
    }

    .msb-search__item-box {
        padding: 12px;
    }

    .msb-search__item-title {
        font-size: 16px;
    }

    .msb-search__pagination {
        justify-content: center;
    }
}