/**
 * Fleet Booking - Booking Form Styles
 * Multi-step booking form with modern design
 */

/* Container */
input, select {
    border-radius: 0px;
    padding: 10px 15px;
}

.cfb-booking-container {
    max-width: 1150px;
    width: 100%;
    margin: 30px auto;
    padding: 0 20px;
}

/* Steps Progress */
.steps-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f3f9;
    border-radius: 100px;
    padding: 0.4rem;
    margin: 0.5rem 0 0.8rem;
}

.step-item {
    flex: 1;
    text-align: center;
    padding: 0.7rem 0.5rem;
    border-radius: 60px;
    font-weight: 500;
    font-size: 0.9rem;
    color: #5b677b;
    transition: all 0.2s ease;
    background: transparent;
    cursor: default;
}

.step-item.active {
    background: #ffffff;
    color: #0b1c2e;
    font-weight: 600;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.05);
}

.step-item.completed {
    font-weight: 500;
}

/* Step Panels */
.step-panel {
    display: none;
    animation: fadeIn 0.3s ease;
}

.step-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.8rem;
}

@media (max-width: 720px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* Input Groups */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.input-group label {
    font-weight: 500;
    font-size: 0.85rem;
    color: #3a4050;
    letter-spacing: 0.3px;
}

.input-group input,
.input-group select,
.input-group .input-style {
    padding: 0.8rem 1rem;
    border: 1px solid #dce1ea;
    font-size: 0.95rem;
    background: #fff;
    transition: all 0.2s;
    width: 100%;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #1e2f4f;
    box-shadow: 0 0 0 3px rgba(20, 60, 120, 0.08);
}

.input-group input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-group .error-message {
    color: #ef4444;
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Row Duo */
.row-duo {
    display: flex;
    gap: 1rem;
}

.row-duo > * {
    flex: 1;
}

@media (max-width: 480px) {
    .row-duo {
        flex-direction: column;
        gap: 0.8rem;
    }
}

/* Buttons */
.cfb-btn-primary {
    background: #000;
    color: #D4AF37;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    letter-spacing: 0.3px;
}

.cfb-btn-primary:hover {
    background: #1e3147;
    box-shadow: 0 4px 12px rgba(11, 28, 46, 0.3);
}

.cfb-btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.cfb-btn-outline {
    background: transparent;
    border: 1.5px solid #cdd5e1;
    color: var(--e-global-color-primary);
    padding: 8px 15px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.cfb-btn-outline:hover {
    background: var(--e-global-color-primary);
    color: white;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 1.2rem;
}
.final-step{ margin-top: -1.65rem;}
@media(max-width: 900px){ margin-top: 0rem;}

/* Passenger & Payment Row */
.passenger-payment-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (max-width: 650px) {
    .passenger-payment-row {
        grid-template-columns: 1fr;
    }
}

/* Map Container */
#cfb-map-container {
    min-height: 220px;
    background: #eef2f6;
    border-radius: 12px;
    position: relative;
    overflow: hidden;
}

#cfb-map-container .map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 220px;
    color: #3e4a5c;
    flex-direction: column;
    gap: 0.5rem;
}

#cfb-map-container .map-placeholder .icon {
    font-size: 3rem;
}

/* Route Info */
#cfb-route-info {
    margin-top: 10px;
    padding: 0.75rem;
    background: #f8fafc;
}

#cfb-route-info p {
    margin: 0.25rem 0;
    font-size: 0.9rem;
}

#cfb-route-info strong {
    color: #1e293b;
}

/* Vehicle Grid Container */
#cfb-vehicles-container {
    min-height: 200px;
}

/* Loading State */
.cfb-loading {
    text-align: center;
    padding: 2rem;
    color: #6b7280;
}

.cfb-loading .spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 3px solid #f3f4f6;
    border-top-color: #000000;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Quote Notice */
.cfb-quote-notice {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
    color: #92400e;
}

.cfb-quote-notice .icon {
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Success Message */
.cfb-success {
    text-align: center;
    padding: 2rem;
}

.cfb-success .icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    display: block;
}

.cfb-success h2 {
    color: #1f6e4a;
    margin-bottom: 0.5rem;
}

/* Payment Section */
#cfb-payment-section {
    transition: all 0.3s ease;
}

#cfb-payment-section .payment-placeholder {
    color: #6b7280;
    padding: 1rem;
    text-align: center;
    background: #f9fafb;
    border-radius: 12px;
}

/* ============================================
   Booking Summary (Step 3)
   ============================================ */
.booking-summary {
    background: #fff;
    border: 1px solid #edf0f5;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    padding: 14px 0;
    border-bottom: 1px solid #f1f3f6;
}

.summary-item:last-of-type {
    border-bottom: none;
}

.summary-item .label {
    color: #6b7280;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.summary-item strong,
.summary-item span:last-child {
    color: #111827;
    font-weight: 600;
    text-align: right;
}

/* Trip Route */
.trip-route {
    flex: 1;
    text-align: right;
    overflow: hidden;
}

.trip-route span {
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
    color: #374151;
}

/* Total Fare */
.summary-total {
    margin-top: 22px;
    padding: 15px 20px;
    background: #111827;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.summary-total span {
    color: #d1d5db;
    font-weight: 500;
}

.summary-total strong {
    color: #fff;
    font-size: 28px;
    font-weight: 700;
}

/* Quote Total Styling */
.summary-total.quote-total {
    background: #f59e0b;
}

.summary-total.quote-total span {
    color: #fef3c7;
}

.summary-total.quote-total strong {
    color: #fff;
    font-size: 20px;
    font-style: italic;
}

/* Quote Notice in Step 3 */
#cfb-quote-notice {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #7a6000;
}

/* Date Input Styling */
.cfb-date-input {
    position: relative;
    color-scheme: light;
}

.cfb-date-input:invalid {
    border-color: #dce1ea;
}

/* Style the calendar picker indicator */
.cfb-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.cfb-date-input::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

/* Hide past dates in the picker (works in some browsers) */
.cfb-date-input::-webkit-datetime-edit-day-field:focus,
.cfb-date-input::-webkit-datetime-edit-month-field:focus,
.cfb-date-input::-webkit-datetime-edit-year-field:focus {
    background-color: #eef2ff;
    color: #4f46e5;
}

/* ============================================
   SVG Icons in Headings
   ============================================ */
.cfb-heading-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 6px;
    fill: currentColor;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .summary-item strong,
    .summary-item span:last-child {
        text-align: left;
    }

    .trip-route {
        width: 100%;
        text-align: left;
    }

    .summary-total {
        flex-direction: row;
    }
    
    .summary-total strong {
        font-size: 22px;
    }
}

@media (max-width: 480px) {
    .steps-progress {
        flex-direction: column;
        border-radius: 16px;
        gap: 0.25rem;
        padding: 0.5rem;
    }
    
    .step-item {
        width: 100%;
        padding: 0.5rem;
        font-size: 0.8rem;
    }
    
    .navigation-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .navigation-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    .booking-summary {
        padding: 16px;
    }
}