:root {
    --background: #f8fafc;
    --foreground: #0f172a;
    --muted: #64748b;
    --border: #dbe2ea;
    --card-bg: #ffffff;
    --primary: #3157e0;
    --primary-hover: #2748c7;
    --shadow-sm: 0 4px 16px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
    --radius-lg: 20px;
    --radius-md: 14px;
    --radius-sm: 10px;
}

body {
    font-family: "Inter", sans-serif;
    background: var(--background);
    color: var(--foreground);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
}

.section-heading {
    margin: 0 0 0.375rem;
    font-size: 2rem;
    line-height: 1.2;
    font-weight: 800;
    color: var(--foreground);
}

.section-subtext {
    margin: 0;
    font-size: 1rem;
    color: var(--muted);
}

.section-providers {
    scroll-margin-top: 96px;
}

.provider-search-form-shell {
    padding: 1.25rem;
    background: var(--card-bg);
    border: 1px solid rgba(219, 228, 239, 0.92);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.provider-search-form-shell .form-label {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--foreground);
}

.form-label-icon {
    color: var(--foreground);
    margin-right: 0.25rem;
}

.required-star {
    color: #ef4444;
}

.geo-status-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.125rem;
    background: linear-gradient(180deg, #f8fbff 0%, #f3f7fb 100%);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
}

.geo-status-bar__text {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
}

.geo-status-bar__icon {
    margin-top: 0.15rem;
    color: var(--foreground);
}

.geo-status-bar__btn {
    flex-shrink: 0;
    border-radius: 999px;
    font-weight: 700;
}

.provider-filter-group {
    padding: 1rem 0 1.25rem;
    border-bottom: 1px solid #edf2f7;
}

.provider-filter-group--last {
    padding-bottom: 0;
    border-bottom: 0;
}

.provider-filter-group__header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}

.provider-filter-group__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    color: var(--primary);
    background: rgba(49, 87, 224, 0.10);
    border-radius: 12px;
}

.provider-filter-group__title {
    margin: 0 0 0.18rem;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    color: var(--foreground);
}

.provider-filter-group__help,
.provider-field-help {
    margin: 0;
    color: #475569;
    font-size: 0.86rem;
    line-height: 1.45;
}

.provider-field-help {
    margin-top: 0.45rem;
}

.provider-search-form-shell .btn,
.calendar-widget .btn,
.category-column .nav-toggle-btn {
    min-height: 44px;
}

.provider-field-error,
.provider-search-form-shell .invalid-feedback {
    margin-top: 0.45rem;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 600;
}

.provider-form-alert {
    display: flex;
    align-items: flex-start;
    padding: 0.85rem 0.95rem;
    margin-bottom: 1rem;
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 14px;
    font-size: 0.92rem;
    font-weight: 600;
}

.provider-filter-actions {
    padding-top: 1.1rem;
    margin-top: 1.1rem;
    border-top: 1px solid #edf2f7;
}

.provider-search-form-shell .btn-primary,
.search button.btn-primary,
.search .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    border-radius: 14px;
    font-weight: 700;
}

.provider-search-form-shell .btn-primary:hover,
.search button.btn-primary:hover,
.search .btn-primary:hover {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
}

.provider-search-form-shell .form-select,
.provider-search-form-shell .form-control {
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid #d6dde8;
    box-shadow: none;
}

.provider-search-form-shell .form-select:focus,
.provider-search-form-shell .form-control:focus {
    border-color: rgba(49, 87, 224, 0.55);
    box-shadow: 0 0 0 4px rgba(49, 87, 224, 0.12);
}

.provider-search-form-shell .select2-container--bootstrap-5 .select2-selection {
    min-height: 48px;
    border-color: #d6dde8;
    border-radius: 14px;
    box-shadow: none;
}

.provider-search-form-shell .select2-container--bootstrap-5.select2-container--focus .select2-selection,
.provider-search-form-shell .select2-container--bootstrap-5.select2-container--open .select2-selection {
    border-color: rgba(49, 87, 224, 0.55);
    box-shadow: 0 0 0 4px rgba(49, 87, 224, 0.12);
}

.provider-search-form-shell .select2-container--bootstrap-5 .select2-selection--multiple {
    padding: 0.35rem 0.45rem;
}

.provider-search-form-shell .select2-container--bootstrap-5 .select2-selection--multiple .select2-selection__choice {
    border-radius: 999px;
    color: #1e293b;
    background: #eef2ff;
    border-color: #dbe4ff;
}

.provider-search-form-shell .select2-container--bootstrap-5 .select2-dropdown {
    border-color: #d6dde8;
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.section-categories .section-heading {
    margin: 0 0 0.375rem;
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 700;
    color: #182033;
}

.section-categories .section-subtext {
    margin: 0;
    font-size: 0.95rem;
    color: #667085;
}

.section-categories .section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #3157e0;
}

.category-columns {
    align-items: stretch;
}

.category-column {
    min-height: 100%;
}

.category-column .modern-category-tree {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
}

.category-column .category-node {
    margin-bottom: 0 !important;
}

.category-column .category-item-row {
    display: flex;
    align-items: center;
    min-height: 42px;
    width: 100%;
    padding: 0.45rem 0.75rem !important;
    background: transparent;
    border: none;
    border-bottom: 1px solid #eef1f6;
    border-radius: 0;
    box-shadow: none;
    transition: background-color 0.15s ease;
}

.category-column .category-node:last-child > .category-item-row {
    border-bottom: none;
}

.category-column .category-item-row:hover {
    background: #f5f7ff;
    box-shadow: none;
}

.category-column .category-leaf-icon {
    width: 4px;
    min-width: 4px;
    height: 22px;
    margin-right: 10px !important;
    border-radius: 999px;
    background: var(--node-color, #d9def8);
    color: transparent;
    overflow: hidden;
}

.category-column .category-leaf-icon i {
    display: none;
}

.category-column .category-search-link {
    display: block;
    color: #182033 !important;
    text-decoration: none !important;
    font-size: 0.98rem;
    font-weight: 600 !important;
    line-height: 1.3;
    padding: 0 !important;
    word-break: break-word;
}

.category-column .nav-toggle-btn {
    width: 44px;
    min-width: 44px;
    padding: 0 !important;
    margin-right: 0.25rem;
    color: #182033;
}

.category-column .category-item-row:hover .category-search-link {
    color: #182033 !important;
}

.category-column .text-dark {
    color: #182033 !important;
}

/* Provider count badge — colored pill next to the category label */
.cat-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--node-color, #0d6efd);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.18em 0.52em;
    border-radius: 20px;
    min-width: 1.4em;
    margin-left: 0.45rem;
    vertical-align: middle;
    letter-spacing: 0.01em;
    flex-shrink: 0;
}

/* Categories with no providers in the selected area — visually de-emphasised */
.category-column .category-no-providers .category-item-row {
    opacity: 1;
}

.category-column .category-no-providers .category-search-link {
    color: #4b5563 !important;
    font-weight: 500 !important;
}

.category-column .category-no-providers .category-item-row:hover {
    background: transparent;
    box-shadow: none;
    cursor: default;
}

@media (max-width: 767.98px) {
    .category-column .category-item-row {
        min-height: 40px;
        padding: 0.4rem 0.6rem !important;
    }

    .category-column .category-search-link {
        font-size: 0.94rem;
    }
}

.select2-container--bootstrap-5 .select2-selection {
    min-height: 46px;
    border-radius: 14px;
    border: 1px solid #d6dde8;
}

.select2-container--bootstrap-5 .select2-selection--multiple {
    padding: 0.35rem 0.45rem;
}

.select2-container--bootstrap-5 .select2-selection--single {
    padding-top: 0.15rem;
}

.select2-container--bootstrap-5 .select2-selection__choice {
    border-radius: 10px;
}

@media (max-width: 1199.98px) {
    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 767.98px) {
    .section-heading {
        font-size: 1.6rem;
    }

    .provider-search-form-shell {
        padding: 1rem;
        border-radius: 18px;
    }

    .provider-filter-group__header {
        gap: 0.7rem;
    }

    .provider-filter-group__icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .geo-status-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .geo-status-bar__btn {
        width: 100%;
        justify-content: center;
    }

    .category-column .category-item-row {
        min-height: 52px;
        padding: 0.85rem 0.9rem !important;
    }

    .category-column .category-search-link {
        font-size: 0.95rem;
    }
}

/* ─── Category skeleton loader ────────────────────────────────── */
.category-skeleton-loader {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    width: 100%;
}

.category-skeleton-row {
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: skeleton-shimmer 1.4s ease-in-out infinite;
}

@keyframes skeleton-shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ─── Category empty state ────────────────────────────────────── */
.category-empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #475569;
}

.category-empty-state i {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    display: block;
}

.category-empty-state p {
    font-size: 0.92rem;
}

/* ─── Hide-unavailable toggle ─────────────────────────────────── */
#categoryColumnsWrap.hide-unavailable .category-no-providers {
    display: none !important;
}

/* ─── Selection count badge ───────────────────────────────────── */
#categorySelectedCountWrap {
    display: none;
    align-items: center;
}

#categorySelectedCountWrap.has-selection {
    display: flex;
}

/* ─── Provider Results ────────────────────────────────────────── */
.provider-results-shell {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.provider-results-hdr {
    padding: 1rem 1.25rem 0.875rem;
    border-bottom: 1px solid var(--border);
}

.provider-results-count {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.provider-results-title {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--foreground);
    line-height: 1.25;
}

.provider-result-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid #eef1f6;
    background: transparent;
    transition: background-color 0.15s ease;
    cursor: pointer;
    text-decoration: none !important;
    color: inherit;
}

.provider-result-row:last-child {
    border-bottom: none;
}

.provider-result-row:hover {
    background: #f5f7ff;
    color: inherit;
}

.provider-result-accent {
    width: 4px;
    min-width: 4px;
    background: #d0d9f5;
    flex-shrink: 0;
    transition: background-color 0.15s ease;
}

.provider-result-row:hover .provider-result-accent {
    background: var(--primary);
}

.provider-result-content {
    flex: 1;
    padding: 0.85rem 1rem 0.85rem 0.875rem;
    min-width: 0;
}

.provider-result-name {
    font-size: 0.97rem;
    font-weight: 700;
    color: #182033;
    line-height: 1.3;
    transition: color 0.15s ease;
}

.provider-result-row:hover .provider-result-name {
    color: var(--primary);
}

.provider-result-category {
    display: inline-block;
    font-size: 0.67rem;
    font-weight: 700;
    background: #eef2ff;
    color: var(--primary);
    border-radius: 20px;
    padding: 0.14em 0.55em;
    vertical-align: middle;
    letter-spacing: 0.01em;
    margin-left: 0.4rem;
}

.provider-result-chevron {
    color: #64748b;
    font-size: 0.72rem;
    flex-shrink: 0;
    margin-top: 0.3rem;
    transition: transform 0.15s ease, color 0.15s ease;
}

.provider-result-row:hover .provider-result-chevron {
    color: var(--primary);
    transform: translateX(2px);
}

.provider-result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.3rem;
    font-size: 0.79rem;
    color: #64748b;
}

.provider-result-meta i {
    opacity: 0.7;
}

.provider-result-desc {
    margin: 0.4rem 0 0;
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.55;
}

.provider-results-empty {
    text-align: center;
    padding: 3rem 1rem;
    color: #475569;
}

.provider-results-empty i {
    font-size: 2.25rem;
    margin-bottom: 0.875rem;
    display: block;
}

.provider-results-empty h4 {
    font-size: 1rem;
    font-weight: 700;
    color: #475569;
    margin-bottom: 0.375rem;
}

.provider-results-empty p {
    font-size: 0.875rem;
    margin: 0;
    color: #475569;
}

@media (max-width: 767.98px) {
    .provider-result-content {
        padding: 0.75rem 0.875rem 0.75rem 0.75rem;
    }

    .provider-result-name {
        font-size: 0.93rem;
    }
}
