/* ── Alabama Hospice Directory (no-map view) ── */
#ahf-directory-wrap {
    font-family: inherit;
    max-width: 1100px;
    margin: 0 auto;
    color: #1d2327;
}

/* ── Controls ──────────────────────────────────────────────────────────── */
.ahf-dir-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f0f8ff;
    border: 1px solid #c8dff0;
    border-radius: 10px 10px 0 0;
}
.ahf-dir-search-wrap {
    position: relative;
    flex: 1;
    min-width: 220px;
}
.ahf-dir-search-wrap svg {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
}
#ahf-dir-search {
    width: 100%;
    padding: 9px 12px 9px 34px;
    border: 1px solid #c8dff0;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    box-sizing: border-box;
    outline: none;
    transition: border-color .2s;
}
#ahf-dir-search:focus { border-color: #2c3e7a; }

.ahf-dir-cert-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    color: #374151;
}
#ahf-dir-cert { cursor: pointer; }
#ahf-dir-count { font-size: 13px; color: #6b7280; margin-left: auto; }

/* ── County tabs ───────────────────────────────────────────────────────── */
#ahf-dir-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 14px 20px;
    background: #fff;
    border: 1px solid #c8dff0;
    border-top: none;
}
.ahf-dir-tab {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
    font-family: inherit;
    line-height: 1.2;
}
.ahf-dir-tab:hover:not(:disabled) {
    background: #e0eaff;
    border-color: #c8dff0;
    color: #1e2d6b;
}
.ahf-dir-tab.ahf-dir-tab-active {
    background: #1e2d6b;
    color: #fff;
    border-color: #1e2d6b;
}
.ahf-dir-tab.ahf-dir-tab-active:hover { background: #2c3e7a; }
.ahf-dir-tab .ahf-dir-tab-count {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    background: rgba(255,255,255,.25);
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 600;
}
.ahf-dir-tab:not(.ahf-dir-tab-active) .ahf-dir-tab-count {
    background: rgba(30,45,107,.1);
    color: #1e2d6b;
}

/* Disabled tab (no hospices in county) */
.ahf-dir-tab-empty {
    background: #f9fafb;
    color: #9ca3af;
    border-color: #e5e7eb;
    cursor: not-allowed;
    opacity: .6;
}
.ahf-dir-tab-empty:hover { background: #f9fafb; color: #9ca3af; border-color: #e5e7eb; }

/* "All" tab gets a subtle separator */
.ahf-dir-tab-all {
    margin-right: 6px;
    padding-right: 14px;
    border-right: 2px solid #e5e7eb;
    border-radius: 20px;
}

/* ── Results ───────────────────────────────────────────────────────────── */
#ahf-dir-results {
    background: #fff;
    border: 1px solid #c8dff0;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 20px;
    min-height: 200px;
}

.ahf-dir-loading,
.ahf-dir-empty {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 14px;
}
.ahf-dir-empty-icon { font-size: 40px; display: block; margin-bottom: 12px; }

.ahf-dir-county-section { margin-bottom: 28px; }
.ahf-dir-county-section:last-child { margin-bottom: 0; }
.ahf-dir-county-heading {
    font-size: 16px;
    font-weight: 700;
    color: #1e2d6b;
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ahf-dir-county-heading-icon { font-size: 18px; }
.ahf-dir-county-count {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
    background: #f3f4f6;
    padding: 2px 8px;
    border-radius: 10px;
}

/* ── Cards ─────────────────────────────────────────────────────────────── */
.ahf-dir-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.ahf-dir-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 16px;
    transition: border-color .2s, box-shadow .2s;
}
.ahf-dir-card:hover {
    border-color: #c8dff0;
    box-shadow: 0 2px 12px rgba(30,45,107,.08);
}
.ahf-dir-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e5e7eb;
}
.ahf-dir-card-name {
    font-size: 15px;
    font-weight: 700;
    color: #1d2327;
    margin: 0;
    line-height: 1.3;
    flex: 1;
}
.ahf-dir-cert-badge {
    background: #dcfce7;
    color: #166534;
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.ahf-dir-card-body { display: flex; flex-direction: column; gap: 8px; }
.ahf-dir-field {
    display: flex;
    gap: 8px;
    font-size: 13px;
    line-height: 1.4;
    align-items: flex-start;
}
.ahf-dir-field-label {
    color: #6b7280;
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    flex-shrink: 0;
    min-width: 64px;
    padding-top: 1px;
}
.ahf-dir-field-value {
    color: #374151;
    word-break: break-word;
    flex: 1;
}
.ahf-dir-field-value a { color: #3b5bdb; text-decoration: none; }
.ahf-dir-field-value a:hover { text-decoration: underline; }

/* Empty field — greyed out */
.ahf-dir-field-empty .ahf-dir-field-label { color: #cbd5e0; }
.ahf-dir-field-empty .ahf-dir-field-value { color: #cbd5e0; font-style: italic; }

/* ── Responsive ────────────────────────────────────────────────────────── */
@media (max-width: 720px) {
    .ahf-dir-controls { padding: 12px; }
    #ahf-dir-tabs { padding: 10px; gap: 5px; }
    .ahf-dir-tab { padding: 5px 10px; font-size: 12px; }
    #ahf-dir-results { padding: 14px; }
    .ahf-dir-cards { grid-template-columns: 1fr; }
    #ahf-dir-count { width: 100%; margin-left: 0; }
    .ahf-dir-tab-all { border-right: none; margin-right: 0; }
}
