/* --- 1. GLOBAL VARIABLES --- */
:root {
    --aura-primary: #58336e; /* Brand Purple */
    --aura-primary-hover: #452458;
    --aura-accent: #d4af37;
    
    --bg-surface: #ffffff;
    --bg-subtle: #f7f7f7;
    --text-main: #202223;
    --text-sub: #6d7175;
    --border-subtle: #e1e3e5;
    
    --radius-lg: 16px;
    --radius-md: 12px;
    --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
}

* { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    background-color: #050505; /* Deepest Black */
    background-image: none;    /* Remove old image if any */
    overflow-x: hidden;        /* Prevent scrollbars from glowing orbs */
    position: relative;
    width: 100%;
    min-height: 100vh;
}

.ambient-light {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1; /* Puts it behind everything */
    overflow: hidden;
    pointer-events: none;
    background: #000;
}

input, textarea, select, button { font-family: inherit; }

/* --- 2. LAYOUT & ANIMATIONS --- */
.login-body {
    position: relative; display: flex; align-items: center; justify-content: center;
    min-height: 100vh; padding: 20px; padding-bottom: 50px; overflow: hidden;
}
.orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.6; z-index: 0;
    animation: float 8s infinite alternate ease-in-out;
}
/* Orb 1: The Main Purple Aura */
.orb-1 {
    width: 70vmax;  /* Changed from vw to vmax */
    height: 70vmax;
    background: radial-gradient(circle, #58336e 0%, rgba(88, 51, 110, 0) 70%);
    top: -10%;
    left: -10%;
    animation-duration: 15s;
}

/* Orb 2: A Secondary Pink/Blue Accent */
.orb-2 {
    width: 60vmax; /* Changed from vw to vmax */
    height: 60vmax;
    background: radial-gradient(circle, #452458 0%, rgba(69, 36, 88, 0) 70%);
    bottom: -10%;
    right: -10%;
    animation-duration: 12s;
    animation-direction: reverse;
}

/* 4. The Animation (Slow Floating) */
@keyframes float {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.1); }
    66% { transform: translate(-10px, 20px) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* 5. Mobile Specific Tweak */
@media (max-width: 768px) {
    .orb-1 {
        top: -15%;
        left: -30%; /* Shift left to avoid covering text */
        opacity: 0.7; /* Brighter on mobile */
    }
    .orb-2 {
        bottom: -10%;
        right: -30%;
        opacity: 0.7;
    }
}

/* --- 3. COMPONENTS --- */
.card {
    background: var(--bg-surface); border-radius: var(--radius-lg);
    box-shadow: 0px 20px 40px rgba(0, 0, 0, 0.4); padding: 40px;
    width: 100%; max-width: 450px; position: relative; z-index: 10;
}

h1 { font-size: 1.6rem; font-weight: 700; margin: 0 0 8px 0; color: var(--text-main); }
.subtitle { color: var(--text-sub); font-size: 0.95rem; margin: 0 0 30px 0; }

.form-group { margin-bottom: 20px; text-align: left; }
.form-label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; color: var(--text-main); }

.input-wrapper {
    position: relative; display: flex; align-items: center;
    background: var(--bg-surface); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md); transition: all 0.2s var(--ease);
}
.input-wrapper:focus-within { border-color: var(--aura-primary); box-shadow: 0 0 0 1px var(--aura-primary); }

.prefix {
    background: var(--bg-subtle); color: var(--text-sub);
    padding: 12px 15px; font-size: 1rem; font-weight: 500;
    border-right: 1px solid var(--border-subtle); border-radius: var(--radius-md) 0 0 var(--radius-md);
    white-space: nowrap; user-select: none;
}

input, textarea, select {
    width: 100%; padding: 12px 15px; font-size: 1rem;
    border: none; background: transparent; color: var(--text-main); outline: none;
}
.glass-input {
    background: #f9f9f9; border: 1px solid #ddd; border-radius: var(--radius-md); width: 100%; padding: 12px 15px;
}
.glass-input:focus { border-color: var(--aura-primary); background: white; }

/* BUTTONS */
.btn {
    width: 100%; padding: 14px; font-size: 1rem; font-weight: 600;
    border: none; border-radius: var(--radius-md); cursor: pointer; transition: 0.2s;
}
.btn-primary { 
    background: var(--aura-primary); /* Purple */
    color: white; 
    margin-top: 10px;
}
.btn-primary:hover { background: var(--aura-primary-hover); transform: translateY(-1px); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary { background: transparent; color: var(--text-sub); margin-top: 15px; }
.btn-secondary:hover { color: var(--aura-primary); background: var(--bg-subtle); }

.btn-row { display: flex; gap: 10px; margin-top: 20px; }
#btn-verify { margin-bottom: 0px; }

/* --- LOGIN PAGE ICONS (Theme Fix) --- */

/* The Container for "Back to Website" and Icons */
.card-footer {
    margin-top: 30px;
    text-align: center;
}

/* "Back to Website" Link */
.back-link {
    text-decoration: none;
    color: #666;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    transition: 0.2s;
}
.back-link:hover {
    color: var(--aura-primary);
}

/* Social Icons Container */
.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
}

/* Individual Icons */
.social-links a {
    text-decoration: none;
    font-size: 1.5rem;
    color: #ccc; /* Default Grey */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid transparent; /* invisible border */
}

/* Hover Effect (Purple Glow) */
.social-links a:hover {
    color: var(--aura-primary); /* Purple Icon */
    background: rgba(88, 51, 110, 0.05); /* Light Purple Background */
    border-color: rgba(88, 51, 110, 0.2); /* Light Border */
    transform: translateY(-3px); /* Floating Effect */
}

/* --- 4. BOOKING WIZARD UI --- */
.progress-track { display: flex; align-items: center; justify-content: space-between; margin-bottom: 30px; padding: 0 10px; }
.step {
    width: 30px; height: 30px; border-radius: 50%; background: rgba(0,0,0,0.1); color: #ccc;
    display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.9rem;
}
.step.active { background: var(--aura-primary); color: white; box-shadow: 0 0 10px var(--aura-primary); }
.line { flex: 1; height: 2px; background: rgba(0,0,0,0.1); margin: 0 10px; }

.wizard-step { display: none; animation: fadeIn 0.4s ease; }
.wizard-step.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* Toggle Container */
.toggle-container { display: flex; background: #f0f0f0; border-radius: var(--radius-md); padding: 4px; margin-bottom: 25px; }
.toggle-btn { flex: 1; padding: 10px; border: none; background: transparent; color: #666; cursor: pointer; border-radius: var(--radius-md); font-weight: 500; }
.toggle-btn.active { background: white; color: black; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }

/* --- 5. BOXY SERVICE CARDS (SQUARE LOOK FIXED) --- */
.service-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin-top: 10px;
}
.service-card {
    position: relative; background: #fff; border: 1px solid #e0e0e0;
    /* Fixed: Use radius-md (12px) for boxy look, NOT 50px */
    border-radius: var(--radius-md); 
    padding: 20px 10px; height: 100px;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    cursor: pointer; transition: all 0.2s ease;
}
.service-card input { display: none; } 

.service-card .icon-box { font-size: 1.5rem; color: #aaa; transition: 0.2s; }
.service-card span { font-size: 0.95rem; font-weight: 500; color: #666; }

/* Selected State */
.service-card:has(input:checked) {
    border: 2px solid var(--aura-primary);
    background: #fbf9fc; /* Light Purple Tint */
    box-shadow: 0 4px 10px rgba(88, 51, 110, 0.15);
}
.service-card:has(input:checked) .icon-box { color: var(--aura-primary); transform: scale(1.1); }
.service-card:has(input:checked) span { color: var(--aura-primary); font-weight: 700; }

/* Icon Swap */
.service-card .ph-check { display: none; }
.service-card:has(input:checked) .ph-plus { display: none; }
.service-card:has(input:checked) .ph-check { display: block; }

/* --- 6. MEMBER VERIFICATION (Green Theme) --- */
.member-success-card {
    background-color: #e8f8f0; border: 1px solid #2ecc71;
    border-radius: 16px; padding: 25px 20px; text-align: center; margin-bottom: 25px;
}
.member-success-card .icon-circle {
    width: 45px; height: 45px; border-radius: 50%; border: 2px solid #2ecc71;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 10px auto; color: #2ecc71; font-size: 1.4rem;
}
.member-success-card h3 { color: #2ecc71; font-size: 1.3rem; font-weight: 700; margin: 5px 0; }
.member-success-card p { color: #2ecc71; font-size: 1rem; margin: 0 0 15px 0; font-family: monospace; opacity: 0.9; }
.member-success-card .change-link {
    color: #555; text-decoration: underline; font-size: 0.85rem;
    cursor: pointer; background: none; border: none; padding: 0;
}

/* --- 7. PREMIUM CALENDAR (Purple Theme) --- */
.flatpickr-calendar {
    font-family: inherit; border: none !important; border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important; overflow: hidden;
}
.flatpickr-months {
    background: var(--aura-primary) !important; padding: 15px 0;
}
/* Header Text Color (White) */
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-current-month input.cur-year {
    color: #fff !important; font-weight: 700;
}
/* ARROW FIX */
.flatpickr-prev-month svg, .flatpickr-next-month svg { fill: #fff !important; }

/* *** CRITICAL FIX FOR MONTH DROPDOWN *** */
/* This forces the list items inside the dropdown to be black on white */
.flatpickr-current-month .flatpickr-monthDropdown-months option {
    color: #000 !important;
    background-color: #fff !important;
}

.flatpickr-weekdays {
    background: var(--aura-primary) !important; border-bottom: 1px solid rgba(255,255,255,0.1);
}
span.flatpickr-weekday { color: rgba(255,255,255,0.8) !important; font-weight: 500; }

.flatpickr-day {
    color: #333 !important; font-weight: 500; border-radius: 8px !important; margin-top: 5px;
}
.flatpickr-day.selected, .flatpickr-day.startRange, .flatpickr-day.endRange {
    background: var(--aura-primary) !important; color: #fff !important;
    border-color: var(--aura-primary) !important; font-weight: bold;
    box-shadow: 0 4px 10px rgba(88, 51, 110, 0.3);
}
.flatpickr-day.flatpickr-disabled, 
.flatpickr-day.flatpickr-disabled:hover {
    color: #d1d1d1 !important; background: transparent !important; border-color: transparent !important; cursor: default;
}

/* --- 8. PILLS & LOCATIONS --- */
/* This matches the "I'm New / Member" style exactly */
.location-grid { 
    display: flex; 
    background: #f0f0f0; /* Grey Container */
    padding: 4px; 
    border-radius: 12px; 
    gap: 0; /* No gap, padding handles spacing */
    margin: 20px 0; 
}

.loc-card { flex: 1; position: relative; cursor: pointer; }
.loc-card input { display: none; }

.loc-card .card-content { 
    padding: 10px; 
    text-align: center; 
    border-radius: 8px; 
    font-size: 0.9rem; 
    font-weight: 500; 
    color: #666; 
    transition: 0.2s; 
    background: transparent; /* Transparent by default */
    border: none;
}

/* Active State: White Box with Shadow (Like Top Buttons) */
.loc-card input:checked + .card-content { 
    background: #fff; 
    color: #000; 
    font-weight: 700; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
    border: none;
}

/* Pill Container (Referral) - Keeping this as is */
.pill-container { display: flex; gap: 10px; margin-bottom: 15px; }
.pill-btn {
    border: 1px solid #ddd; background: #fff; color: #666;
    padding: 8px 20px; border-radius: 50px; font-size: 0.9rem;
    cursor: pointer; display: flex; align-items: center; gap: 6px;
}
.pill-btn.active { background: rgba(88, 51, 110, 0.1); border-color: var(--aura-primary); color: var(--aura-primary); font-weight: 600; }

/* --- 9. CONFIRMATION RECEIPT --- */
.receipt-card {
    background: #f9f9f9; border: 1px dashed #ccc; border-radius: 12px;
    padding: 20px; margin: 20px 0; text-align: left; font-size: 0.9rem;
}
.receipt-row {
    display: flex; justify-content: space-between; margin-bottom: 10px;
    border-bottom: 1px solid #eee; padding-bottom: 8px;
}
.receipt-row:last-child { border-bottom: none; margin-bottom: 0; }
.receipt-label { color: #666; font-weight: 500; }
.receipt-val { font-weight: 700; color: #333; text-align: right; }
.receipt-val.purple { color: var(--aura-primary); }
.success-icon { font-size: 4rem; color: #2ecc71; margin-bottom: 20px; }

/* Checkbox Row (Address) */
.checkbox-row {
    display: flex; align-items: center; gap: 10px; background: #f8f8f8; padding: 12px;
    border-radius: 8px; margin-bottom: 10px; cursor: pointer; border: 1px solid transparent;
}
.checkbox-row.checked { background: rgba(88, 51, 110, 0.05); border-color: var(--aura-primary); }
.checkbox-row input { accent-color: var(--aura-primary); width: 18px; height: 18px; }
.checkbox-row span { font-size: 0.9rem; color: #333; font-weight: 500; }


/* --- TIME SLOTS (Grid of Buttons) --- */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 Columns */
    gap: 10px;
    margin-top: 15px;
    max-height: 300px; /* Scrollable if too many */
    overflow-y: auto;
    padding-right: 5px; /* Space for scrollbar */
}

.slot {
    padding: 12px 5px;
    text-align: center;
    border-radius: 8px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    color: #555;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.slot:hover {
    border-color: var(--aura-primary);
    color: var(--aura-primary);
}

.slot.selected {
    background: var(--aura-primary);
    color: #fff;
    border-color: var(--aura-primary);
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(88, 51, 110, 0.2);
}