/* Booking Modal Styles */
.booking-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.booking-modal-overlay.active {
    display: flex;
}

.booking-modal {
    position: relative;
    width: 90%;
    max-width: 600px;
    height: 85vh;
    max-height: 700px;
    background: linear-gradient(135deg, rgba(20, 20, 20, 0.98), rgba(30, 0, 0, 0.98));
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    overflow: hidden;
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.booking-header {
    padding: 25px 30px;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.booking-title {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.close-modal {
    width: 35px;
    height: 35px;
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-secondary);
    font-size: 20px;
}

.close-modal:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--primary-red);
    color: var(--primary-red);
    transform: rotate(90deg);
}

.booking-progress {
    padding: 15px 30px;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.progress-step::after {
    content: '';
    position: absolute;
    top: 15px;
    left: 60%;
    width: calc(100% - 20px);
    height: 2px;
    background: var(--glass-border);
}

.progress-step:last-child::after {
    display: none;
}

.progress-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    z-index: 1;
    transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    border-color: var(--primary-red);
    color: white;
    transform: scale(1.1);
}

.progress-step.completed .progress-circle {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: white;
}

.progress-label {
    font-size: 11px;
    color: var(--text-secondary);
    margin-top: 5px;
    text-align: center;
    display: none;
}

.booking-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
    min-height: 0;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

/* Step Containers */
.booking-step {
    display: none;
    animation: fadeInUp 0.5s ease;
}

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

.step-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 25px;
}

/* Property Type Selection */
.property-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.property-card {
    padding: 30px;
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    touch-action: manipulation; /* Prevent zoom on double tap */
}

.property-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-red);
    background: var(--glass-white-light);
}

.property-card.selected {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--primary-red);
}

.property-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 15px;
    display: block;
}

.property-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--primary-red);
}

.property-card.selected .property-icon svg {
    fill: var(--light-red);
}

.property-label {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

/* Service Selection */
.service-options {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.service-item {
    padding: 20px;
    background: var(--glass-white);
    border: 2px solid var(--glass-border);
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    touch-action: manipulation; /* Prevent zoom on double tap */
}

.service-item:hover {
    border-color: var(--primary-red);
    background: var(--glass-white-light);
}

.service-item.selected {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--primary-red);
}

.service-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--glass-border);
    border-radius: 5px;
    position: relative;
    flex-shrink: 0;
}

.service-item.selected .service-checkbox {
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    border-color: var(--primary-red);
}

.service-item.selected .service-checkbox::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-weight: 600;
}

.service-info {
    flex: 1;
}

.service-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.service-description {
    font-size: 13px;
    color: var(--text-secondary);
}

/* Custom Calendar */
.calendar-container {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    width: 35px;
    height: 35px;
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
    touch-action: manipulation; /* Prevent zoom on double tap */
}

.calendar-nav:hover:not(:disabled) {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--primary-red);
    color: var(--primary-red);
}

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

.calendar-month {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
}

.weekday {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    padding: 5px;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    color: var(--text-primary);
    position: relative;
    touch-action: manipulation; /* Prevent zoom on double tap */
}

/* FIXED: Empty cells (previous/next month days) */
.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
    visibility: hidden;
}

.calendar-day.available:hover {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--primary-red);
    transform: scale(1.05);
}

.calendar-day.selected {
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    border-color: var(--primary-red);
    color: white !important;
    font-weight: 600;
}

.calendar-day.today {
    border-color: var(--primary-red);
    font-weight: 600;
}

.calendar-day.today::after {
    content: '';
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--primary-red);
    border-radius: 50%;
}

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

.calendar-day.past {
    opacity: 0.2;
    cursor: not-allowed;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.02) 10px,
        rgba(255, 255, 255, 0.02) 20px
    );
}

/* Time Slots */
.time-slots-container {
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
}

.time-period {
    margin-bottom: 20px;
}

.period-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.time-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}

.time-slot {
    padding: 10px;
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    color: var(--text-primary);
    touch-action: manipulation; /* Prevent zoom on double tap */
}

.time-slot:hover:not(.unavailable) {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--primary-red);
    transform: scale(1.05);
}

.time-slot.selected {
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    border-color: var(--primary-red);
    color: white;
    font-weight: 600;
}

.time-slot.unavailable {
    opacity: 0.3;
    cursor: not-allowed;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(255, 255, 255, 0.05) 10px,
        rgba(255, 255, 255, 0.05) 20px
    );
}

/* Contact Form - CRITICAL: Font size must be 16px to prevent zoom */
.booking-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-label.required::after {
    content: ' *';
    color: var(--primary-red);
}

.form-input {
    padding: 14px 16px; /* Increased padding for better touch targets */
    background: var(--glass-white);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 16px; /* CRITICAL: Must be 16px to prevent zoom on iOS */
    font-family: inherit;
    transition: all 0.3s ease;
    -webkit-appearance: none; /* Remove iOS default styling */
    -moz-appearance: none;
    appearance: none;
    touch-action: manipulation; /* Prevent double-tap zoom */
}

/* Ensure all input types maintain 16px font size */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
select,
textarea {
    font-size: 16px !important; /* Force 16px on all form elements */
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-red);
    background: var(--glass-white-light);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 16px; /* Placeholder also needs 16px */
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
    font-size: 16px; /* Ensure textarea is also 16px */
}

/* Booking Footer - Fixed positioning */
.booking-footer {
    padding: 20px 30px;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-shrink: 0;
    margin-top: auto;
}

.btn-group {
    display: flex;
    gap: 15px;
    align-items: center;
}

.btn {
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    touch-action: manipulation; /* Prevent zoom on double tap */
}

.btn-back {
    background: var(--glass-white);
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-back:hover {
    background: var(--glass-white-light);
    border-color: var(--primary-red);
    color: var(--primary-red);
}

.btn-next {
    background: linear-gradient(135deg, var(--primary-red), var(--light-red));
    color: white;
    padding: 12px 40px;
}

.btn-next:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 53, 69, 0.3);
}

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

/* Loading State - Fixed */
.booking-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 100;
    display: none;
}

.booking-loading.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid var(--glass-border);
    border-top-color: var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Success Message */
.booking-success {
    text-align: center;
    padding: 40px;
}

.success-icon {
    font-size: 64px;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.success-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.success-message {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.6;
}

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

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

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

/* Mobile Responsive */
@media (max-width: 768px) {
    .booking-modal {
        width: 95%;
        height: 90vh;
        max-height: none;
        border-radius: 20px;
    }
    
    .booking-header {
        padding: 20px;
    }
    
    .booking-title {
        font-size: 20px;
    }
    
    .booking-progress {
        padding: 10px 20px;
    }
    
    .progress-label {
        display: none;
    }
    
    .booking-body {
        padding: 20px;
    }
    
    .property-options {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .calendar-grid {
        gap: 3px;
    }
    
    .calendar-day {
        font-size: 12px;
    }
    
    .time-grid {
        grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
        gap: 8px;
    }
    
    .booking-footer {
        padding: 15px 20px;
    }
    
    .btn {
        padding: 12px 24px; /* Increased touch target size */
        font-size: 14px;
    }
    
    /* Ensure form inputs remain 16px on mobile */
    .form-input,
    .form-input::placeholder {
        font-size: 16px !important;
        padding: 14px 16px;
    }
    
    /* Better touch targets */
    .calendar-nav,
    .close-modal {
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .booking-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }
    
    /* Ensure all interactive elements have minimum 44px touch targets */
    .property-card,
    .service-item,
    .calendar-day,
    .time-slot {
        min-height: 44px;
    }
}

/* Prevent all zooming behaviors */
@media (hover: none) and (pointer: coarse) {
    /* Touch devices */
    * {
        touch-action: pan-x pan-y; /* Allow scrolling but prevent zoom */
    }
    
    input,
    select,
    textarea,
    button {
        touch-action: manipulation; /* Specifically prevent double-tap zoom */
    }
}