/**
 * Biolume Test Locator — scoped to match Eighteentech/biolume theme.
 * All rules live under .bl-directory / body.bl-directory-page.
 */

/* Theme-aligned tokens */
.bl-directory {
    --bl-bg: #f5f1e9;
    --bl-surface: #eee9de;
    --bl-surface-alt: #fffcf6;
    --bl-border: #cfc4ad;
    --bl-text: #1a1a1a;
    --bl-text-muted: #767676;
    --bl-accent: #5a1413;
    --bl-accent-soft: #9e4140;
    --bl-blue: #283553;
    --bl-blue-mid: #577c8e;
    --bl-green-bg: #e8f4ed;
    --bl-green-text: #2a7a4b;
    --bl-font-body: 'Metro Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --bl-font-heading: 'Canela', Georgia, 'Times New Roman', serif;
    --bl-radius: 15px;
    --bl-radius-sm: 10px;
    --bl-shadow: 0 4px 20px rgba(40, 53, 83, 0.08);
}

/* Full-width page shell (no theme edits) */
body.bl-directory-page .page-main {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

body.bl-directory-page .column.main {
    padding: 0;
    width: 100%;
}

body.bl-directory-page .breadcrumbs {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px 28px 0;
    box-sizing: border-box;
}

body.bl-directory-page .breadcrumbs .items {
    font-size: 14px;
}

.bl-directory {
    font-family: var(--bl-font-body);
    font-weight: 300;
    font-size: 16px;
    line-height: 1.5;
    color: var(--bl-text);
    margin: 0;
    width: 100%;
    background: var(--bl-bg);
}

.bl-directory h1,
.bl-directory h2,
.bl-directory h3 {
    font-family: var(--bl-font-heading);
    font-weight: 300;
    font-style: italic;
    letter-spacing: 0.02em;
    color: var(--bl-text);
}

.bl-directory button,
.bl-directory input,
.bl-directory select,
.bl-directory textarea {
    font-family: var(--bl-font-body);
}

/* Reset theme global button styles inside locator */
.bl-directory button {
    box-shadow: none;
    border-radius: var(--bl-radius-sm);
    color: var(--bl-text);
    background: var(--bl-surface-alt);
    border: 1px solid var(--bl-border);
    font-weight: 400;
    font-size: 13px;
    line-height: 1.35;
    padding: 8px 12px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.bl-directory button:hover {
    background: var(--bl-surface);
    border-color: var(--bl-blue-mid);
    color: var(--bl-text);
}

.bl-directory button:active {
    box-shadow: none;
}

.bl-directory button:focus,
.bl-directory input:focus,
.bl-directory select:focus {
    outline: 2px solid var(--bl-blue-mid);
    outline-offset: 2px;
    box-shadow: none;
}

.bl-hidden {
    display: none !important;
}

/* Login wall */
.bl-login-wall {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(245, 241, 233, 0.92);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.bl-login-box {
    text-align: center;
    padding: 2.5rem;
    max-width: 420px;
    background: var(--bl-surface-alt);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
}

.bl-login-box h2 {
    margin-top: 0;
}

.bl-btn-primary {
    display: inline-block;
    background: var(--bl-blue);
    color: #fff;
    padding: 12px 28px;
    border-radius: var(--bl-radius);
    text-decoration: none;
    font-weight: 500;
    border: 0;
}

.bl-btn-primary:hover {
    background: var(--bl-blue-mid);
    color: #fff;
}

.bl-btn-secondary {
    background: var(--bl-surface-alt);
    border: 1px solid var(--bl-border);
    color: var(--bl-text);
    padding: 10px 16px;
    border-radius: var(--bl-radius-sm);
    cursor: pointer;
    width: 100%;
    font-size: 13px;
}

.bl-btn-secondary:hover {
    background: var(--bl-surface);
}

/* Hero */
.bl-hero {
    min-height: 380px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.bl-hero-overlay {
    background: linear-gradient(180deg, rgba(40, 53, 83, 0.45) 0%, rgba(40, 53, 83, 0.72) 100%);
    min-height: 380px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px 24px 48px;
}

.bl-hero-content {
    max-width: 720px;
    text-align: center;
    color: #fff;
}

.bl-hero-eyebrow {
    color: #f5c6cf;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin: 0 0 8px;
}

.bl-hero-title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    margin: 0 0 12px;
    color: #fff;
    line-height: 1.15;
}

.bl-hero-sub {
    opacity: 0.92;
    font-size: 1rem;
    margin: 0 0 24px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

.bl-hero-search input {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    display: block;
    padding: 14px 22px;
    border-radius: var(--bl-radius);
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(0, 0, 0, 0.35);
    color: #fff;
    font-size: 15px;
}

.bl-hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

/* Layout */
.bl-layout {
    display: grid;
    grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
    gap: 0;
    max-width: 1400px;
    margin: 0 auto;
    align-items: start;
}

.bl-sidebar {
    background: var(--bl-surface);
    border-right: 1px solid var(--bl-border);
    display: flex;
    flex-direction: column;
    min-height: 50vh;
    position: sticky;
    top: 80px;
    align-self: start;
    max-height: calc(100vh - 96px);
}

.bl-sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--bl-border);
}

.bl-sidebar-header strong {
    display: block;
    font-family: var(--bl-font-heading);
    font-style: italic;
    font-weight: 300;
    font-size: 1.35rem;
    line-height: 1.2;
}

.bl-sidebar-header span {
    color: var(--bl-accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.bl-sidebar-body {
    padding: 16px 20px;
    flex: 1;
    overflow-y: auto;
}

.bl-sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--bl-border);
}

.bl-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--bl-text-muted);
    margin: 18px 0 8px;
}

.bl-label:first-child {
    margin-top: 0;
}

.bl-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius-sm);
    font-size: 14px;
    color: var(--bl-text);
    background: var(--bl-surface-alt);
    box-sizing: border-box;
}

.bl-input:disabled {
    opacity: 0.6;
}

.bl-search-sidebar {
    display: none;
}

.bl-sort-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.bl-sort-grid .bl-sort-btn:last-child {
    grid-column: 1 / -1;
}

.bl-tag-filters {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 280px;
    overflow-y: auto;
    padding-right: 4px;
}

.bl-sort-grid .bl-sort-btn.is-active,
.bl-tag-filters .bl-filter-btn.is-active {
    background: var(--bl-blue);
    color: #fff;
    border-color: var(--bl-blue);
}

.bl-filter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.bl-filter-row .bl-label {
    margin: 16px 0 0;
}

.bl-toggle {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 999px;
    border: 1px solid var(--bl-border);
    background: var(--bl-surface-alt);
    color: var(--bl-text);
    flex-shrink: 0;
}

.bl-toggle.is-on {
    background: var(--bl-blue);
    color: #fff;
    border-color: var(--bl-blue);
}

#bl-price-range {
    width: 100%;
    margin: 8px 0 0;
    accent-color: var(--bl-blue);
}

.bl-price-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: var(--bl-text-muted);
    margin-top: 6px;
    gap: 8px;
}

.bl-price-labels #bl-price-value {
    flex: 1;
    text-align: center;
    font-weight: 600;
    color: var(--bl-text);
}

.bl-main {
    padding: 32px 28px 48px;
    min-width: 0;
}

.bl-browse {
    margin-bottom: 36px;
}

.bl-browse h2 {
    font-size: clamp(1.5rem, 3vw, 2rem);
    margin: 0 0 20px;
}

.bl-browse-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.bl-browse-tile {
    text-align: left;
    padding: 18px 16px;
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    background: var(--bl-surface-alt);
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.bl-browse-tile:hover {
    box-shadow: var(--bl-shadow);
    transform: translateY(-2px);
    border-color: var(--bl-blue-mid);
}

.bl-browse-cat {
    display: block;
    font-size: 10px;
    color: var(--bl-text-muted);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.bl-browse-label {
    display: block;
    font-weight: 500;
    margin-top: 6px;
    font-size: 15px;
    color: var(--bl-text);
}

.bl-results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 12px 16px;
    margin-bottom: 20px;
}

.bl-results-header h2 {
    margin: 0;
    flex: 1 1 auto;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

#bl-result-count {
    font-size: 14px;
    color: var(--bl-text-muted);
    white-space: nowrap;
}

.bl-provider-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.bl-provider-list.bl-loading {
    opacity: 0.55;
    pointer-events: none;
}

/* Provider cards */
.provider-card {
    display: flex;
    background: var(--bl-surface-alt);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    overflow: hidden;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.provider-card:hover {
    box-shadow: var(--bl-shadow);
    transform: translateY(-2px);
}

.provider-card.is-featured {
    border-color: var(--bl-blue-mid);
}

.provider-img-placeholder {
    width: 140px;
    min-height: 160px;
    background: var(--bl-surface);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-right: 1px solid var(--bl-border);
}

.bl-featured-badge {
    font-size: 10px;
    background: var(--bl-blue);
    color: #fff;
    padding: 5px 10px;
    border-radius: 999px;
    margin-top: 8px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.bl-card-body {
    flex: 1;
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
}

.bl-card-title {
    font-size: 1.35rem;
    margin: 0;
    font-family: var(--bl-font-heading);
    font-style: italic;
    font-weight: 300;
    line-height: 1.2;
}

.bl-card-address {
    font-size: 13px;
    color: var(--bl-text-muted);
    margin: 0;
    line-height: 1.45;
}

.bl-card-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.bl-pill {
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 999px;
    font-weight: 500;
}

.bl-pill-brand {
    background: rgba(90, 20, 19, 0.1);
    color: var(--bl-accent);
}

.bl-pill-green {
    background: var(--bl-green-bg);
    color: var(--bl-green-text);
}

.bl-card-price .bl-from {
    font-size: 12px;
    color: var(--bl-text-muted);
    margin-right: 4px;
}

.bl-card-price .bl-amount {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--bl-text);
}

.bl-card-desc {
    font-size: 13px;
    color: var(--bl-text-muted);
    line-height: 1.55;
    margin: 0;
}

.bl-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.bl-tag {
    font-size: 11px;
    padding: 4px 10px;
    border-radius: 6px;
    background: var(--bl-surface);
    color: var(--bl-text);
    border: 1px solid var(--bl-border);
}

.bl-tag.tag-discount {
    background: rgba(90, 20, 19, 0.08);
    color: var(--bl-accent);
    border-color: rgba(90, 20, 19, 0.2);
}

.bl-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid var(--bl-border);
    font-size: 13px;
}

.bl-card-footer a:not(.bl-btn-view) {
    color: var(--bl-blue);
    text-decoration: none;
    font-weight: 500;
}

.bl-card-footer a:not(.bl-btn-view):hover {
    text-decoration: underline;
}

.bl-btn-view {
    margin-left: auto;
    background: var(--bl-blue);
    color: #fff !important;
    padding: 10px 20px;
    border-radius: var(--bl-radius);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    border: 0;
    white-space: nowrap;
}

.bl-btn-view:hover {
    background: var(--bl-blue-mid);
    color: #fff !important;
    text-decoration: none;
}

.bl-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--bl-text-muted);
    background: var(--bl-surface-alt);
    border: 1px dashed var(--bl-border);
    border-radius: var(--bl-radius);
}

/* Clinic detail */
.bl-clinic-view {
    max-width: 960px;
    margin: 0 auto;
    padding: 32px 24px 48px;
}

.bl-back {
    color: var(--bl-blue-mid);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.bl-back:hover {
    color: var(--bl-blue);
}

.bl-clinic-header {
    margin: 20px 0 32px;
}

.bl-clinic-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin: 12px 0;
}

.bl-clinic-desc {
    color: var(--bl-text-muted);
    line-height: 1.65;
    max-width: 720px;
}

.bl-clinic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.bl-clinic-panel {
    background: var(--bl-surface-alt);
    border: 1px solid var(--bl-border);
    border-radius: var(--bl-radius);
    padding: 24px;
}

.bl-clinic-panel h2 {
    font-size: 1.35rem;
    margin: 0 0 16px;
}

.bl-service-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bl-service-list li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--bl-border);
    font-size: 14px;
}

.bl-hours-table {
    width: 100%;
    font-size: 14px;
}

.bl-hours-table td {
    padding: 6px 0;
    vertical-align: top;
}

.bl-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.bl-contact-list a {
    color: var(--bl-blue);
    font-weight: 500;
}

.bl-mobile-only {
    display: none;
}

#bl-mobile-filter-toggle {
    background: var(--bl-blue);
    color: #fff;
    border-color: var(--bl-blue);
}

@media (max-width: 900px) {
    .bl-layout {
        grid-template-columns: 1fr;
    }

    .bl-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: min(300px, 88vw);
        z-index: 200;
        transition: left 0.3s ease;
        box-shadow: 4px 0 24px rgba(40, 53, 83, 0.15);
        max-height: none;
        top: 0;
    }

    .bl-sidebar.is-open {
        left: 0;
    }

    .bl-search-sidebar {
        display: block;
    }

    .bl-main {
        padding: 24px 16px 40px;
    }

    .bl-mobile-only {
        display: inline-block;
    }

    .provider-card {
        flex-direction: column;
    }

    .provider-img-placeholder {
        width: 100%;
        min-height: 72px;
        border-right: 0;
        border-bottom: 1px solid var(--bl-border);
    }

    .bl-btn-view {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .bl-hero-overlay {
        padding-top: 72px;
    }
}

@media (min-width: 901px) {
    .bl-hero-search {
        display: block;
    }
}
