/* ==========================================================================
   Shared Layout Styles  (header tweaks, breadcrumb, footer, body base)
   Reused across index.html and search.html
   ========================================================================== */

/* ---------- General Page Layout ---------- */

body {
    font-family: "Poppins", sans-serif;
    background-color: #f5f5f5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-content {
    flex: 1;
}

/* ---------- Header tweaks ---------- */

header .login {
    display: none;
}

    header .login.display-login {
        display: block;
    }

/* ---------- Breadcrumb ---------- */

.breadcrumb-bar {
    background: var(--White, #FFF);
    border-bottom: 1px solid #D2D2D2;
    padding: 12px 0;
}

    .breadcrumb-bar .breadcrumb {
        font-size: 14px;
        padding: 0;
        margin: 0;
        background: transparent;
    }

    .breadcrumb-bar .breadcrumb-item a {
        color: #2b5ea7;
        text-decoration: none;
        font-weight: 500;
    }

        .breadcrumb-bar .breadcrumb-item a:hover {
            text-decoration: underline;
        }

    .breadcrumb-bar .breadcrumb-item.active {
        color: #333;
    }

    .breadcrumb-bar .breadcrumb-item + .breadcrumb-item::before {
        content: "/";
        color: #666;
    }

/* Gradient line removed per design update (replaced by solid border-bottom on .breadcrumb-bar) */

/* ---------- Buttons (shared) ---------- */

.btn-search {
    background-color: #0c39a1;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    min-height: 52px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

    .btn-search:hover {
        background-color: #0d1554;
        color: #fff;
    }

    .btn-search:focus-visible {
        outline: 2px solid #2b5ea7;
        outline-offset: 2px;
    }

/* ---------- Plan Dropdown (custom, shared) ---------- */

.plan-dropdown {
    position: relative;
}

.plan-dropdown__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #fff;
    -webkit-user-select: none;
    user-select: none;
}

    .plan-dropdown__trigger[aria-expanded="true"] {
        border-color: #2b5ea7;
        box-shadow: 0 0 0 2px rgba(43, 94, 167, 0.15);
    }

.plan-dropdown__value {
    color: #999;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .plan-dropdown__value.has-value {
        color: #333;
    }

.plan-dropdown__arrow {
    font-size: 0.75rem;
    color: #666;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.plan-dropdown__trigger[aria-expanded="true"] .plan-dropdown__arrow {
    transform: rotate(180deg);
}

.plan-dropdown__menu {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    z-index: 1000;
    max-height: 280px;
    overflow-y: auto;
    padding: 8px 0;
}

    .plan-dropdown__menu.open {
        display: block;
    }

.plan-dropdown__signin {
    display: block;
    padding: 10px 16px;
    color: #2b5ea7;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
}

    .plan-dropdown__signin:hover {
        color: #1a237e;
        text-decoration: underline;
    }

.plan-dropdown__item {
    padding: 10px 16px;
    font-size: 0.9rem;
    color: #333;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .plan-dropdown__item:hover {
        background-color: #f0f4ff;
    }

    .plan-dropdown__item.selected {
        background-color: #e8eaf6;
        font-weight: 600;
    }

/* ---------- Provider Finder Combobox (plan selector) ---------- */

.pf-combobox {
    position: relative;
    min-width: 260px;
}

.pf-combobox__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #fff;
    min-height: 52px;
    padding: 8px 16px;
    border: 1px solid #b5b5b5;
    border-radius: 8px;
    font-size: 15px;
    -webkit-user-select: none;
    user-select: none;
}

    .pf-combobox__trigger:hover {
        border-color: #888;
    }

    .pf-combobox__trigger[aria-expanded="true"] {
        border-color: #2b5ea7;
        box-shadow: 0 0 0 2px rgba(43, 94, 167, 0.15);
    }

.pf-combobox__display {
    color: #999;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

    .pf-combobox__display.has-value {
        color: #181818;
    }

.pf-combobox__arrow {
    font-size: 0.75rem;
    color: #666;
    margin-left: 8px;
    transition: transform 0.2s ease;
}

.pf-combobox__trigger[aria-expanded="true"] .pf-combobox__arrow {
    transform: rotate(180deg);
}

.pf-combobox__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #b5b5b5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    z-index: 1000;
    max-height: 320px;
    overflow-y: auto;
    padding: 8px 0;
}

    .pf-combobox__dropdown.open {
        display: block;
    }

.pf-mobile-backdrop {
    display: none;
}

@media (max-width: 767.98px) {
    body.pf-mobile-overlay-open {
        overflow: hidden;
    }

    .pf-combobox__search,
    .pf-autocomplete__input,
    .search-form .main-search-field--mobile-active .pf-combobox__search,
    .search-form .main-search-field--mobile-active .pf-autocomplete__input,
    .search-form .main-search-field--mobile-closing .pf-combobox__search,
    .search-form .main-search-field--mobile-closing .pf-autocomplete__input {
        font-size: 16px !important;
    }

    .search-form--mobile-field-active {
        position: relative;
        z-index: 1190;
    }

    .search-form .pf-mobile-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(16, 24, 40, 0.42);
        backdrop-filter: blur(3px);
        z-index: 1195;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity 180ms ease, visibility 180ms ease;
    }

    .search-form--mobile-field-active .pf-mobile-backdrop--visible {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    .search-form .main-search-field--mobile-active,
    .search-form .main-search-field--mobile-closing {
        position: fixed;
        top: 12px;
        top: calc(env(safe-area-inset-top, 0px) + 12px);
        left: 12px;
        right: 12px;
        width: auto !important;
        max-width: calc(100vw - 24px);
        box-sizing: border-box;
        z-index: 1200;
        margin: 0;
        padding: 14px 14px 12px;
        background: #ffffff;
        border-radius: 18px;
        box-shadow: 0 20px 48px rgba(15, 23, 42, 0.22);
    }

    .search-form .main-search-field--mobile-active {
        animation: pf-mobile-field-enter 180ms cubic-bezier(0.22, 1, 0.36, 1);
    }

    .search-form .main-search-field--mobile-closing {
        animation: pf-mobile-field-exit 180ms ease forwards;
    }

    .search-form .main-search-field--mobile-active .form-label {
        margin-bottom: 8px;
    }

    .search-form .main-search-field--mobile-closing .form-label {
        margin-bottom: 8px;
    }

    .search-form .main-search-field--mobile-active .pf-combobox,
    .search-form .main-search-field--mobile-active .pf-autocomplete,
    .search-form .main-search-field--mobile-closing .pf-combobox,
    .search-form .main-search-field--mobile-closing .pf-autocomplete {
        width: 100%;
        min-width: 0;
    }

    .search-form .main-search-field--mobile-active .pf-combobox__dropdown,
    .search-form .main-search-field--mobile-active .pf-autocomplete__dropdown,
    .search-form .main-search-field--mobile-closing .pf-combobox__dropdown,
    .search-form .main-search-field--mobile-closing .pf-autocomplete__dropdown {
        max-height: min(46vh, 360px);
        overscroll-behavior: contain;
    }

    @keyframes pf-mobile-field-enter {
        from {
            opacity: 0;
            transform: translateY(18px) scale(0.985);
        }
        to {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
    }

    @keyframes pf-mobile-field-exit {
        from {
            opacity: 1;
            transform: translateY(0) scale(1);
        }
        to {
            opacity: 0;
            transform: translateY(12px) scale(0.985);
        }
    }
}

.pf-combobox__search-wrap {
    padding: 4px 8px 8px;
    border-bottom: 1px solid #eee;
}

.pf-combobox__search {
    width: 100%;
    border: 1px solid #b5b5b5;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 14px;
    font-family: "Poppins", sans-serif;
    outline: none;
}

    .pf-combobox__search:focus {
        border-color: #2b5ea7;
        box-shadow: 0 0 0 2px rgba(43, 94, 167, 0.15);
    }

.pf-combobox__signin {
    display: block;
    padding: 10px 16px;
    color: #0c39a1;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    margin-bottom: 4px;
    cursor: pointer;
}

    .pf-combobox__signin:hover {
        color: #1a237e;
        text-decoration: underline;
    }

.pf-combobox__item {
    padding: 10px 16px;
    font-size: 15px;
    color: #181818;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

    .pf-combobox__item:hover {
        background-color: #f0f4ff;
    }

    .pf-combobox__item.selected {
        background-color: #e7eafb;
        font-weight: 600;
    }

    .pf-combobox__item.hidden {
        display: none;
    }

.pf-combobox__empty {
    padding: 10px 16px;
    font-size: 15px;
    color: #888;
    font-style: italic;
    cursor: default;
}

.pf-combobox__auth-hint {
    margin: 6px 0 0;
    font-size: 13px;
    color: #555;
    white-space: nowrap;
}

/* Read-only mode for "Continue without a plan" */
.pf-combobox__readonly {
    display: none;
}

.pf-combobox__readonly-display {
    display: flex;
    align-items: center;
    min-height: 52px;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: default;
    overflow: hidden;
}

.pf-combobox__readonly-text {
    color: #666;
    font-size: 15px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pf-combobox__select-plan-link {
    display: inline-block;
    margin-top: 6px;
    font-size: 13px;
    color: #0c39a1;
    text-decoration: none;
    cursor: pointer;
}

    .pf-combobox__select-plan-link:hover {
        color: #1a237e;
        text-decoration: underline;
    }

@media (max-width: 767.98px) {
    .pf-combobox__auth-hint {
        white-space: normal;
    }
}

/* ---------- Provider Finder Autocomplete (specialty & location) ---------- */

.pf-autocomplete {
    position: relative;
}

.pf-autocomplete__input {
    min-height: 52px;
    padding: 8px 16px !important;
    border: 1px solid #b5b5b5 !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    color: #181818 !important;
}

    .pf-autocomplete__input:focus {
        border-color: #2b5ea7 !important;
        box-shadow: 0 0 0 2px rgba(43, 94, 167, 0.15) !important;
    }

    .pf-autocomplete__input::placeholder {
        color: #999;
    }

.pf-autocomplete__dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #b5b5b5;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    padding: 8px;
}

    .pf-autocomplete__dropdown.open {
        display: block;
    }

/* Category headers (SPECIALTIES, DOCTORS, CLINICS) */
.pf-autocomplete__category {
    padding: 4px 16px;
    font-family: "Poppins", sans-serif;
    font-size: 12px;
    font-weight: 600;
    line-height: 14px;
    color: #0c39a1;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Autocomplete result items */
.pf-autocomplete__item {
    padding: 16px;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    line-height: 22px;
    color: #181818;
    cursor: pointer;
    transition: background-color 0.15s ease;
    border-radius: 4px;
}

    .pf-autocomplete__item:hover {
        background-color: #f0f4ff;
    }

    .pf-autocomplete__item.active {
        background-color: #e7eafb;
    }

/* Highlighted (matching) text in results */
.pf-highlight {
    font-weight: 700;
}

/* Secondary info (specialty, location) in doctor/clinic results */
.pf-autocomplete__secondary {
    color: #767676;
}

/* No results message */
.pf-autocomplete__empty {
    padding: 16px;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    color: #767676;
    text-align: center;
}

/* ---------- Form controls (shared) ---------- */

.form-label {
    font-size: 0.85rem;
    color: #1a1a1a;
    margin-bottom: 6px;
}

.form-control-custom {
    border: 1px solid #bdbdbd;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 0.9rem;
    height: auto;
    color: #333;
}

    .form-control-custom:focus {
        border-color: #2b5ea7;
        box-shadow: 0 0 0 2px rgba(43, 94, 167, 0.15);
    }

    .form-control-custom::placeholder {
        color: #999;
    }

/* ── Not-In-Network Modal ── */
.nin-backdrop {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.55);
    padding: 16px;
}

.nin-modal {
    background: var(--pd-white, #ffffff);
    border-radius: 12px;
    max-width: 460px;
    width: 100%;
    padding: 40px 32px 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
    animation: ninSlideIn 0.25s ease-out;
}

@keyframes ninSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.nin-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    border-radius: 50%;
    background: #fdecea;
}

.nin-icon {
    font-size: 32px;
    color: #c0392b;
}

.nin-title {
    font-family: "Poppins", sans-serif;
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    color: var(--pd-black, #181818);
    margin: 0 0 12px;
}

.nin-body {
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 22px;
    color: #555;
    margin: 0 0 28px;
}

.nin-btn {
    display: inline-block;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    font-weight: 500;
    line-height: 22px;
    color: #fff;
    background-color: var(--pd-blue3, #0c39a1);
    border: none;
    border-radius: 8px;
    padding: 12px 32px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

    .nin-btn:hover {
        background-color: #0d1554;
        color: #fff;
        text-decoration: none;
    }

    .nin-btn:focus-visible {
        outline: 2px solid #2b5ea7;
        outline-offset: 2px;
    }

/* ==========================================================================
   Top Loading Bar
   Thin 3px bar fixed at the very top of the viewport.
   Shown/hidden by TopLoader (js/top-loader.js) during Ajax requests.
   ========================================================================== */

#pf-top-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    z-index: 9999;
    pointer-events: none;
}

#pf-top-loader .pf-tl-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    opacity: 0;
    background: linear-gradient(90deg, #0c39a1 0%, #3a8fd4 100%);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 8px rgba(58, 143, 212, 0.55);
    transition: width 0.25s ease, opacity 0.4s ease;
}
