:root {
    --brand: #0f52ba;
    --brand-soft: rgba(15, 82, 186, 0.08);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1f2937;
    background-color: #f4f6fb;
}

a {
    transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
    opacity: 0.85;
}

/* Brand logo sizing in header */
.brand-logo {
    height: 64px;
    width: auto;
    display: inline-block;
}

.hero-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fbff 65%, #edf3ff 100%);
}

.hero-avatar {
    width: 140px;
    height: 140px;
    border-radius: 1rem;
    object-fit: contain;
    border: 4px solid #ffffff;
    background-color: #f0f4fa;
}

@media (min-width: 768px) {
    .hero-avatar {
        width: 250px;
        height: 250px;
    }
}

.status-badge {
    background-color: var(--brand-soft);
    color: var(--brand);
    font-size: 0.875rem;
    font-weight: 600;
    padding: 0.5rem 0.75rem;
    border-radius: 999px;
}

.icon-circle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brand-soft);
    font-size: 1.25rem;
}

footer a:hover {
    color: var(--brand);
}

.modal-backdrop.show {
    opacity: 0.45;
}

.landing-hero {
    position: relative;
    border-radius: 1.75rem;
    background: linear-gradient(135deg, #0f52ba 0%, #274f9f 60%, #3e6fd6 100%);
    color: #ffffff;
    overflow: hidden;
}

.landing-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.25), transparent 55%),
        radial-gradient(circle at 80% 0%, rgba(255, 255, 255, 0.15), transparent 60%);
    opacity: 0.6;
}

.landing-hero .card-body {
    position: relative;
    z-index: 1;
}

.landing-eyebrow {
    letter-spacing: 0.18em;
    font-size: 0.75rem;
}

.landing-pricing {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.5rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
}

.landing-feature-card {
    border-radius: 1.25rem;
}

.landing-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    border-radius: 0.85rem;
    font-size: 1.5rem;
}

@media (max-width: 575.98px) {
    .landing-hero {
        border-radius: 1.25rem;
    }
}

/* Responsive Google Map embed */
.map-embed-container {
    position: relative;
    width: 100%;
    padding-bottom: 75%; /* 4:3 aspect ratio */
    border-radius: 0.75rem;
    overflow: hidden;
}

.map-embed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Subtle hover lift on cards */
.card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
}

/* News entry separator */
.news-entry + .news-entry {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
}

/* Highlight today's row in office hours */
.today-row {
    background-color: var(--brand-soft);
    border-radius: 0.5rem;
}

.today-row td:first-child {
    color: var(--brand);
}

/* Specialties pill badges */
.specialties-badge {
    background-color: rgba(15, 82, 186, 0.12);
    color: var(--brand);
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
}

/* Social media icon links */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--brand-soft);
    color: var(--brand);
    font-size: 1.15rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.social-link:hover {
    background-color: var(--brand);
    color: #ffffff;
}

/* Quill editor sizing and scrollbars */
.ql-container {
    min-height: 240px; /* gives the editor an initial height */
}
.ql-container .ql-editor {
    min-height: 200px;
    max-height: 420px; /* constrain height */
    overflow-y: auto;  /* enable vertical scrolling */
}

/* Admin lists: keep within the viewport and scroll inside the card */
.admin-scroll-list {
    max-height: calc(100vh - 360px);
    min-height: 240px;
    overflow-y: auto;
}

/* Keep table headers visible while the list scrolls */
.admin-scroll-list thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: #f8f9fa;
    box-shadow: inset 0 -1px 0 #dee2e6;
}

/* Smaller scroll panels for dashboard cards */
.admin-scroll-panel {
    max-height: 320px;
    overflow-y: auto;
}

/* ---- Dark mode (per-tenant, set via data-bs-theme on <html>) ---- */
[data-bs-theme="dark"] body {
    color: #dbe2ee;
    background-color: #0e1320;
}

[data-bs-theme="dark"] .hero-card {
    background: linear-gradient(135deg, #1a2233 0%, #161d2c 65%, #121826 100%);
}

[data-bs-theme="dark"] .hero-avatar {
    border-color: #2a3348;
    background-color: #1a2132;
}

[data-bs-theme="dark"] .news-entry + .news-entry {
    border-top-color: #2a3348;
}

[data-bs-theme="dark"] .card:hover {
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.5) !important;
}

/* Re-tint brand-soft elements so they read on dark backgrounds */
[data-bs-theme="dark"] .status-badge,
[data-bs-theme="dark"] .icon-circle,
[data-bs-theme="dark"] .social-link,
[data-bs-theme="dark"] .today-row {
    background-color: rgba(125, 165, 245, 0.16);
}

[data-bs-theme="dark"] .specialties-badge {
    background-color: rgba(125, 165, 245, 0.16);
    color: #9dbcf7;
}

[data-bs-theme="dark"] .status-badge,
[data-bs-theme="dark"] .social-link,
[data-bs-theme="dark"] .today-row td:first-child {
    color: #9dbcf7;
}

/* Bootstrap's .bg-light stays literally light in dark mode; deepen it */
[data-bs-theme="dark"] .bg-light {
    background-color: #1a2132 !important;
}

[data-bs-theme="dark"] .table-light,
[data-bs-theme="dark"] .table-light th {
    --bs-table-bg: #1a2132;
    color: #dbe2ee;
}

/* Form validation: red, prominent error messages (Blazor emits .validation-message / .validation-errors) */
.validation-message {
    display: block;
    color: #dc3545;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

.validation-errors {
    margin: 0;
    padding-left: 1.25rem;
}

.validation-errors .validation-message {
    display: list-item;
    margin-top: 0;
}

[data-bs-theme="dark"] .validation-message {
    color: #f87171;
}

/* Sticky save bar on the account dashboard: keeps the one save button for the whole
   form visible no matter where on the long page the user is */
.save-bar {
    position: sticky;
    bottom: 0;
    z-index: 1020;
    background: var(--bs-body-bg, #fff);
    border: 1px solid var(--bs-border-color, rgba(0, 0, 0, 0.12));
    border-radius: 0.75rem 0.75rem 0 0;
    box-shadow: 0 -8px 20px rgba(15, 23, 42, 0.12);
    padding: 0.75rem 1.25rem;
    margin-top: 1.5rem;
}

/* Hover help icon next to form labels */
.help-icon {
    color: #94a3b8;
    font-size: 0.85em;
    margin-left: 0.15rem;
    cursor: help;
}

.help-icon:hover {
    color: #2563eb;
}
