/* Multi-Step Booking Form Styles - Exact Match to Original Design */

/* Reset for form elements */
.booking-form-container *,
.booking-form-container *::before,
.booking-form-container *::after {
    box-sizing: border-box;
}

/* Full page gradient background for form pages - only on dedicated booking pages */
body.booking-page:has(.booking-form-container) {
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-300) 100%);
    min-height: 100vh;
}

/* Page section containing form - only on dedicated booking pages */
body.booking-page #reservation {
    background: transparent;
    min-height: 100vh;
    padding: 40px 20px;
    margin: 0;
}

/* On tour pages, reservation section should maintain normal styling */
body.tour-detail-page #reservation {
    background: transparent;
    min-height: auto;
    padding: 0;
    margin-left: 0;
    margin-right: 0;
    /* Preserve top/bottom margins for proper spacing */
}

/* Remove default content-card styling for form sections - only on dedicated booking pages */
body.booking-page .content-card:has(.booking-form-container) {
    background: transparent;
    box-shadow: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Form Container */
.booking-form-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    background: transparent;
    font-family: var(--font-primary);
}

/* Form Header */
.booking-form-header {
    text-align: center;
    margin-bottom: 40px;
    padding-top: 2rem;
}

.booking-form-title {
    font-size: 2.2em;
    color: var(--secondary);
    margin-bottom: 20px;
    margin-top: 2rem;
    font-weight: 600;
}

/* Progress Bar */
.booking-progress-bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 50px;
    gap: 60px;
}

/* Remove the connecting line */
.booking-progress-bar::before {
    display: none;
}

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

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin-bottom: 10px;
    transition: all 0.3s ease;
    border: none;
}

.progress-step.active .step-circle {
    background: var(--primary);
    color: white;
    border: none;
    box-shadow: none;
}

.progress-step.completed .step-circle {
    background: var(--success);
    color: var(--success); /* Same as background to hide text */
    position: relative;
    font-size: 0; /* Collapse the original text */
}

.progress-step.completed .step-circle::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.5rem;
    color: white;
    line-height: 1;
}

.step-label {
    font-size: 14px;
    color: var(--gray-500);
    font-weight: 500;
    text-align: center;
}

.progress-step.active .step-label {
    color: var(--primary);
}

.progress-step.completed .step-label {
    color: var(--success);
}

/* Form Content */
.booking-form-content {
    background: transparent;
    border-radius: 16px;
    padding: 40px;
    box-shadow: none;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

/* Form Steps */
.booking-step {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.booking-step:first-child {
    display: block;
}

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

.step-title {
    font-size: 1.8em;
    color: var(--secondary);
    margin-bottom: 30px;
    font-weight: 600;
}

/* Form Grid */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 15px;
}

.form-group .required {
    color: var(--error);
}

/* Form Inputs */
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(229, 231, 235, 0.9);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.5);
    color: var(--gray-700);
    font-family: inherit;
    backdrop-filter: blur(10px);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: var(--error);
}

/* Number Input Group */
.number-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.number-input-group input[type="number"] {
    width: 100%;
    text-align: center;
    font-weight: 600;
    font-size: 18px;
    padding-right: 40px;
}

/* Number controls container */
.number-controls {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Number control buttons */
.number-btn {
    width: 24px;
    height: 20px;
    border: none;
    background: var(--primary);
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

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

/* Price label */
.price-label {
    font-size: 14px;
    color: var(--primary);
    font-weight: 600;
    margin-top: 4px;
}

/* Select styling */
.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

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

/* Number input spin buttons */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Date Input */
.date-input-wrapper {
    position: relative;
}

.date-input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid rgba(229, 231, 235, 0.9);
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.5);
    color: var(--gray-700);
    cursor: pointer;
    transition: all 0.3s ease;
    padding-right: 45px;
    backdrop-filter: blur(10px);
}

.date-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.calendar-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    z-index: 1;
}

/* Calendar Styles */
.booking-calendar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: var(--z-modal-backdrop);
    display: none;
}

.booking-calendar-overlay.show {
    display: block;
}

.booking-calendar {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border: 2px solid var(--primary);
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    z-index: var(--z-modal);
    padding: 20px;
    display: none;
    backdrop-filter: blur(10px);
    min-width: 350px;
}

.booking-calendar.show {
    display: block;
    animation: calendarSlideIn 0.3s ease;
}

@keyframes calendarSlideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

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

.calendar-nav-btn {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    transition: background 0.3s;
}

.calendar-nav-btn:hover {
    background: var(--primary-dark);
    transform: none;
}

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

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

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-500);
    padding: 8px;
}

.calendar-day {
    text-align: center;
    padding: 12px 8px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    color: var(--gray-700);
}

.calendar-day:hover {
    background: rgba(249, 115, 22, 0.1);
    color: var(--primary);
}

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

.calendar-day.today {
    background: var(--gray-200);
    color: var(--secondary);
    font-weight: 600;
}

.calendar-day.other-month {
    color: var(--gray-300);
}

.calendar-day.disabled {
    color: var(--gray-300);
    cursor: not-allowed;
}

.calendar-day.disabled:hover {
    background: transparent;
    color: var(--gray-300);
}

.calendar-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.calendar-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background 0.2s;
}

.calendar-btn:hover {
    background: rgba(249, 115, 22, 0.1);
}

/* Button Group */
.button-group {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 15px;
}

/* Booking-specific button overrides */
.booking-form-container .btn {
    padding: 14px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 500;
    min-width: 120px;
}

.booking-form-container .btn-success {
    width: 100%;
    font-size: 18px;
    padding: 16px;
}

.booking-form-container .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Summary Section */
.booking-summary {
    background: transparent;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 25px;
    border: 1px solid rgba(249, 115, 22, 0.3);
    backdrop-filter: blur(10px);
}

.summary-section {
    margin-bottom: 0;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.summary-item:last-child {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.2em;
    color: var(--primary);
    padding-top: 20px;
    margin-top: 10px;
    border-top: 2px solid var(--primary);
}

.summary-item.total {
    border-bottom: none;
    font-weight: 600;
    font-size: 1.2em;
    color: var(--primary);
    padding-top: 20px;
    margin-top: 10px;
    border-top: 2px solid var(--primary);
}

/* Pricing note */
.pricing-note {
    background: transparent;
    padding: 15px;
    border-radius: 12px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--gray-500);
    border: 1px solid rgba(107, 114, 128, 0.3);
    backdrop-filter: blur(10px);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #reservation {
        padding: 20px 10px;
    }
    
    .booking-progress-bar {
        gap: 30px;
    }
    
    .step-circle {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
    
    .step-label {
        font-size: 12px;
    }
    
    .booking-form-title {
        font-size: 1.8em;
    }
    
    .booking-form-content {
        padding: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .booking-calendar {
        width: 90%;
        min-width: unset;
    }
}

/* Loading State */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* Success/Error Messages */
.form-message {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 25px;
    font-weight: 500;
    animation: slideDown 0.3s ease;
}

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

.form-message.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.form-message.error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}