/* Car Booking Styles - Multi-Step Wizard */

#car-booking-app {
    max-width: 1000px;
    margin: 30px auto;
    border: 1px solid #e0e0e0;
    padding: 30px;
    border-radius: 12px;
    background: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Step Indicators */
.car-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
    position: relative;
}

.car-steps::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: #e0e0e0;
    z-index: 0;
}

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

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e0e0;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
    transition: color 0.3s ease;
}

.step.active .step-number {
    background: #304C2E;
    color: #fff;
    box-shadow: 0 4px 12px rgba(48, 76, 46, 0.3);
}

.step.active .step-label {
    color: #304C2E;
    font-weight: 600;
}

.step.completed .step-number {
    background: #10b981;
    color: #fff;
}

.step.completed .step-label {
    color: #10b981;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: slideIn 0.4s ease;
}

.step-content h3 {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #1f2937;
}

.step-description {
    color: #6b7280;
    margin-bottom: 25px;
    font-size: 15px;
}

/* Calendar Container */
.calendar-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

#car-calendar-inline {
    display: flex;
    justify-content: center;
}

/* Flatpickr Customizations */
.flatpickr-calendar {
    box-shadow: none !important;
    border: none !important;
}

.flatpickr-calendar.inline {
    width: 100% !important;
    max-width: none !important;
}

.flatpickr-calendar.rangeMode.multiMonth.inline {
    padding: 0px 5px;
}

.flatpickr-calendar.rangeMode.animate.inline {
    padding: 0px 5px;
}

.flatpickr-rContainer {
    width: 100% !important;
}

.flatpickr-days {
    width: 100% !important;
    display: flex !important;
    align-items: flex-start !important;
}

.dayContainer {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 0px !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px !important;
}

.flatpickr-months {
    width: 100% !important;
    display: flex !important;
    padding: 10px 0;
}

.flatpickr-month {
    width: 100% !important;
    flex: 1 1 0px !important;
    height: auto !important;
    padding-bottom: 5px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
}

.flatpickr-current-month {
    position: relative !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 6px !important;
    width: 100% !important;
    text-align: center !important;
    left: auto !important;
    right: auto !important;
    padding: 0 !important;
    height: auto !important;
}

.car-booking-price-tag {
    display: block !important;
    text-align: center !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #4CAF50 !important;
    background: #f1f8e9 !important;
    padding: 2px 12px !important;
    border-radius: 20px !important;
    border: 1px solid #c5e1a5 !important;
    margin: 5px auto 10px auto !important;
    width: fit-content !important;
    min-width: 80px !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05) !important;
}

.flatpickr-monthDropdown-months,
.flatpickr-current-month .numInputWrapper {
    font-size: 16px !important;
    font-weight: 600 !important;
}

/* Disable Year Navigation (Static Text) */
.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown {
    display: none !important;
}

.flatpickr-current-month input.cur-year {
    pointer-events: none !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 0 0 5px !important;
    /* Space between month and year */
    height: auto !important;
    width: auto !important;
    font-weight: 600 !important;
    -moz-appearance: textfield !important;
    -webkit-appearance: textfield !important;
    appearance: textfield !important;
}

.flatpickr-current-month input.cur-year:hover,
.flatpickr-current-month .numInputWrapper:hover,
.flatpickr-monthDropdown-months:hover {
    background: transparent !important;
    cursor: default !important;
}

.flatpickr-monthDropdown-months {
    pointer-events: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border: none !important;
    border: none !important;
    background: transparent !important;
    text-align: center !important;
    text-align-last: center !important;
}

.flatpickr-current-month span.cur-month:hover {
    background: unset !important;
}

.flatpickr-current-month input.cur-year::-webkit-outer-spin-button,
.flatpickr-current-month input.cur-year::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Weekday Headers - must match day cell grid */
.flatpickr-innerContainer {
    width: 100% !important;
}

.flatpickr-weekdays {
    width: 100% !important;
}

.flatpickr-weekdaycontainer {
    width: 100% !important;
    display: flex !important;
}

span.flatpickr-weekday {
    flex: 1 1 0px !important;
    max-width: none !important;
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #4a6b48 !important;
}

.flatpickr-day {
    border-radius: 6px !important;
    font-weight: 500;
    max-width: none !important;
    flex: 0 0 calc((100% - 12px) / 7) !important;
    width: calc((100% - 12px) / 7) !important;
    /* 7 per row, accounting for 6 x 2px gaps */
    height: 38px !important;
    line-height: 38px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #304C2E !important;
    border-color: #304C2E !important;
    box-shadow: none !important;
}

.flatpickr-day.inRange {
    background: #e2efe2 !important;
    border-color: #e2efe2 !important;
    box-shadow: none !important;
}

/* Past/Disabled Dates - Gray */
.flatpickr-day.flatpickr-disabled,
.flatpickr-day.flatpickr-disabled:hover {
    background: #f3f4f6 !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    border-color: transparent !important;
}

/* Booked/Blocked Dates - Light Yellow */
.flatpickr-day.blocked-date {
    background: #fef9c3 !important;
    /* Light yellow */
    color: #854d0e !important;
    /* Dark yellow/brown text */
    text-decoration: none;
    /* Clean look */
    border-color: #fef08a !important;
    cursor: not-allowed;
}

.flatpickr-day.blocked-date:hover {
    background: #fef08a !important;
    /* Slightly darker yellow on hover */
}

/* Selection Info Box */
.selection-info {
    background: linear-gradient(135deg, #f4fbf4 0%, #e6f3e6 100%);
    border: 1px solid #cce5cc;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(48, 76, 46, 0.15);
}

.info-row:last-child {
    border-bottom: none;
}

.info-row.highlight {
    background: #fff;
    margin: 5px -15px;
    padding: 10px 15px;
    border-radius: 6px;
    font-weight: 600;
}

.info-label {
    color: #4a6b48;
}

.info-value {
    font-weight: 600;
    color: #304C2E;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #304C2E;
    box-shadow: 0 0 0 3px rgba(48, 76, 46, 0.1);
}

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

/* Booking Summary */
.booking-summary {
    background: #f8fcf8;
    border: 1px solid #cce5cc;
    border-radius: 10px;
    overflow: hidden;
}

.summary-section {
    padding: 20px;
    border-bottom: 1px solid rgba(48, 76, 46, 0.15);
}

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

.summary-section h4 {
    margin: 0 0 15px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #304C2E;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 15px;
}

.summary-row span:first-child {
    color: #4a6b48;
}

.summary-row span:last-child {
    font-weight: 500;
    color: #1f2937;
}

.summary-row.total {
    font-size: 20px;
    font-weight: 700;
}

.summary-row.total span:last-child {
    color: #304C2E;
}

.total-section {
    background: #e6f3e6;
}

/* Buttons */
.step-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
    gap: 15px;
}

button {
    padding: 14px 28px;
    cursor: pointer;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-next,
.btn-submit {
    background: #304C2E;
    color: #fff;
    margin-left: auto;
}

.btn-next:hover,
.btn-submit:hover {
    background: #253D24;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(48, 76, 46, 0.5);
}

.btn-next:disabled {
    opacity: 0.8;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-prev {
    background: #f3f4f6;
    color: #4b5563;
}

.btn-prev:hover {
    background: #e5e7eb;
}

.btn-submit {
    background: #304C2E;
    min-width: 200px;
}

.btn-submit:hover {
    background: #253D24;
}

/* Error Messages */
.error-message {
    color: #dc2626;
    font-size: 14px;
    margin-top: 10px;
    padding: 10px;
    background: #fef2f2;
    border-radius: 6px;
    border: 1px solid #fecaca;
}

/* Success State */
.booking-success {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #10b981;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease;
}

.booking-success h2 {
    color: #1f2937;
    margin-bottom: 15px;
}

.booking-success p {
    color: #6b7280;
    font-size: 16px;
    margin-bottom: 10px;
}

.success-note {
    font-size: 14px;
    color: #9ca3af;
}

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

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Responsive */
@media (max-width: 768px) {
    #car-booking-app {
        margin: 15px;
        padding: 10px;
    }

    .calendar-container {
        padding: 10px;
    }

    .car-steps::before {
        display: none;
    }

    .step-label {
        font-size: 11px;
    }

    .step-number {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }

    /* Step buttons stack on mobile */
    .step-buttons {
        flex-direction: column-reverse;
    }

    .btn-next,
    .btn-prev,
    .btn-submit {
        width: 100%;
        margin: 0;
    }
}

@media (max-width: 766px) {
    /* On small mobile, keep the month title centered */
    #car-calendar-inline .flatpickr-current-month {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 6px !important;
        left: 0 !important;
    }

    #car-calendar-inline .flatpickr-months .flatpickr-month {
        align-items: center !important;
    }

    /* Force actual month label/dropdown text to be centered */
    #car-calendar-inline .flatpickr-current-month .flatpickr-monthDropdown-months,
    #car-calendar-inline .flatpickr-current-month .cur-month {
        text-align: center !important;
        text-align-last: center !important;
    }

    #car-calendar-inline .flatpickr-current-month .numInputWrapper,
    #car-calendar-inline .flatpickr-current-month input.cur-year {
        text-align: center !important;
    }

    #car-calendar-inline .flatpickr-current-month .cur-month {
        margin-right: 6px !important;
    }
}