/* =========================
   Provider search page shell
========================= */
body.app-shell {
    margin: 0;
    min-height: 100vh;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at top right, rgba(59, 130, 246, 0.05), transparent 24%),
        linear-gradient(180deg, #f8fbff 0%, #f4f7fb 100%);
}

.app-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-main {
    flex: 1 0 auto;
    padding: 2rem 0 4rem;
}

.page-shell {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* =========================
   Hero
========================= */
.hero-panel {
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
    padding: 2rem;
    border-radius: 24px;
    color: #fff;
    background: linear-gradient(135deg, #0f172a 0%, #14213d 45%, #1d4ed8 100%);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
}

.hero-panel::before,
.hero-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.22;
    filter: blur(6px);
    pointer-events: none;
}

.hero-panel::before {
    top: -60px;
    right: -40px;
    width: 240px;
    height: 240px;
    background: #60a5fa;
}

.hero-panel::after {
    bottom: -80px;
    left: -40px;
    width: 200px;
    height: 200px;
    background: #93c5fd;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 1.25rem;
}

.hero-copy {
    max-width: 700px;
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.45rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: #e5efff;
    font-size: 0.86rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
}

.hero-title {
    margin: 0 0 0.65rem;
    font-size: clamp(1.85rem, 3vw, 3rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-text {
    margin: 0;
    max-width: 60ch;
    font-size: 1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.hero-stats {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(110px, 1fr));
    gap: 0.75rem;
    min-width: min(100%, 360px);
}

.stat-card {
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.10);
    backdrop-filter: blur(10px);
}

.stat-label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.72);
}

.stat-value {
    display: block;
    font-size: 1.35rem;
    line-height: 1.1;
    font-weight: 800;
    color: #fff;
}

/* =========================
   Main layout
========================= */
.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1.5rem;
    align-items: start;
}

.content-main,
.content-side {
    min-width: 0;
}

.surface-card {
    background: var(--white);
    border: 1px solid rgba(219, 228, 239, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* =========================
   Search panel
========================= */
.search-panel {
    margin-bottom: 1.25rem;
    padding: 1rem;
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.9rem;
    align-items: stretch;
}

.search-input-wrap {
    position: relative;
}

.search-input-wrap .search-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    color: #6b7c93;
    font-size: 0.95rem;
    pointer-events: none;
}

.search-panel .search-input {
    width: 100%;
    min-height: 56px;
    padding: 0.95rem 1rem 0.95rem 2.7rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
    color: var(--text);
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.search-panel .search-input:focus {
    outline: none;
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btn-search {
    min-width: 156px;
    min-height: 56px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.24);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.btn-search:hover,
.btn-search:focus {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

/* =========================
   Results panel
========================= */
.results-panel {
    padding: 1.15rem;
}

.results-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.results-title-wrap h1,
.results-title-wrap h2 {
    margin: 0;
    color: var(--heading);
    font-size: clamp(1.3rem, 2vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.results-subtitle {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.96rem;
}

.results-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-dark);
    font-size: 0.95rem;
    font-weight: 700;
}

/* =========================
   Provider list
========================= */
.provider-list {
    display: grid;
    gap: 1rem;
}

.provider-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.65rem;
}

.provider-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.20));
    color: var(--primary-dark);
    font-size: 1.2rem;
}

.provider-title-wrap {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

.provider-title {
    margin: 0 0 0.22rem;
    font-size: 1.1rem;
    line-height: 1.3;
    font-weight: 800;
}

.provider-title a {
    color: var(--heading);
}

.provider-title a:hover,
.provider-title a:focus {
    color: var(--primary-dark);
}

.provider-meta {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.provider-body {
    color: var(--text);
    font-size: 0.96rem;
    line-height: 1.7;
}

.provider-body p:last-child {
    margin-bottom: 0;
}

/* =========================
   Empty state
========================= */
.empty-state {
    padding: 2.5rem 1.5rem;
    text-align: center;
    border: 1px dashed var(--border);
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.empty-state-icon {
    width: 68px;
    height: 68px;
    margin: 0 auto 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #eef3f8;
    color: var(--primary-dark);
    font-size: 1.4rem;
}

.empty-state h3 {
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--heading);
}

.empty-state p {
    margin: 0;
    color: var(--text-muted);
    line-height: 1.7;
}

/* =========================
   Sidebar / calendar
========================= */
.side-stack {
    display: grid;
    gap: 1rem;
}

.side-card {
    padding: 1rem;
}

.side-card-title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0 0 0.9rem;
    font-size: 1rem;
    font-weight: 800;
    color: var(--heading);
}

.side-card-title i {
    color: var(--primary-dark);
}

.calendar-shell {
    overflow: hidden;
}

.calendar-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.calendar-title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--heading);
}

.calendar-caption {
    margin: 0.35rem 0 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.calendar-frame {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.fc {
    --fc-border-color: #e4ebf3;
    --fc-button-bg-color: #ffffff;
    --fc-button-border-color: #d7e1ed;
    --fc-button-hover-bg-color: #f5f8fc;
    --fc-button-hover-border-color: #c9d6e4;
    --fc-button-active-bg-color: #2563eb;
    --fc-button-active-border-color: #2563eb;
    --fc-page-bg-color: transparent;
    --fc-neutral-bg-color: #f7fafd;
    --fc-list-event-hover-bg-color: #f5f8fc;
    --fc-event-bg-color: #2563eb;
    --fc-event-border-color: #2563eb;
    --fc-event-text-color: #ffffff;
    --fc-today-bg-color: rgba(37, 99, 235, 0.08);
}

.fc .fc-toolbar.fc-header-toolbar {
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.fc .fc-toolbar-title {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--heading);
}

.fc .fc-button {
    padding: 0.48rem 0.8rem;
    border-radius: 12px;
    box-shadow: none;
    font-weight: 700;
    text-transform: capitalize;
}

.fc .fc-button:focus {
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.fc .fc-scrollgrid,
.fc .fc-theme-standard td,
.fc .fc-theme-standard th {
    border-color: #e4ebf3;
}

.fc .fc-col-header-cell-cushion {
    padding: 0.85rem 0.35rem;
    color: var(--text-muted);
    font-weight: 700;
    text-decoration: none;
}

.fc .fc-daygrid-day-number,
.fc .fc-timegrid-slot-label-cushion,
.fc .fc-timegrid-axis-cushion {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
}

.fc .fc-daygrid-day-frame {
    min-height: 100px;
}

.fc .fc-daygrid-day.fc-day-today {
    border-radius: 12px;
}

.fc .fc-daygrid-event,
.fc .fc-timegrid-event {
    padding: 0.18rem 0.42rem;
    border-radius: 10px;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.16);
}

.fc .fc-event-title {
    font-weight: 700;
}

.fc .fc-more-link {
    color: var(--primary-dark);
    font-weight: 700;
}

.calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 1rem;
}

.calendar-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.42rem 0.7rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f7fafd;
    color: var(--text-muted);
    font-size: 0.88rem;
}

.calendar-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.calendar-dot.primary {
    background: #2563eb;
}

.calendar-dot.soft {
    background: #93c5fd;
}

.calendar-dot.success {
    background: #16a34a;
}

/* =========================
   Summary chips
========================= */
.provider-search-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.72rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: #f7fafd;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 600;
}

/* =========================
   Responsive
========================= */
@media (max-width: 1199.98px) {
    .content-grid {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        width: 100%;
    }
}

@media (max-width: 767.98px) {
    .app-main {
        padding: 1.25rem 0 3rem;
    }

    .hero-panel {
        padding: 1.25rem;
    }

    .search-form {
        grid-template-columns: 1fr;
    }

    .btn-search {
        width: 100%;
    }

    .provider-card {
        padding: 1rem;
    }

    .provider-card-top {
        align-items: flex-start;
    }

    .provider-title-wrap {
        gap: 0.8rem;
    }

    .provider-icon {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .fc .fc-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .fc .fc-toolbar-title {
        text-align: center;
    }
}

/* =========================
   Select2 Bootstrap 5 Overrides
   (Ensures single and multi-select match visually)
========================= */

/* 1. Unify min-height and padding logic */
.select2-container--bootstrap-5 .select2-selection {
    min-height: calc(1.5em + 1rem + 2px) !important;
    border-radius: 0.375rem !important;
    border: 1px solid #dee2e6;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

/* 2. Vertically align single-select text correctly */
.select2-container--bootstrap-5 .select2-selection--single {
    display: flex !important;
    align-items: center !important;
    padding: 0.375rem 0.75rem !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__rendered {
    color: #495057 !important;
    padding: 0 !important;
    line-height: 1.5 !important;
}

/* 3. Re-align the clear 'x' to avoid colliding with dropdown arrow */
.select2-container--bootstrap-5 .select2-selection--single .select2-selection__arrow {
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 0.75rem !important;
}

.select2-container--bootstrap-5 .select2-selection--single .select2-selection__clear {
    top: 50% !important;
    transform: translateY(-50%) !important;
    right: 2.25rem !important; /* Move 'x' left of the arrow */
    display: flex;
    align-items: center;
    background: transparent !important;
}

/* 4. Match border focus states perfectly with Bootstrap */
.select2-container--bootstrap-5.select2-container--focus .select2-selection {
    border-color: #86b7fe !important;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25) !important;
}

/* =========================
   Provider Results Listing Cards
========================= */
.provider-result-card {
    cursor: pointer;
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease, border-color 0.2s;
    border: 1px solid #e2e8f0;
}

.provider-result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08); /* Lift and drop shadow */
    border-color: #cbd5e1;
}

.provider-summary {
    font-size: 0.95rem;          /* Bumped up from small */
    line-height: 1.6;
    color: #475569 !important;   /* High-contrast modern slate rendering */
    margin-top: 0.5rem;
}		