/* ========================================
   Rural Tours - Modern Booking Interface
   Fresh, Light, User-Friendly Design
   ======================================== */

:root {
    /* Primary Palette - Warm Nature-inspired */
    --primary: #059669;
    --primary-dark: #047857;
    --primary-light: #34d399;
    --primary-soft: #d1fae5;
    
    /* Secondary - Warm Accent */
    --secondary: #f59e0b;
    --secondary-light: #fcd34d;
    --secondary-soft: #fef3c7;
    
    /* Accent */
    --accent: #7c3aed;
    --accent-light: #a78bfa;
    --accent-soft: #ede9fe;
    
    /* Neutral Scale */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Status Colors */
    --success: #10b981;
    --success-soft: #d1fae5;
    --warning: #f59e0b;
    --warning-soft: #fef3c7;
    --danger: #ef4444;
    --danger-soft: #fee2e2;
    --info: #3b82f6;
    --info-soft: #dbeafe;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-glow: 0 0 20px rgb(5 150 105 / 0.3);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 350ms ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--primary-soft) 50%, var(--secondary-soft) 100%);
    min-height: 100vh;
    color: var(--gray-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Skip Link (Accessibility) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: var(--space-md) var(--space-xl);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    font-weight: 500;
    text-decoration: none;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus {
    top: 0;
}

/* ========================================
   LAYOUT
   ======================================== */

.booking-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-xl);
}

.booking-header {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--gray-500);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: var(--space-lg);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--primary);
}

.back-link i {
    transition: transform var(--transition-fast);
}

.back-link:hover i {
    transform: translateX(-4px);
}

.brand-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    background: var(--white);
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--space-lg);
}

.brand-badge i {
    color: var(--primary);
    font-size: 1.25rem;
}

.brand-badge span {
    font-weight: 600;
    color: var(--gray-700);
}

.booking-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
    line-height: 1.2;
}

.booking-header p {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   PROGRESS STEPS
   ======================================== */

.progress-steps {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
    margin-bottom: var(--space-2xl);
    padding: 0 var(--space-md);
}

.step {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-lg);
    background: var(--white);
    border-radius: var(--radius-full);
    box-shadow: var(--shadow-sm);
    opacity: 0.5;
    transition: all var(--transition-base);
}

.step.active {
    opacity: 1;
    background: var(--primary);
    color: white;
}

.step.completed {
    opacity: 1;
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.step-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: currentColor;
    color: inherit;
    border-radius: var(--radius-full);
    font-size: 0.875rem;
    font-weight: 600;
}

.step.active .step-number {
    background: rgba(255,255,255,0.2);
}

.step-label {
    font-weight: 500;
    font-size: 0.875rem;
    display: none;
}

@media (min-width: 640px) {
    .step-label {
        display: block;
    }
}

/* ========================================
   MAIN BOOKING CARD
   ======================================== */

.booking-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.booking-card-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--space-xl);
    text-align: center;
}

.booking-card-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.booking-card-header p {
    opacity: 0.9;
    font-size: 0.95rem;
}

.booking-card-body {
    padding: var(--space-2xl);
}

/* ========================================
   STEP CONTENT
   ======================================== */

.step-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.step-content.active {
    display: block;
}

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

.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.step-subtitle {
    color: var(--gray-500);
    margin-bottom: var(--space-xl);
}

/* ========================================
   SERVICE CARDS
   ======================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    position: relative;
    background: var(--gray-50);
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    cursor: pointer;
    transition: all var(--transition-base);
}

.service-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.service-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.service-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.service-card p {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin-bottom: var(--space-md);
}

.service-meta {
    display: flex;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.service-meta-item {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.service-meta-item i {
    color: var(--primary);
}

.service-price {
    margin-top: var(--space-md);
    padding-top: var(--space-md);
    border-top: 1px solid var(--gray-200);
}

.service-price .price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.service-price .price span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gray-500);
}

/* ========================================
   CALENDAR
   ======================================== */

.calendar-wrapper {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
}

.calendar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-lg);
}

.calendar-nav {
    display: flex;
    gap: var(--space-sm);
}

.calendar-nav button {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--white);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-sm);
}

.calendar-nav button:hover {
    background: var(--primary);
    color: white;
}

.calendar-month-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: var(--space-sm);
}

.calendar-weekday {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-400);
    text-transform: uppercase;
    padding: var(--space-sm);
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--white);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    border-color: var(--primary-light);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.calendar-day.available::after {
    content: '';
    position: absolute;
    bottom: 6px;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

.calendar-day.selected.available::after {
    background: white;
}

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

.calendar-day.empty {
    background: transparent;
    cursor: default;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.95rem;
}

/* ========================================
   TIME SLOTS
   ======================================== */

.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: var(--space-md);
}

.slot-card {
    position: relative;
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slot-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.slot-card.selected {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.slot-card.selected::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

.slot-time {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1rem;
}

.slot-availability {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: var(--space-xs);
}

.slot-card.selected .slot-availability {
    color: var(--primary-dark);
}

/* ========================================
   FORM STYLES
   ======================================== */

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-lg);
}

.form-group {
    margin-bottom: var(--space-lg);
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: block;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.form-label span {
    color: var(--danger);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: inherit;
    background: var(--white);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--gray-300);
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236b7280'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.form-hint {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-top: var(--space-xs);
}

.form-input-wrapper {
    position: relative;
}

.form-input-icon {
    position: absolute;
    left: var(--space-md);
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    pointer-events: none;
}

.form-input.with-icon {
    padding-left: 44px;
}

/* Checkbox */
.form-checkbox-wrapper {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: background var(--transition-fast);
}

.form-checkbox-wrapper:hover {
    background: var(--primary-soft);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    accent-color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.form-checkbox:checked {
    border-color: var(--primary);
}

.form-checkbox-label {
    font-size: 0.95rem;
    color: var(--gray-700);
    cursor: pointer;
}

.form-checkbox-label a {
    color: var(--primary);
    font-weight: 500;
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: 1rem;
    font-weight: 600;
    font-family: inherit;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px -1px rgb(5 150 105 / 0.2);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.btn-secondary {
    background: var(--white);
    color: var(--gray-700);
    border: 2px solid var(--gray-200);
}

.btn-secondary:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-ghost {
    background: transparent;
    color: var(--gray-500);
}

.btn-ghost:hover:not(:disabled) {
    color: var(--gray-700);
    background: var(--gray-100);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn-group {
    display: flex;
    gap: var(--space-md);
    justify-content: flex-end;
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--gray-200);
}

/* ========================================
   SUMMARY CARD
   ======================================== */

.summary-card {
    background: linear-gradient(135deg, var(--primary-soft) 0%, var(--white) 100%);
    border: 2px solid var(--primary-light);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.summary-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: var(--space-md);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--gray-200);
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--gray-500);
}

.summary-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* ========================================
   ALERTS
   ======================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-xl);
}

.alert-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.alert-message {
    font-size: 0.9rem;
    opacity: 0.9;
}

.alert-success {
    background: var(--success-soft);
    color: #065f46;
}

.alert-error {
    background: var(--danger-soft);
    color: #991b1b;
}

.alert-warning {
    background: var(--warning-soft);
    color: #92400e;
}

.alert-info {
    background: var(--info-soft);
    color: #1e40af;
}

/* ========================================
   SUCCESS STATE
   ======================================== */

.success-container {
    text-align: center;
    padding: var(--space-3xl) var(--space-xl);
}

.success-animation {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-xl);
    animation: scaleIn 0.5s ease;
}

.success-animation i {
    font-size: 3rem;
    color: white;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.success-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-sm);
}

.success-message {
    color: var(--gray-500);
    margin-bottom: var(--space-2xl);
}

.booking-code-box {
    background: var(--gray-900);
    color: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    display: inline-flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.booking-code-label {
    font-size: 0.875rem;
    opacity: 0.7;
}

.booking-code-value {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* ========================================
   EMPTY STATE
   ======================================== */

.empty-state {
    text-align: center;
    padding: var(--space-3xl);
    color: var(--gray-500);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.empty-state-icon i {
    font-size: 2rem;
    color: var(--gray-400);
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

/* ========================================
   LOADING
   ======================================== */

.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-3xl);
    color: var(--gray-500);
    gap: var(--space-md);
}

.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: var(--radius-full);
    animation: spin 0.8s linear infinite;
}

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

/* ========================================
   DEPOSIT SECTION
   ======================================== */

.deposit-section {
    background: var(--secondary-soft);
    border: 2px solid var(--secondary);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
}

.deposit-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.deposit-icon {
    width: 48px;
    height: 48px;
    background: var(--secondary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.deposit-icon i {
    color: white;
    font-size: 1.25rem;
}

.deposit-title {
    font-weight: 600;
    color: var(--gray-900);
}

.deposit-subtitle {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.deposit-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary);
    margin-bottom: var(--space-md);
}

.payment-details {
    background: var(--white);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    margin: var(--space-md) 0;
}

.payment-row {
    display: flex;
    justify-content: space-between;
    padding: var(--space-sm) 0;
}

.payment-row:not(:last-child) {
    border-bottom: 1px solid var(--gray-200);
}

.payment-label {
    color: var(--gray-500);
}

.payment-value {
    font-weight: 600;
    color: var(--gray-900);
}

/* File Upload */
.file-upload {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--primary-soft);
}

.file-upload-icon {
    width: 64px;
    height: 64px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-md);
}

.file-upload-icon i {
    font-size: 1.5rem;
    color: var(--primary);
}

.file-upload-text {
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: var(--space-xs);
}

.file-upload-hint {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* Image Preview Styles */
.preview-container {
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    border: 2px solid var(--primary-light);
    animation: slideIn 0.3s ease;
}

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

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-md);
}

.preview-title {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-weight: 600;
    color: var(--gray-700);
}

.preview-title i {
    color: var(--primary);
}

.btn-remove-file {
    background: var(--danger-soft);
    color: var(--danger);
    border: none;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    transition: all var(--transition-fast);
}

.btn-remove-file:hover {
    background: var(--danger);
    color: white;
}

.preview-image-wrapper {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.preview-image {
    width: 100%;
    max-height: 400px;
    object-fit: contain;
    display: block;
}

.preview-file-info {
    margin-top: var(--space-md);
    padding: var(--space-md);
    background: var(--white);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.preview-file-meta {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.preview-file-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.preview-file-name {
    font-weight: 500;
    color: var(--gray-800);
    word-break: break-word;
}

.preview-file-size {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.preview-check-icon {
    color: var(--success);
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Drag and drop active state */
.file-upload.dragover {
    border-color: var(--primary);
    background: var(--primary-soft);
    transform: scale(1.02);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .booking-wrapper {
        padding: var(--space-md);
    }
    
    .booking-header {
        padding: var(--space-xl) var(--space-md);
    }
    
    .booking-card-body {
        padding: var(--space-xl);
    }
    
    .progress-steps {
        flex-wrap: wrap;
    }
    
    .step {
        padding: var(--space-sm) var(--space-md);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-grid {
        gap: var(--space-xs);
    }
    
    .calendar-day {
        font-size: 0.875rem;
    }
    
    .slots-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .btn-group {
        flex-direction: column-reverse;
    }
    
    .btn-group .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .slots-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-day {
        font-size: 0.75rem;
    }
    
    .booking-code-box {
        flex-direction: column;
        text-align: center;
    }
}

/* ========================================
   MODALS
   ======================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: var(--space-md);
    animation: fadeIn 0.2s ease;
}

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

.modal-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    display: flex;
    flex-direction: column;
}

.modal-container.modal-large {
    max-width: 800px;
}

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

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xl) var(--space-xl) 0;
}

.modal-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: var(--space-lg) var(--space-xl);
    overflow-y: auto;
    max-height: 60vh;
}

.modal-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-md);
}

.modal-content-text {
    color: var(--gray-600);
    line-height: 1.8;
    font-size: 0.95rem;
}

.modal-content-text h4 {
    color: var(--gray-800);
    font-weight: 600;
    margin: var(--space-lg) 0 var(--space-sm);
}

.modal-content-text ul,
.modal-content-text ol {
    margin: var(--space-md) 0;
    padding-left: var(--space-lg);
}

.modal-content-text li {
    margin-bottom: var(--space-sm);
}

.modal-content-text strong {
    color: var(--gray-800);
}

.modal-footer {
    padding: var(--space-lg) var(--space-xl) var(--space-xl);
    border-top: 1px solid var(--gray-100);
    display: flex;
    justify-content: flex-end;
}

/* Info badges in modals */
.modal-info-box {
    background: var(--info-soft);
    border-left: 4px solid var(--info);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.modal-info-box i {
    color: var(--info);
    margin-right: var(--space-sm);
}

.modal-warning-box {
    background: var(--warning-soft);
    border-left: 4px solid var(--warning);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin: var(--space-md) 0;
}

.modal-warning-box i {
    color: var(--warning);
    margin-right: var(--space-sm);
}

/* Booking Detail Modal Specific Styles */
.booking-detail-header {
    display: flex;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-lg);
}

.booking-detail-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.booking-detail-icon i {
    font-size: 1.75rem;
    color: white;
}

.booking-detail-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-xs);
}

.booking-detail-code {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: monospace;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-md);
}

.booking-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
}

.booking-detail-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    padding: var(--space-md);
    background: var(--gray-50);
    border-radius: var(--radius-md);
}

.booking-detail-label {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-transform: uppercase;
    font-weight: 500;
}

.booking-detail-value {
    font-weight: 600;
    color: var(--gray-800);
    font-size: 1.1rem;
}

.booking-detail-section {
    margin-bottom: var(--space-lg);
}

.booking-detail-section h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: var(--space-sm);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.booking-detail-section h4 i {
    color: var(--primary);
}

.booking-status-timeline {
    display: flex;
    gap: var(--space-xs);
    margin-top: var(--space-md);
}

.timeline-step {
    flex: 1;
    text-align: center;
    padding: var(--space-sm);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 500;
}

.timeline-step.completed {
    background: var(--success-soft);
    color: var(--success);
}

.timeline-step.active {
    background: var(--primary);
    color: white;
}

.timeline-step.pending {
    background: var(--gray-100);
    color: var(--gray-400);
}

/* Payment proof preview in modal */
.payment-proof-preview {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    text-align: center;
    margin-top: var(--space-md);
}

.payment-proof-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

/* Scrollbar styling for modal content */
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.modal-body::-webkit-scrollbar-track {
    background: var(--gray-100);
    border-radius: var(--radius-sm);
}

.modal-body::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: var(--radius-sm);
}

.modal-body::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* ========================================
   BOOKING HISTORY
   ======================================== */

.history-section {
    max-width: 900px;
    margin: var(--space-3xl) auto 0;
}

.history-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.history-header-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.history-header-icon i {
    color: white;
    font-size: 1.25rem;
}

.history-header-title h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.history-header-title p {
    color: var(--gray-500);
    font-size: 0.9rem;
}

/* History Cards Grid */
.history-grid {
    display: grid;
    gap: var(--space-lg);
}

.history-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.history-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-3px);
    border-color: var(--primary-light);
}

.history-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: var(--space-lg);
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    border-bottom: 1px solid var(--gray-100);
}

.history-card-main {
    display: flex;
    gap: var(--space-md);
    align-items: flex-start;
}

.history-card-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-soft);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.history-card-icon i {
    color: var(--primary);
    font-size: 1.25rem;
}

.history-card-icon.confirmed {
    background: var(--success-soft);
}

.history-card-icon.confirmed i {
    color: var(--success);
}

.history-card-icon.pending {
    background: var(--warning-soft);
}

.history-card-icon.pending i {
    color: var(--warning);
}

.history-card-icon.cancelled {
    background: var(--danger-soft);
}

.history-card-icon.cancelled i {
    color: var(--danger);
}

.history-card-info h4 {
    font-weight: 600;
    color: var(--gray-900);
    font-size: 1.1rem;
    margin-bottom: var(--space-xs);
}

.history-card-code {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    font-family: monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    background: var(--primary-soft);
    padding: var(--space-xs) var(--space-sm);
    border-radius: var(--radius-sm);
}

/* Status Badges */
.history-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.history-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
}

.history-status.pending {
    background: var(--warning-soft);
    color: #92400e;
}

.history-status.pending::before {
    background: var(--warning);
}

.history-status.confirmed {
    background: var(--success-soft);
    color: #065f46;
}

.history-status.confirmed::before {
    background: var(--success);
}

.history-status.deposit_submitted {
    background: var(--info-soft);
    color: #1e40af;
}

.history-status.deposit_submitted::before {
    background: var(--info);
}

.history-status.cancelled,
.history-status.cancelled_by_client,
.history-status.cancelled_by_admin {
    background: var(--danger-soft);
    color: #991b1b;
}

.history-status.cancelled::before,
.history-status.cancelled_by_client::before,
.history-status.cancelled_by_admin::before {
    background: var(--danger);
}

.history-status.rejected {
    background: var(--gray-100);
    color: var(--gray-600);
}

.history-status.rejected::before {
    background: var(--gray-400);
}

/* Card Body */
.history-card-body {
    padding: var(--space-lg);
}

.history-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
}

.history-detail-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.history-detail-icon {
    width: 32px;
    height: 32px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.history-detail-content {
    display: flex;
    flex-direction: column;
}

.history-detail-label {
    font-size: 0.75rem;
    color: var(--gray-400);
    text-transform: uppercase;
}

.history-detail-value {
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.95rem;
}

/* Card Footer */
.history-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-md) var(--space-lg);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-100);
}

.history-date {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.history-actions {
    display: flex;
    gap: var(--space-sm);
}

.btn-history-action {
    display: inline-flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-history-view {
    background: var(--primary);
    color: white;
}

.btn-history-view:hover {
    background: var(--primary-dark);
}

.btn-history-delete {
    background: transparent;
    color: var(--gray-400);
}

.btn-history-delete:hover {
    color: var(--danger);
    background: var(--danger-soft);
}

/* Empty State */
.history-empty {
    text-align: center;
    padding: var(--space-3xl);
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.history-empty-icon {
    width: 80px;
    height: 80px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.history-empty-icon i {
    font-size: 2rem;
    color: var(--gray-400);
}

.history-empty h4 {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: var(--space-sm);
}

.history-empty p {
    color: var(--gray-500);
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    body {
        background: white;
    }
    
    .booking-wrapper {
        padding: 0;
    }
    
    .progress-steps,
    .btn-group,
    .back-link,
    #bookingHistorySection {
        display: none;
    }
    
    .booking-card {
        box-shadow: none;
        border: 1px solid var(--gray-200);
    }
}
