html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html.theme-initializing body,
body.theme-initializing {
    visibility: hidden;
}

html.theme-light body,
body.theme-light {
    background-color: #ffffff;
}

html.theme-navy body,
body.theme-navy {
    background-color: #0b1a2d;
}

html.theme-purple body,
body.theme-purple {
    background-color: #1f1636;
}

html.theme-stealth body,
body.theme-stealth {
    background-color: #0f0f0f;
}

a, .btn-link {
    color: #006799;
}

.btn-primary {
    color: #fff;
    background-color: #006799;
    border-color: #1a395b;
}

body.theme-navy,
body.theme-purple,
body.theme-stealth {
    color: #e8edf3;
}

body.theme-navy h1,
body.theme-navy h2,
body.theme-navy h3,
body.theme-navy h4,
body.theme-navy h5,
body.theme-navy h6,
body.theme-stealth h1,
body.theme-stealth h2,
body.theme-stealth h3,
body.theme-stealth h4,
body.theme-stealth h5,
body.theme-stealth h6,
body.theme-navy li,
body.theme-stealth li,
body.theme-navy strong,
body.theme-stealth strong,
body.theme-navy em,
body.theme-stealth em,
body.theme-navy .form-check-label,
body.theme-stealth .form-check-label,
body.theme-navy .nav-link,
body.theme-purple h1,
body.theme-purple h2,
body.theme-purple h3,
body.theme-purple h4,
body.theme-purple h5,
body.theme-purple h6,
body.theme-purple li,
body.theme-purple strong,
body.theme-purple em,
body.theme-purple .form-check-label,
body.theme-purple .nav-link,
body.theme-stealth .nav-link {
    color: #f2f7fc;
}

body.theme-navy .card,
body.theme-purple .card,
body.theme-stealth .card {
    background-color: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.15);
}

body.theme-navy label,
body.theme-purple label,
body.theme-stealth label,
body.theme-navy .form-label,
body.theme-purple .form-label,
body.theme-stealth .form-label,
body.theme-navy td,
body.theme-purple td,
body.theme-stealth td,
body.theme-navy th,
body.theme-purple th,
body.theme-stealth th,
body.theme-navy p,
body.theme-purple p,
body.theme-stealth p,
body.theme-navy small,
body.theme-purple small,
body.theme-stealth small,
body.theme-navy span,
body.theme-purple span,
body.theme-stealth span {
    color: #e8edf3;
}

body.theme-navy .alert,
body.theme-purple .alert,
body.theme-stealth .alert {
    border-color: rgba(255,255,255,0.15);
}

body.theme-stealth .form-control,
body.theme-stealth .form-select {
    background-color: #1f1f1f;
    border-color: #4a4a4a;
}

body.theme-navy .table,
body.theme-purple .table,
body.theme-stealth .table {
    color: #e8edf3;
}

body.theme-navy .table > :not(caption) > * > *,
body.theme-purple .table > :not(caption) > * > *,
body.theme-stealth .table > :not(caption) > * > * {
    background-color: transparent;
    color: inherit;
    border-color: rgba(255,255,255,0.12);
}

body.theme-navy .form-control,
body.theme-navy .form-select,
body.theme-purple .form-control,
body.theme-purple .form-select,
body.theme-stealth .form-control,
body.theme-stealth .form-select {
    background-color: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.2);
    color: #e8edf3;
}

body.theme-navy select,
body.theme-purple select,
body.theme-stealth select {
    color: #e8edf3;
}

body.theme-navy select option,
body.theme-purple select option,
body.theme-stealth select option,
body.theme-navy .form-select option,
body.theme-purple .form-select option,
body.theme-stealth .form-select option {
    background-color: #1f2d3d;
    color: #f2f7fc;
}

body.theme-navy .form-control::placeholder,
body.theme-purple .form-control::placeholder,
body.theme-stealth .form-control::placeholder {
    color: #b8c5d1;
}

body.theme-navy .text-muted,
body.theme-purple .text-muted,
body.theme-stealth .text-muted {
    color: #d3deea !important;
}

body.theme-navy .text-secondary,
body.theme-purple .text-secondary,
body.theme-navy .text-body-secondary,
body.theme-purple .text-body-secondary,
body.theme-navy .small,
body.theme-purple .small,
body.theme-navy .form-text,
body.theme-purple .form-text,
body.theme-navy .connect-subtitle,
body.theme-purple .connect-subtitle {
    color: #e6eef8 !important;
}

body.theme-navy .card,
body.theme-purple .card {
    color: #eef4fb;
}

body.theme-navy .card h5,
body.theme-purple .card h5,
body.theme-navy .card div,
body.theme-purple .card div,
body.theme-navy .card p,
body.theme-purple .card p {
    color: #eef4fb;
}

body.theme-stealth .text-muted {
    color: #c8c8c8 !important;
}

body.theme-navy .btn-outline-secondary,
body.theme-purple .btn-outline-secondary,
body.theme-stealth .btn-outline-secondary {
    color: #dce7f2;
    border-color: #7d8ea3;
}

body.theme-navy .alert-danger,
body.theme-purple .alert-danger,
body.theme-stealth .alert-danger {
    color: #ffd9d9;
    background-color: rgba(185, 28, 28, 0.25);
    border-color: rgba(248, 113, 113, 0.45);
}

body.theme-navy .alert-warning,
body.theme-purple .alert-warning,
body.theme-stealth .alert-warning {
    color: #ffe9b0;
    background-color: rgba(180, 83, 9, 0.2);
    border-color: rgba(251, 191, 36, 0.4);
}

body.theme-navy .alert-success,
body.theme-purple .alert-success,
body.theme-stealth .alert-success {
    color: #d7ffe5;
    background-color: rgba(5, 150, 105, 0.2);
    border-color: rgba(52, 211, 153, 0.4);
}

body.theme-navy .btn-outline-secondary:hover,
body.theme-purple .btn-outline-secondary:hover,
body.theme-stealth .btn-outline-secondary:hover {
    background-color: rgba(255,255,255,0.12);
    color: #fff;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyY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jI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.book-grid {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(320px, 1fr);
    gap: 2rem;
}

/* Classic layout — 3-column: calendar | slots | contact form */
.book-classic-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 1.25rem;
}

.book-classic-logo {
    height: 48px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.book-classic-header-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding-left: 1.25rem;
    border-left: 2px solid rgba(0,0,0,0.12);
}

.book-classic-wrap {
    padding: 2rem;
}

@media (max-width: 600px) {
    .book-classic-wrap {
        padding: 1rem;
    }
}

.book-classic-grid {
    display: grid;
    grid-template-columns: minmax(240px, 300px) max-content 1fr;
    gap: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .book-classic-grid {
        grid-template-columns: minmax(240px, 300px) 1fr;
    }
}

@media (max-width: 600px) {
    .book-classic-grid {
        grid-template-columns: 1fr;
    }
}

.book-contact-pane {
    border-left: 1px solid rgba(0,0,0,0.08);
    padding-left: 1.5rem;
    animation: contact-slide-in 0.25s ease;
}

@keyframes contact-slide-in {
    from { opacity: 0; transform: translateX(12px); }
    to   { opacity: 1; transform: translateX(0); }
}

.book-selected-slot-label {
    font-size: 0.9rem;
    background: rgba(0,0,0,0.04);
    border-radius: 6px;
    padding: 6px 10px;
}

.book-title {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.book-meta {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.book-meeting-name {
    font-size: 1.1rem;
    font-weight: 700;
}

.book-meeting-host {
    color: #5b6571;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.book-meeting-length {
    color: #5b6571;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.book-public-notes {
    color: #4a5568;
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-header h5 {
    margin-bottom: 0;
}

.book-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.4rem;
}

.calendar-dow {
    text-align: center;
    font-weight: 600;
    opacity: 0.85;
}

.calendar-day {
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 8px;
    min-height: 40px;
    background-color: #fff;
    color: #1f2937;
}

.calendar-day.other-month {
    opacity: 0.45;
}

.calendar-day.unavailable {
    background-color: #f1f3f5;
    color: #9aa3ad;
    border-color: #d8dde3;
    cursor: not-allowed;
}

.calendar-day.available:hover {
    border-color: #006799;
}

.calendar-day.selected {
    border-color: #006799;
    background-color: #d8e7f4;
    color: #0d4c7e;
    font-weight: 700;
}

.calendar-pane,
.slots-pane {
    background-color: rgba(255,255,255,0.03);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 20px rgba(0,0,0,0.04);
}

.slot-btn {
    justify-content: center;
    font-weight: 600;
    min-height: 52px;
    border-radius: 12px;
    transition: all 0.15s ease-in-out;
}

.slot-btn:hover {
    transform: translateY(-1px);
}

.time-slots-grid {
    display: grid;
    grid-template-rows: repeat(7, auto);
    grid-auto-flow: column;
    grid-auto-columns: minmax(160px, 220px);
    gap: 0.6rem;
    overflow-x: auto;
    padding: 0.25rem;
}


.book-confirm-card {
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 24px rgba(0,0,0,0.06);
}

.book-step2-slot-summary {
    background: rgba(0,0,0,0.04);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 0.97rem;
}

/* Step 3 – Meeting Booked */
.book-booked-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 40px 24px;
    border-radius: 16px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 10px 28px rgba(0,0,0,0.07);
    animation: booked-fade-in 0.4s ease;
}

@keyframes booked-fade-in {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.book-booked-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 16px rgba(34,197,94,0.35);
}

.book-booked-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.book-booked-detail {
    font-size: 1rem;
    margin-bottom: 4px;
}

.book-booked-slot {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.book-booked-note {
    font-size: 0.88rem;
    opacity: 0.65;
    margin-bottom: 0;
}

.book-confirm-btn {
    min-width: 180px;
}

/* Inline spinner inside confirm buttons */
.btn-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: btn-spin 0.65s linear infinite;
    vertical-align: -0.15em;
    margin-right: 0.4em;
}

.btn-spinner.btn-spinner-dark {
    border-color: rgba(0,0,0,0.2);
    border-top-color: #333;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

body.theme-light .calendar-pane,
body.theme-light .slots-pane {
    background-color: #ffffff;
    border-color: rgba(26,57,91,0.15);
}

body.theme-navy .calendar-pane,
body.theme-navy .slots-pane,
body.theme-purple .calendar-pane,
body.theme-purple .slots-pane,
body.theme-stealth .calendar-pane,
body.theme-stealth .slots-pane {
    background-color: rgba(255,255,255,0.03);
    border-color: rgba(255,255,255,0.15);
}

body.theme-navy .book-meeting-length,
body.theme-purple .book-meeting-length,
body.theme-stealth .book-meeting-length {
    color: #c4d2e0;
}

body.theme-navy .book-confirm-card,
body.theme-purple .book-confirm-card,
body.theme-stealth .book-confirm-card {
    border-color: rgba(255,255,255,0.16);
    background-color: rgba(255,255,255,0.04);
}

body.theme-navy .book-step2-slot-summary,
body.theme-purple .book-step2-slot-summary,
body.theme-stealth .book-step2-slot-summary {
    background: rgba(255,255,255,0.06);
}

body.theme-navy .book-contact-pane,
body.theme-purple .book-contact-pane,
body.theme-stealth .book-contact-pane {
    border-left-color: rgba(255,255,255,0.12);
}

body.theme-navy .book-selected-slot-label,
body.theme-purple .book-selected-slot-label,
body.theme-stealth .book-selected-slot-label {
    background: rgba(255,255,255,0.06);
}

body.theme-navy .book-booked-indicator,
body.theme-purple .book-booked-indicator,
body.theme-stealth .book-booked-indicator {
    border-color: rgba(255,255,255,0.16);
    background-color: rgba(255,255,255,0.04);
}

body.theme-stealth .connect-page,
body.theme-stealth .connect-page .connect-subtitle,
body.theme-stealth .connect-page .card,
body.theme-stealth .connect-page .card div,
body.theme-stealth .connect-page .card strong,
body.theme-stealth .connect-page p {
    color: #f2f2f2;
}

body.theme-stealth,
body.theme-stealth * {
    color: #f2f2f2;
}

body.theme-stealth .text-warning {
    color: #f6c453 !important;
}

body.theme-stealth .text-success {
    color: #43d39e !important;
}

body.theme-stealth .text-danger {
    color: #ff7a7a !important;
}

body.theme-stealth .text-info {
    color: #5bc0ff !important;
}

body.theme-stealth .text-muted,
body.theme-stealth .small,
body.theme-stealth .form-text,
body.theme-stealth .table,
body.theme-stealth td,
body.theme-stealth th,
body.theme-stealth label,
body.theme-stealth p,
body.theme-stealth span,
body.theme-stealth .nav-link {
    color: #f2f2f2 !important;
}

body.theme-stealth .connect-page .card {
    background-color: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.22);
}

body.theme-navy .calendar-day,
body.theme-purple .calendar-day,
body.theme-stealth .calendar-day {
    background-color: rgba(255,255,255,0.06);
    border-color: rgba(255,255,255,0.2);
    color: #e8edf3;
}

body.theme-navy .calendar-day.unavailable,
body.theme-purple .calendar-day.unavailable,
body.theme-stealth .calendar-day.unavailable {
    background-color: rgba(255,255,255,0.03);
    color: #9aa3ad;
    border-color: rgba(255,255,255,0.1);
}

body.theme-navy .calendar-day.selected,
body.theme-purple .calendar-day.selected,
body.theme-stealth .calendar-day.selected {
    background-color: rgba(0, 103, 153, 0.35);
    color: #f2f7fc;
    border-color: #59a9db;
}

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

/* ── Availability loading spinner ── */
.availability-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 40px 20px;
}

.availability-loading .spinner-ring {
    width: 52px;
    height: 52px;
    border: 4px solid rgba(0, 103, 153, 0.18);
    border-top-color: #006799;
    border-radius: 50%;
    animation: spin-ring 0.85s linear infinite;
}

.availability-loading .spinner-label {
    font-size: 0.95rem;
    color: #006799;
    letter-spacing: 0.02em;
    animation: pulse-label 1.4s ease-in-out infinite;
}

@keyframes spin-ring {
    to { transform: rotate(360deg); }
}

@keyframes pulse-label {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.45; }
}

/* Dark theme overrides */
body.theme-navy .availability-loading .spinner-ring,
body.theme-purple .availability-loading .spinner-ring,
body.theme-stealth .availability-loading .spinner-ring {
    border-color: rgba(89, 169, 219, 0.2);
    border-top-color: #59a9db;
}

body.theme-navy .availability-loading .spinner-label,
body.theme-purple .availability-loading .spinner-label,
body.theme-stealth .availability-loading .spinner-label {
    color: #59a9db;
}