/* TreeTop Challenge Booking Portal - Custom Styles */

/* Base Styles */
html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
}

/* Desktop Styles - AppBar is fixed */
@media (min-width: 769px) {
    .booking-logo {
        height: 190px;
        object-fit: contain;
    }

    .booking-main-content {
        padding-top: 166px;
    }
}

/* Mobile-First Responsive Improvements */
@media (max-width: 768px) {
    /* Ensure content is readable on mobile */
    body {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    /* Make app bar scroll on mobile instead of being fixed */
    .booking-appbar {
        position: relative !important;
        height: 80px !important;
    }

    /* Remove top padding from main content on mobile */
    .booking-main-content {
        padding-top: 0 !important;
    }

    /* Make logo smaller on mobile */
    .booking-logo {
        height: 80px !important;
        object-fit: contain;
    }

    /* Reduce padding on booking container (outer MudPaper) */
    .booking-container {
        padding: 12px !important; /* Override pa-6 (24px) with smaller padding */
        border-radius: 8px !important; /* Slightly smaller radius too */
    }

    /* Stack hero text better on mobile */
    .mud-stack.text-center {
        padding: 1rem !important;
    }

    /* Make buttons touch-friendly */
    .mud-button-root {
        min-height: 44px;
        min-width: 44px;
    }

    /* Improve stepper on mobile */
    .booking-stepper .mud-stepper-header {
        flex-wrap: wrap;
    }

    /* Better spacing on mobile */
    .mud-grid-item {
        padding: 8px !important;
    }
}

/* Stepper Enhancements */
.booking-stepper {
    background: transparent;
}

.booking-stepper .mud-stepper-content {
    padding: 1rem 0;
}

/* Hide default stepper action buttons (we use custom buttons in each step) */
.booking-stepper .mud-stepper-actions {
    display: none;
}

/* Card and Paper Enhancements */
.mud-paper {
    transition: all 0.3s ease;
}

/* Button Enhancements */
.mud-button-filled-primary {
    box-shadow: 0 2px 4px rgba(46, 125, 50, 0.2);
}

.mud-button-filled-primary:hover {
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.3);
}

/* Form Input Enhancements */
.mud-input-outlined {
    background-color: white;
}

/* Loading and Transition States */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero Section */
.hero-gradient {
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
}

/* Icon Enhancements */
.mud-icon-root {
    transition: transform 0.2s ease;
}

.mud-icon-root:hover {
    transform: scale(1.1);
}

/* Timeline Improvements */
.mud-timeline-item-content {
    padding-bottom: 1.5rem;
}

/* Ensure touch targets are appropriate size */
.mud-icon-button {
    min-height: 44px;
    min-width: 44px;
}

/* Improve readability */
.mud-typography-body1,
.mud-typography-body2 {
    line-height: 1.6;
}

/* Error UI */
#blazor-error-ui {
    background: #fee;
    bottom: 0;
    box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.75rem 1rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 0.75rem;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States for Accessibility */
.mud-button-root:focus-visible,
.mud-input-root:focus-visible {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
    .mud-appbar {
        min-height: 56px !important;
    }
}

/* FIX: MudBlazor DatePicker calendar grid wrapping issue
   The 2px margin on each day makes buttons too wide, causing only 6 to fit per row instead of 7 */
.mud-picker-calendar .mud-day {
    margin: -1px !important;
}
