/* muse-reservation-system/public/assets/css/style.css */

/* ==========================================================================
   Shadcn/Notion Minimalist Theme
   ========================================================================== */
:root {
    /* Base Colors - HSL (Zinc/Slate Tone) */
    --background: 0 0% 100%;
    --foreground: 240 10% 3.9%;

    --card: 0 0% 100%;
    --card-foreground: 240 10% 3.9%;

    --popover: 0 0% 100%;
    --popover-foreground: 240 10% 3.9%;

    --primary: 240 5.9% 10%;
    /* Zinc 900 - Almost Black */
    --primary-foreground: 0 0% 98%;

    --secondary: 240 4.8% 95.9%;
    /* Zinc 100 */
    --secondary-foreground: 240 5.9% 10%;

    --muted: 240 4.8% 95.9%;
    --muted-foreground: 240 3.8% 46.1%;

    --accent: 240 4.8% 95.9%;
    --accent-foreground: 240 5.9% 10%;

    --destructive: 0 84.2% 60.2%;
    --destructive-foreground: 0 0% 98%;

    --border: 240 5.9% 90%;
    --input: 240 5.9% 90%;
    --ring: 240 5.9% 10%;

    --radius: 0.5rem;

    /* Font Settings */
    --bs-body-font-family: 'LINESeedSansTH', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --bs-body-color: hsl(var(--foreground));
    --bs-body-bg: hsl(var(--background));

    /* Custom Switch Color (Black/Dark for Minimalist) */
    --switch-active-bg: #18181b;
    /* Zinc 900 */
    --switch-active-border: #18181b;
}

/* ── Global Utilities (Replaces Inline Styles) ───────────────────────── */
.mix-blend-multiply {
    mix-blend-mode: multiply;
}

.max-w-600 {
    max-width: 600px;
}

/* ── Calendar Legends ────────────────────────────────────────────────── */
.legend-color-general {
    background-color: #f59e0b;
}

.legend-color-indoor {
    background-color: #3b82f6;
}

.legend-color-outdoor {
    background-color: #10b981;
}

.legend-color-special {
    background-color: #8b5cf6;
}

body {
    background-color: #ffffff;
    /* Pure White */
    color: var(--bs-body-color);
}

/* Notion-like Selection */
::selection {
    background: #e3e3e3;
    /* Light gray selection */
    color: #000;
}

/* ==========================================================================
   Global Reset & Typography
   ========================================================================== */
/* Font: LINE Seed Sans TH */
@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../fonts/LINESeedSansTH_W_Rg.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../fonts/LINESeedSansTH_W_Bd.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../fonts/LINESeedSansTH_W_Th.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../fonts/LINESeedSansTH_W_XBd.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
}

@font-face {
    font-family: 'LINESeedSansTH';
    src: url('../fonts/LINESeedSansTH_W_He.woff2') format('woff2');
    font-weight: 900;
    font-style: normal;
}

body {
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* ==========================================================================
   Components Overrides
   ========================================================================== */

/* Navbar - Minimalist */
.navbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e4e4e7;
    box-shadow: none !important;
}

.navbar-brand {
    font-weight: 700;
    letter-spacing: normal;
    color: #000000 !important;
}

.navbar-brand img {
    height: 70px;
    transition: height 0.3s ease;
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 50px;
    }

    .navbar {
        padding-top: 0.25rem !important;
        padding-bottom: 0.25rem !important;
    }
}

.nav-link {
    color: #71717a !important;
    /* Zinc 500 */
    font-weight: 500;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #18181b !important;
    /* Zinc 900 */
}

/* Cards - Flat Notion style */
.card {
    background-color: #ffffff;
    color: hsl(var(--card-foreground));
    border: 1px solid #e4e4e7;
    /* Zinc 200 */
    border-radius: var(--radius);
    box-shadow: none;
    /* No shadow by default for Notion look */
    transition: all 0.2s ease;
}

.card:hover {
    border-color: #a1a1aa;
    /* Zinc 400 on hover */
}

/* Selected Card State - minimalist heavy border or subtle bg */
.card.border-primary {
    border-color: #18181b !important;
    /* Black border */
    border-width: 1px !important;
    background-color: #fafafa;
    /* Very slight gray bg */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid #f4f4f5;
    padding: 1.5rem 1.5rem 1rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
    /* Reverting padding to standard */
}

/* Switches Overrides - Minimalist Black (iOS Style - Thinner) */
.form-check.form-switch .form-check-input {
    width: 2.5rem;
    height: 1.15rem;
    /* Reduced height for thinner look */
    margin-top: 0.25rem;
    /* Visual alignment */
    background-color: #e4e4e7;
    /* Inactive Track (Gray) */
    border-color: #e4e4e7;
    /* White Knob SVG */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-size: 0.9rem;
    /* Smaller knob to fit height */
    background-position: 0.125rem center;
    /* Offset for 'off' state */
    border-radius: 2rem;
    transition: background-position 0.2s ease-in-out, background-color 0.2s ease;
    cursor: pointer;
}

/* Fix Specificity: Ensure checked state overrides the base class */
.form-check.form-switch .form-check-input:checked {
    background-color: var(--switch-active-bg);
    /* Active Track (Black) */
    border-color: var(--switch-active-border);
    /* Keep same white knob */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23ffffff'/%3e%3c/svg%3e");
    background-position: calc(100% - 0.125rem) center;
    /* Offset for 'on' state */
}

.form-check-input:focus {
    border-color: #a1a1aa;
    box-shadow: none;
}

/* Buttons - Minimalist */
.btn {
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius);
    padding: 0.5rem 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: none;
    letter-spacing: 0.01em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-lg {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
}

.btn-primary {
    background-color: #18181b;
    /* Zinc 900 */
    color: #ffffff;
    border-color: #27272a;
}

/* Selection Cards (Grade Level Breakdown) */
.selection-card {
    border: 1px solid #e4e4e7;
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
    background-color: #fff;
}

body.index-body {
    background-color: #f8f9fa;
}

body.booking-body {
    background-color: #f8f9fc;
    background-image: radial-gradient(#cbd5e1 1.5px, transparent 1.5px);
    background-size: 32px 32px;
    background-position: 0 0;
    color: #333;
}

.auth-body {
    background-color: #f8f9fa;
}

.selection-card:hover {
    border-color: #a1a1aa;
    background-color: #fafafa;
}

.selection-card.active {
    border-color: #18181b;
    /* Active black selection */
    box-shadow: 0 0 0 1px #18181b;
    background-color: #fafafa;
}

.selection-card .form-check-input {
    margin-top: 0.3em;
}

.selection-card label {
    cursor: pointer;
    width: 100%;
}

.btn-primary:hover {
    background-color: #27272a;
    /* Zinc 800 */
    border-color: #27272a;
}

.btn-outline-secondary {
    border-color: #e4e4e7;
    color: #18181b;
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: #f4f4f5;
    color: #000;
    border-color: #e4e4e7;
}

/* Inputs */
.form-control,
.form-select {
    border-color: #e4e4e7;
    border-radius: var(--radius);
    background-color: transparent;
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    color: #18181b;
    min-height: 42px;
    /* Enforce consistent height */
}

.form-control:focus,
.form-select:focus {
    border-color: #18181b;
    box-shadow: 0 0 0 1px #18181b;
    /* Hard distinct ring */
}

/* Utilities */
.text-muted {
    color: #71717a !important;
    /* Zinc 500 */
}

.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

.badge.bg-secondary {
    background-color: #f4f4f5 !important;
    color: #18181b !important;
    border: 1px solid #e4e4e7;
}

/* Wizard - Modern Compact Checkout-style Stepper */
.bs-stepper-header {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e4e4e7;
    position: relative;
}

/* Each step trigger: full-width column layout */
.step-trigger {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 0 0.25rem;
    color: #a1a1aa;
    background: none;
    border: none;
    text-align: center;
    transition: all 0.3s ease;
    opacity: 0.55;
    text-decoration: none;
    position: relative;
    cursor: default !important;
}

/* Connecting line between steps */
.step-trigger:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 1.3125rem;
    /* half of 2.625rem circle */
    left: calc(50% + 1.375rem);
    right: calc(-50% + 1.375rem);
    height: 1.5px;
    background-color: #e4e4e7;
    transition: background-color 0.3s ease;
    z-index: 0;
}

.step-trigger.filled:not(:last-child)::after {
    background-color: #18181b;
}

.step-trigger:hover {
    opacity: 0.75;
}

.step-trigger.active {
    color: #18181b;
    opacity: 1;
}

.step-trigger.filled {
    color: #18181b;
    opacity: 0.9;
}

/* Circle: small, round */
.bs-stepper-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.625rem;
    height: 2.625rem;
    border-radius: 50%;
    background-color: #f4f4f5;
    color: #a1a1aa;
    margin-right: 0;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    border: 1.5px solid #e4e4e7;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1;
}

.step-trigger.active .bs-stepper-circle {
    background-color: #18181b;
    color: #fff;
    border-color: #18181b;
    box-shadow: 0 0 0 3px rgba(24, 24, 27, 0.12);
}

.step-trigger.filled .bs-stepper-circle {
    background-color: #18181b;
    color: #fff;
    border-color: #18181b;
}

.bs-stepper-label {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bs-stepper-title {
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.3;
    color: inherit;
    white-space: nowrap;
}

/* Hide subtitle — too cramped with 5 steps */
.bs-stepper-subtitle {
    display: none;
}

/* Responsive: stack icons 2-per-row on mobile */
@media (max-width: 575px) {
    .bs-stepper-header {
        flex-wrap: wrap;
        gap: 0.75rem 0;
        justify-content: flex-start;
        padding-bottom: 1rem;
    }

    .step-trigger {
        width: 33.33%;
        flex: none;
        opacity: 0.5;
        padding: 0.25rem 0;
    }

    .step-trigger.active {
        opacity: 1;
    }

    /* No connecting lines on mobile */
    .step-trigger::after {
        display: none;
    }

    .bs-stepper-circle {
        width: 1.875rem;
        height: 1.875rem;
        font-size: 0.85rem;
        margin-bottom: 0.35rem;
    }

    .bs-stepper-title {
        font-size: 0.65rem;
        white-space: normal;
        text-align: center;
        max-width: 5rem;
    }
}


/* Choices.js Custom Styling */
.choices__inner {
    background-color: #fff;
    border: 1px solid #e4e4e7;
    border-radius: var(--radius);
    padding: 0 0.75rem;
    /* Remove vertical padding to let flex align it */
    min-height: 42px;
    /* Enforce exact height */
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.choices[data-type*="select-one"] .choices__inner {
    padding-bottom: 0;
    /* Remove extra padding */
}

.choices.is-focused .choices__inner {
    border-color: #18181b;
    box-shadow: 0 0 0 1px #18181b;
}

.btn-primary,
.btn-booking-cta {
    background-color: #18181b !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px -2px rgba(0, 0, 0, 0.12), 0 2px 6px -1px rgba(0, 0, 0, 0.08);
}

.btn-primary:hover,
.btn-booking-cta:hover {
    background-color: #27272a !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15), 0 4px 6px -2px rgba(0, 0, 0, 0.1);
}

.btn-primary:active,
.btn-booking-cta:active {
    transform: translateY(0);
}

.btn-outline-secondary:hover {
    background-color: #f4f4f5;
    color: #000;
    border-color: #18181b;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.btn-outline-secondary:active {
    transform: translateY(0);
}

.choices__list--dropdown {
    border: 1px solid #e4e4e7;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    margin-top: 4px;
    padding: 4px;
    z-index: 1000;
}

.choices__list--dropdown .choices__item {
    border-radius: 4px;
    font-size: 0.875rem;
    padding: 8px 12px;
    margin-bottom: 2px;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #f4f4f5;
    color: #18181b;
}

.choices__list--dropdown .choices__item--selectable::after {
    display: none;
}

.choices__list--dropdown .choices__item--selectable.is-selected {
    background-color: transparent;
    color: #18181b;
    font-weight: 500;
    position: relative;
    padding-right: 30px;
}

.choices__list--dropdown .choices__item--selectable.is-selected::after {
    content: '✓';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: bold;
    display: block;
    color: #18181b;
}

/* Adjust flatpickr z-index if needed */
.flatpickr-calendar {
    z-index: 1050;
}


.flatpickr-day.today {
    border-color: #18181b !important;
}

.flatpickr-day.today:hover {
    background: #18181b !important;
    color: #fff !important;
}

/* Monochrome Overrides for SweetAlert2 */
div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm {
    background-color: #18181b !important;
    border-color: #18181b !important;
    box-shadow: 0 0 0 0 transparent !important;
}

div:where(.swal2-container) button:where(.swal2-styled).swal2-confirm:focus {
    box-shadow: 0 0 0 2px rgba(24, 24, 27, 0.5) !important;
}

/* Ensure Choices.js Radius matches exactly */
.choices__inner,
.choices__list--dropdown {
    border-radius: var(--radius) !important;
}

/* ==========================================================================
   Mobile Offcanvas Menu Styles
   ========================================================================== */
.offcanvas-mobile-menu {
    border-left: 1px solid #e4e4e7;
    width: 280px !important;
}

.offcanvas-mobile-menu .offcanvas-header {
    border-bottom: 1px solid #f4f4f5;
    padding: 1.5rem;
}

.offcanvas-mobile-menu .offcanvas-title {
    font-weight: 800;
    letter-spacing: normal;
}

.offcanvas-mobile-menu .offcanvas-body {
    padding: 1.5rem;
}

.offcanvas-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.offcanvas-nav-item {
    margin-bottom: 0.5rem;
}

.offcanvas-nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: #3f3f46 !important;
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.offcanvas-nav-link i {
    font-size: 1.25rem;
    margin-right: 1rem;
    color: #71717a;
    transition: color 0.2s ease;
}

.offcanvas-nav-link:hover,
.offcanvas-nav-link.active {
    background-color: #f4f4f5;
    color: #18181b !important;
}

.offcanvas-nav-link:hover i,
.offcanvas-nav-link.active i {
    color: #18181b;
}

.offcanvas-cta-wrapper {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #f4f4f5;
}

.offcanvas-cta-btn {
    width: 100%;
    justify-content: center;
    padding: 0.875rem !important;
    font-size: 1rem !important;
}

/* Ensure navbar-toggler looks clean */
.navbar-toggler {
    border: none !important;
    padding: 0.5rem !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

@media (max-width: 991.98px) {
    .navbar .container {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

@media (min-width: 992px) {
    .offcanvas-mobile-menu {
        display: none !important;
    }
}

/* Icon Utilities */
.spin {
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Responsive Border Utilities */
@media (min-width: 768px) {
    .border-md-end {
        border-right: 1px solid #e2e8f0 !important;
    }
}

@media (max-width: 767.98px) {
    .border-sm-bottom {
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 1rem !important;
    }
}

/* Premium Loading Overlay */
#premium-loading-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    transition: opacity 0.3s ease;
    opacity: 0;
}

.premium-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #f1f1f1;
    border-top-color: #000;
    border-radius: 50%;
    animation: premium-spin 0.8s linear infinite;
}

.premium-loading-text {
    text-align: center;
}

.premium-loading-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #18181b;
    margin-bottom: 0.25rem;
}

.premium-loading-description {
    font-size: 0.9rem;
    color: #71717a;
}

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