/**
 * Booking Details Form Styles
 * Matching iChauffeur design
 */

/* ========================================
   CONTAINER & LAYOUT
   ======================================== */

.chauffeur-booking-details-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.booking-details-header {
    text-align: center;
    margin-bottom: 30px;
}

.journey-route {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 20px;
    font-size: 16px;
    color: #333;
}

.route-from,
.route-to {
    font-weight: 500;
}

.route-arrow {
    color: #960114;
    font-size: 20px;
    font-weight: bold;
}

.booking-details-header h1 {
    font-size: 28px !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    color: #121212 !important;
    letter-spacing: 0.5px;
}

.booking-details-header p {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: #666 !important;
    margin: 0 !important;
    letter-spacing: 0.3px;
}

/* ========================================
   PROGRESS INDICATOR (NEW DESIGN)
   ======================================== */

.booking-progress {
    opacity: 1;
    transition: 0.3s;
    display: flex;
    flex-flow: row nowrap;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    max-width: 800px;
    margin: 0 auto 40px auto;
    width: 100%;
    box-sizing: border-box;
}

.progress-step {
    display: inline-flex;
    align-items: center;
    font-size: 14px;
    opacity: 1;
    font-family: Inter, sans-serif;
    box-sizing: border-box;
    position: relative;
}

.progress-number {
    display: inline-block;
    vertical-align: middle;
    font-size: 13px;
    font-family: arial, sans-serif;
    margin-right: 8px;
    box-sizing: border-box;
    width: 32px;
    height: 32px;
    border-radius: 15px;
    text-align: center;
    letter-spacing: 0.2px;
    line-height: 30px;
    flex-shrink: 0;
}

/* Default state (not started) */
.progress-step .progress-number {
    background-color: rgba(0, 0, 0, 0);
    border: 1px solid #959595;
    color: #696969;
}

.progress-step .progress-label {
    display: inline-block;
    white-space: nowrap;
    font-weight: 500;
    font-size: 15px;
    color: #959595;
    letter-spacing: 0.2px;
    line-height: 32px;
    vertical-align: middle;
    box-sizing: border-box;
    margin-right: 20px;
}

/* Add line after label except for last step */
.progress-step:not(:last-child) .progress-label::after {
    content: '';
    width: 60px;
    height: 2px;
    background-color: #960114;
    display: inline-block;
    margin-left: 20px;
    vertical-align: middle;
}

/* Completed state */
.progress-step.completed .progress-number {
    border: 2px solid #960114;
    color: rgb(18, 18, 18);
    background-color: rgba(0, 0, 0, 0);
}

.progress-step.completed .progress-label {
    color: #959595;
}

/* Active state */
.progress-step.active .progress-number {
    width: 32px;
    height: 32px;
    background-color: #960114;
    border: 1px solid #960114;
    color: rgb(255, 255, 255);
}

.progress-step.active .progress-label {
    color: rgb(18, 18, 18);
}

/* ========================================
   FORM CONTAINER
   ======================================== */

.booking-details-container {
    background: white;
    border-radius: 8px;
    padding: 30px 26px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.09);
    border: 1px solid #dedede;
}

.booking-details-container h2 {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 0 20px 0 !important;
    color: #121212 !important;
    letter-spacing: 0.2px;
}

/* ========================================
   FORM ELEMENTS
   ======================================== */

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #121212;
    margin-bottom: 8px;
    letter-spacing: -0.23px;
}

.form-group .required {
    color: #790000;
    margin-left: 4px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="datetime-local"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 14px 16px;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    color: #121212;
    background: rgba(0, 0, 0, 0);
    border: 1px solid #696969;
    border-radius: 0;
    box-sizing: border-box;
    transition: background-color 0.24s ease-in-out, border-color 0.24s ease-in-out;
    letter-spacing: -0.2px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #960114;
    background: rgba(150, 1, 20, 0.05);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #999;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Phone input with intl-tel-input */
.iti {
    width: 100% !important;
    display: block !important;
}

.iti__flag-container {
    border-right: 1px solid #696969 !important;
}

.iti__selected-flag {
    padding: 0 8px 0 12px !important;
    background: rgba(0, 0, 0, 0) !important;
}

/* ========================================
   CHOOSE TIME BUTTON
   ======================================== */

.choose-time-btn {
    width: 100%;
    padding: 14px 20px;
    background: #960114;
    color: white;
    border: none;
    border-radius: 32px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.47px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.choose-time-btn:hover {
    background: #710010;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(33, 150, 243, 0.3);
}

.choose-time-btn svg {
    width: 16px;
    height: 16px;
}

.selected-datetime {
    padding: 10px 14px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 14px;
    color: #121212;
    margin-bottom: 12px;
}

.selected-datetime strong {
    font-weight: 600;
}

.change-time-btn {
    margin-left: 10px;
    padding: 4px 12px;
    background: #960114;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.change-time-btn:hover {
    background: #710010;
}

/* ========================================
   CHECKBOXES
   ======================================== */

.checkbox-group {
    margin: 20px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #121212;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #960114;
}

.checkbox-label span {
    user-select: none;
}

/* ========================================
   PASSENGER DETAILS (CONDITIONAL)
   ======================================== */

.passenger-details {
    padding: 20px;
    background: #f9f9f9;
    border-left: 3px solid #960114;
    border-radius: 4px;
    margin: 16px 0;
}

.passenger-details .form-group {
    margin-bottom: 16px;
}

.passenger-details .form-group:last-child {
    margin-bottom: 0;
}

/* ========================================
   ACTION BUTTONS
   ======================================== */

.form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
}

.btn-primary,
.btn-secondary {
    width: 100%;
    padding: 16px 24px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-align: center;
    border-radius: 32px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    text-transform: uppercase;
    text-decoration: none;
}

.btn-primary {
    background: #960114;
    color: white;
}

.btn-primary:hover {
    background: #960114;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(150, 1, 20, 0.4);
}

.btn-primary:focus,
.btn-primary:active,
.btn-secondary:focus,
.btn-secondary:active {
    outline: none;
    box-shadow: none;
    text-decoration: none;
}

.btn-primary svg {
    width: 16px;
    height: 16px;
}

.btn-secondary {
    background: white;
    color: #960114;
    border: 2px solid #960114;
}

.btn-secondary:hover {
    background: #960114;
    color: #ffffff;
    border-color: #960114;
}

.btn-secondary svg {
    width: 16px;
    height: 16px;
}

/* ========================================
   DATETIME PICKER MODAL
   ======================================== */

.datetime-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.datetime-modal-content {
    background: white;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.datetime-modal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    position: relative;
}

.datetime-modal-header h3 {
    font-size: 18px !important;
    font-weight: 600 !important;
    margin: 0 !important;
    color: #121212 !important;
    text-align: center;
    flex: 1;
}

.close-modal {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    font-size: 24px;
    color: #999;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
}

.close-modal:hover {
    background: #f5f5f5;
    color: #121212;
}

.datetime-modal-body {
    padding: 32px 24px;
    text-align: center;
}

.datetime-modal-body input[type="datetime-local"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    color: #121212;
    background: white;
    box-sizing: border-box;
    text-align: center;
}

/* Style the datetime picker calendar popup */
.datetime-modal-body input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    border-radius: 4px;
    margin-right: 2px;
    padding: 4px;
}

.datetime-modal-body input[type="datetime-local"]::-webkit-calendar-picker-indicator:hover {
    background-color: #e3f2fd;
}

/* Make the input look more like a proper picker */
.datetime-modal-body input[type="datetime-local"]:focus {
    outline: none;
    border-color: #960114;
    box-shadow: 0 0 0 3px rgba(150, 1, 20, 0.1);
}

.datetime-modal-footer {
    display: flex;
    gap: 16px;
    padding: 24px;
    border-top: 1px solid #e0e0e0;
    background: #fafafa;
}

.btn-cancel,
.btn-confirm {
    flex: 1;
    padding: 14px 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-cancel {
    background: #e0e0e0;
    color: #666;
}

.btn-cancel:hover {
    background: #d0d0d0;
}

.btn-confirm {
    background: #960114;
    color: white;
}

.btn-confirm:hover {
    background: #710010;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(150, 1, 20, 0.4);
}

/* ========================================
   LOADER
   ======================================== */

.booking-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f0;
    border-top: 4px solid #960114;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.booking-loader p {
    font-size: 16px;
    color: #666;
    margin: 0;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .chauffeur-booking-details-wrapper {
        padding: 15px;
    }
    
    .booking-details-container {
        padding: 20px 16px;
    }
    
    .booking-details-header h1 {
        font-size: 24px !important;
    }
    
    .booking-progress {
        padding: 20px 10px;
        flex-wrap: wrap;
    }
    
    .progress-step:not(:last-child) .progress-label::after {
        width: 30px;
        margin-left: 10px;
    }
    
    .progress-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
        line-height: 26px;
        margin-right: 6px;
    }
    
    .progress-step.active .progress-number {
        width: 28px;
        height: 28px;
    }
    
    .progress-label {
        font-size: 13px;
        line-height: 28px;
        margin-right: 10px;
    }
}

/* ========================================
   ELEMENTOR OVERRIDES
   ======================================== */

.elementor-widget-container .chauffeur-booking-details-wrapper,
.elementor-shortcode .chauffeur-booking-details-wrapper {
    max-width: 600px !important;
}

body.elementor-page .chauffeur-booking-details-wrapper {
    max-width: 600px !important;
}

