/* MIND - Global Styles */
/* Shared across all pages for consistent modern design matching index.html */

:root {
    /* Color Palette - Iris Gradient Theme */
    --color-primary: #6366f1; /* Indigo */
    --color-primary-light: #818cf8;
    --color-secondary: #8b5cf6; /* Purple */
    --color-accent: #ec4899; /* Pink */
    
    /* Slate Scale (Backgrounds & Text) */
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-300: #cbd5e1;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    
    /* Indigo Scale */
    --color-indigo-50: #eef2ff;
    --color-indigo-100: #e0e7ff;
    --color-indigo-500: #6366f1;
    --color-indigo-600: #4f46e5;
}

* {
    box-sizing: border-box;
}

html, body {
    font-family: 'Noto Sans', system-ui, -apple-system, sans-serif;
    background-color: var(--color-slate-50);
    color: var(--color-slate-900);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Prevent layout shift when auth nav renders */
#user-nav-desktop {
    min-width: 140px;
    display: inline-flex;
    justify-content: flex-start;
}

#user-nav-mobile {
    min-height: 48px;
}

/* Mobile-first responsive optimizations */
@media (max-width: 768px) {
    html, body {
        font-size: 14px; /* Slightly smaller base font on mobile */
        max-width: 100vw;
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
    
    /* Better mobile typography */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        hyphens: auto;
        line-height: 1.2;
    }
    
    p, span, div {
        word-wrap: break-word;
        line-height: 1.5;
    }
    
    /* Ensure buttons are touch-friendly */
    button, .button, a[role="button"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Prevent text from being too small on mobile */
    input, textarea, select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Footer mobile optimizations */
    footer {
        text-align: center;
        overflow-x: hidden;
    }
    
    /* Center footer content on mobile */
    footer .grid {
        text-align: center;
        gap: 2rem;
    }
    
    footer .grid > div {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    /* Center footer social links */
    footer .flex {
        justify-content: center;
    }
    
    /* Center footer trust badges */
    footer .flex.flex-wrap {
        justify-content: center;
    }
    
    /* Chat widget mobile optimizations */
    #iris-chat-widget {
        max-width: calc(100vw - 1rem);
    }
    
    #chat-window {
        max-width: calc(100vw - 1.5rem);
        width: 100%;
        right: 0.75rem;
    }
    
    /* Prevent any overflow on mobile */
    * {
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Specific mobile adjustments for chat interface */
    .scrollbar-hide {
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .scrollbar-hide::-webkit-scrollbar {
        display: none;
    }
}

/* --- Utilities from Index.html --- */

/* Custom Animations */
@keyframes blob {
    0% { transform: translate(0px, 0px) scale(1); }
    33% { transform: translate(30px, -50px) scale(1.1); }
    66% { transform: translate(-20px, 20px) scale(0.9); }
    100% { transform: translate(0px, 0px) scale(1); }
}

.animate-blob {
    animation: blob 7s infinite;
}

.animation-delay-2000 {
    animation-delay: 2s;
}

.animation-delay-4000 {
    animation-delay: 4s;
}

@keyframes scanline {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-scanline {
    animation: scanline 3s linear infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.blinking-cursor {
    animation: blink 1s infinite;
}

/* Smooth Transitions */
* {
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

button, a, .card-modern, .feature-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus Styles for Accessibility */
button:focus-visible, 
a:focus-visible, 
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--color-indigo-500);
    outline-offset: 2px;
}

/* Performance: GPU Acceleration for Animations */
.animate-blob,
.feature-card,
.animate-slide-up,
.nav-link,
.btn-loading {
    will-change: transform;
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Improve Text Rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Skeleton Loading States */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Print Styles */
@media print {
    .no-print,
    header,
    footer,
    .floating-action-buttons,
    #mobile-cta,
    #backToTop {
        display: none !important;
    }
}

/* Iris Gradients */
.bg-iris-gradient {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
}

.text-iris-gradient {
    background: linear-gradient(to right, #6366f1, #8b5cf6, #ec4899);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent; /* Fallback */
}

.border-iris-gradient {
    border-image: linear-gradient(to right, #6366f1, #8b5cf6, #ec4899) 1;
}

/* Glassmorphism Header */
.header-glass {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-indigo-100);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Desktop Navigation Visibility */
.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex !important;
        align-items: center;
        gap: 0.5rem;
    }
}

/* Navigation Links */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #4f46e5;
    background-color: #f8fafc;
}

.nav-link.active {
    color: #4f46e5;
    background-color: #eef2ff;
}

.nav-link-cta {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 700;
    color: white;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.nav-link-cta:hover {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transform: scale(1.05);
}

/* --- Components --- */

/* Cards */
.card-modern {
    background: white;
    border: 1px solid var(--color-indigo-50);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.card-modern:hover {
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.15), 0 8px 10px -6px rgba(99, 102, 241, 0.1);
    border-color: var(--color-indigo-100);
    transform: translateY(-2px);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    filter: brightness(110%);
}

.btn-outline {
    background: white;
    border: 1px solid var(--color-slate-200);
    color: var(--color-slate-600);
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-outline:hover {
    border-color: var(--color-indigo-500);
    color: var(--color-indigo-500);
    background-color: var(--color-indigo-50);
}

/* Navigation Links */
.nav-link {
    color: var(--color-slate-600);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    transition: all 0.2s;
    text-decoration: none;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-indigo-600);
    background-color: var(--color-indigo-50);
}

.nav-link-cta {
    color: white;
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    transition: all 0.2s;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.25);
}

.nav-link-cta:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
    transform: translateY(-1px);
}

.cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    height: 1.75rem;
    padding: 0 0.4rem;
    margin-left: 0.4rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    color: #ffffff;
    background-color: #0f172a;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.25);
}

button.nav-link {
    border: none;
    background: transparent;
    cursor: pointer;
}

.nav-link.cart-trigger {
    gap: 0.5rem;
    border: 1px solid var(--color-slate-200);
    background-color: #ffffff;
    font-weight: 600;
}

.nav-link.cart-trigger:hover {
    border-color: var(--color-indigo-100);
    background-color: var(--color-indigo-50);
}

.nav-link .cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    background-color: var(--color-indigo-50);
    color: var(--color-indigo-600);
}

/* Footer */
.footer-modern {
    background: white;
    border-top: 1px solid var(--color-indigo-50);
    color: var(--color-slate-600);
    padding: 3rem 1rem;
    margin-top: auto;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.animate-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

.animate-slide-up {
    animation: slideUp 0.4s ease-out forwards;
}

/* Search Inputs (Directory Style) */
.input-modern {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 1px solid var(--color-slate-200);
    border-radius: 9999px;
    background: white;
    color: var(--color-slate-900);
    transition: all 0.3s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.input-modern:focus {
    outline: none;
    border-color: var(--color-indigo-500);
    box-shadow: 0 0 0 4px var(--color-indigo-50);
}

/* Calendar Event Cards - Mobile Fixes */
@media (max-width: 768px) {
    /* Ensure event cards don't overflow on mobile */
    .card-modern {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Fix event card content wrapping */
    .card-modern .flex-grow {
        min-width: 0;
        overflow: hidden;
    }
    
    /* Ensure text truncates properly */
    .card-modern h3,
    .card-modern p,
    .card-modern span {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    
    /* Fix venue text overflow */
    .card-modern .truncate {
        max-width: 100%;
    }
}

/* ===================================
   Calendar Booking Page Styles
   =================================== */

/* Service Cards */
.service-card {
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -10px rgba(99, 102, 241, 0.3);
    border-color: var(--color-indigo-500) !important;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:active {
    transform: translateY(-2px) scale(0.98);
}

.service-card.selected {
    border-color: var(--color-indigo-600) !important;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    box-shadow: 0 8px 16px -6px rgba(99, 102, 241, 0.4);
}

/* Calendar Days */
.calendar-day {
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: white;
    border: 2px solid var(--color-slate-200);
}

.calendar-day:not(:disabled):hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px -4px rgba(99, 102, 241, 0.25);
    border-color: var(--color-indigo-500);
    background: var(--color-indigo-50);
    z-index: 10;
}

.calendar-day:not(:disabled):active {
    transform: scale(0.95);
}

.calendar-day.selected,
.calendar-day.active {
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-secondary) 100%);
    color: white !important;
    border-color: var(--color-indigo-600);
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.5);
    transform: scale(1.05);
}

.calendar-day.today {
    border-color: var(--color-indigo-600);
    border-width: 2px;
}

.calendar-day:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Time Slots */
.time-slot {
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: white;
    overflow: hidden;
}

.time-slot::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-secondary) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.time-slot span,
.time-slot {
    position: relative;
    z-index: 1;
}

.time-slot:hover {
    border-color: var(--color-indigo-500);
    background: var(--color-indigo-50);
    transform: scale(1.05);
    box-shadow: 0 4px 12px -4px rgba(99, 102, 241, 0.3);
}

.time-slot:active {
    transform: scale(0.95);
}

.time-slot.selected {
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-secondary) 100%);
    color: white !important;
    border-color: var(--color-indigo-600);
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.5);
    font-weight: 600;
}

.time-slot.selected::before {
    opacity: 1;
}

/* Slot Button (alternative naming) */
.slot-button {
    position: relative;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    background: white;
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--color-slate-200);
    border-radius: 0.75rem;
    font-weight: 600;
    color: var(--color-slate-700);
}

.slot-button:hover {
    border-color: var(--color-indigo-500);
    background: var(--color-indigo-50);
    transform: scale(1.05);
    box-shadow: 0 4px 12px -4px rgba(99, 102, 241, 0.3);
}

.slot-button:active {
    transform: scale(0.95);
}

.slot-button.active,
.slot-button.selected {
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-secondary) 100%);
    color: white;
    border-color: var(--color-indigo-600);
    box-shadow: 0 6px 16px -6px rgba(99, 102, 241, 0.5);
}

/* Loading Skeleton Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Step Indicators */
.step-indicator {
    transition: all 0.3s ease;
}

.step-indicator.active {
    border-color: var(--color-indigo-600);
    background: var(--color-indigo-50);
    color: var(--color-indigo-700);
}

.step-indicator.completed {
    background: linear-gradient(135deg, var(--color-indigo-500) 0%, var(--color-secondary) 100%);
    color: white;
    border-color: var(--color-indigo-600);
}

/* Mobile Optimizations for Calendar */
@media (max-width: 768px) {
    /* Larger touch targets */
    .service-card {
        padding: 1.5rem !important;
        min-height: 120px;
    }
    
    .calendar-day {
        min-height: 60px;
        font-size: 1.1rem;
    }
    
    .time-slot,
    .slot-button {
        min-height: 52px;
        font-size: 1rem;
        padding: 1rem;
    }
    
    /* Improve calendar grid spacing */
    #calendar-days {
        gap: 0.5rem !important;
    }
    
    #slot-grid {
        gap: 0.75rem !important;
    }
    
    /* Better step indicator visibility */
    .step-indicator {
        width: 2.5rem;
        height: 2.5rem;
        font-size: 1rem;
    }
    
    /* Improve form fields */
    input[type="text"],
    input[type="email"],
    textarea {
        font-size: 16px !important; /* Prevent iOS zoom */
        padding: 0.875rem 1rem;
    }
    
    /* Make submit button more prominent */
    button[type="submit"] {
        min-height: 56px;
        font-size: 1.1rem;
        padding: 1rem 2rem;
    }
}

/* Tablet Optimizations */
@media (min-width: 769px) and (max-width: 1024px) {
    .service-card {
        min-height: 140px;
    }
    
    .calendar-day {
        min-height: 70px;
    }
    
    .time-slot,
    .slot-button {
        min-height: 48px;
    }
}

/* Loading State Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner.fa-spin {
    animation: spin 1s linear infinite;
}

/* Form Status Messages */
#form-status,
#booking-status {
    transition: all 0.3s ease;
}

/* Success State */
.bg-green-50 {
    background-color: #f0fdf4;
}

.text-green-700 {
    color: #15803d;
}

/* Error State */
.bg-red-50 {
    background-color: #fef2f2;
}

.text-red-700 {
    color: #b91c1c;
}

/* Info State */
.bg-blue-50 {
    background-color: #eff6ff;
}

.text-blue-700 {
    color: #1d4ed8;
}

/* Admin website portal: ensure guide button readability */
#driveGuideBtn {
    background-color: var(--color-indigo-600);
    color: #ffffff;
}

#driveGuideBtn:hover {
    background-color: #4338ca;
}