/* ===== RESERVE YOUR RIDE PAGE STYLES ===== */

.fancybox-margin {
    margin-right: 0px;
}

/* Responsive Form Layout */
.booking-wrapper {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

@media (min-width: 992px) {
    .booking-wrapper {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 25px;
        align-items: start;
    }
}

.form-wrapper {
    background: #f8f9fa;
    border: 2px solid #e6ae48;
    border-radius: 10px;
    padding: 30px;
}

/* General container styling */
.custom-booking-form {
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Add a golden top line for a luxury feel */
.custom-booking-form::before {
    display: none !important;
    content: none !important;
}

/* Fare Sidebar */
.fare-sidebar {
    background: #f8f9fa;
    border: 2px solid #e6ae48;
    border-radius: 10px;
    padding: 30px;
    height: fit-content;
    margin: 0;
}

@media (min-width: 992px) {
    .fare-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 20px;
    }
}

.fare-sidebar h3 {
    color: #e6ae48;
    font-size: 22px;
    margin: 0 0 15px 0;
    border-bottom: 2px solid #e6ae48;
    padding: 0 0 10px 0;
}

.fare-content {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.fare-content p {
    margin: 10px 0;
}

.fare-sidebar #submit-booking {
    width: 100%;
    margin-top: 20px;
    background-color: #e6ae48;
    color: black;
    border: none;
    padding: 15px 30px;
    font-size: 18px;
    font-weight: bold;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.fare-sidebar #submit-booking:hover {
    background-color: #d4a853;
}

.fare-sidebar #submit-booking:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.fare-sidebar #booking-status {
    margin-top: 10px;
    text-align: center;
    font-weight: 600;
}

/* Labels for all inputs */
.custom-booking-form label {
    margin-top: 10px;
    display: block; /* Labels appear above inputs */
}

/* Styling for inputs, textarea, and button */
.custom-booking-form input,
.custom-booking-form textarea,
.custom-booking-form button {
    width: 100%; /* Full width for uniformity */
    margin: 10px 0;
    padding: 12px; /* Increased padding for better readability */
    font-size: 16px;
    border: 1px solid #ccc; /* Consistent light gray border */
    border-radius: 5px;
    box-sizing: border-box; /* Include padding and border in width calculation */
    background-color: #f9f9f9; /* Same background color for all inputs */
}

/* Checkbox Styling */
.custom-booking-form input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin-right: 5px;
    vertical-align: middle;
}

/* Labels for checkboxes */
.custom-booking-form input[type="checkbox"] + label {
    display: inline-block;
    margin: 0;
    font-size: 14px;
    vertical-align: middle;
}

/* Ensure uniform appearance across all input types */
.custom-booking-form input[type="text"],
.custom-booking-form input[type="tel"],
.custom-booking-form input[type="date"],
.custom-booking-form input[type="time"] {
    appearance: none; /* Normalize styling across browsers */
    -webkit-appearance: none; /* WebKit-specific reset */
    background-color: #f9f9f9; /* Uniform background */
    padding: 12px; /* Ensure uniform padding */
    border: 1px solid #ccc;
    border-radius: 5px;
}

/* Select with custom dropdown arrow */
.custom-booking-form select {
    appearance: none; /* Normalize styling across browsers */
    -webkit-appearance: none; /* WebKit-specific reset */
    -moz-appearance: none; /* Firefox-specific reset */
    background-color: #f9f9f9; /* Uniform background */
    padding: 12px; /* Ensure uniform padding */
    padding-right: 35px; /* Make room for the arrow */
    border: 1px solid #ccc;
    border-radius: 5px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    cursor: pointer;
}

/* Styling for the textarea */
.custom-booking-form textarea {
    resize: vertical; /* Allow vertical resizing only */
    background-color: #f9f9f9; /* Match input field background */
}

/* Button styling */
.custom-booking-form button {
    background-color: #e6ae48; /* Golden color */
    color: white; /* White text */
    font-weight: bold; /* Bold font for emphasis */
    border: none; /* No border */
    cursor: pointer; /* Pointer cursor on hover */
    padding: 12px 20px;
    font-size: 16px; /* Consistent font size */
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease; /* Smooth hover effects */
}

.custom-booking-form button:hover {
    background-color: #d89b3c; /* Darker shade on hover */
    transform: translateY(-2px); /* Slight upward movement */
}

/* Fare display styling */
#fare-display {
    font-size: 18px; /* Larger font size for emphasis */
    font-weight: bold; /* Bold text */
    color: #007BFF; /* Blue color for visibility */
    margin-top: 10px;
    text-align: center;
}

/* Fix for any external margin/padding applied */
.custom-booking-form input[type="text"],
.custom-booking-form input[type="tel"],
.custom-booking-form select {
    margin: 10px 0 !important;
    padding: 12px !important; /* Enforce consistency */
    background-color: #f9f9f9 !important;
}

/* Customize font color for all input fields */
input#name, 
input#pickup-address, 
input#dropoff-address, 
textarea#message {
    color: #000000; /* Customize color here for all fields */
}

.custom-booking-form input:focus,
.custom-booking-form textarea:focus,
.custom-booking-form input[type="tel"]:focus,
.custom-booking-form input[type="date"]:focus,
.custom-booking-form input[type="time"]:focus {
    border-color: #d89b3c !important; /* Golden border when focused */
    box-shadow: 0 0 5px rgba(255, 165, 0, 0.5) !important; /* Soft glowing effect */
}

/* Remove autofill background and reset the border */
input:-webkit-autofill {
    background-color: transparent !important;
    border-color: #d89b3c !important;  /* Golden border */
    box-shadow: 0 0 5px rgba(255, 165, 0, 0.5) !important; /* Soft glowing effect */
}

/* Specifically for phone number input */
input[type="tel"]:-webkit-autofill {
    background-color: transparent !important;
    border-color: #d89b3c !important;
    box-shadow: 0 0 5px rgba(255, 165, 0, 0.5) !important;
}

/* Error border styling for invalid fields */
.custom-booking-form input.error-border,
.custom-booking-form textarea.error-border,
.custom-booking-form select.error-border {
    border-color: red !important;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.5) !important; /* Soft red glow */
}

/* Clear address button styling */
.clear-address-btn:hover {
    color: #333 !important;
    transform: translateY(-50%) scale(1.1);
}

.clear-address-btn:active {
    transform: translateY(-50%) scale(0.95);
}

/* Error message styling */
.custom-booking-form .error-msg {
    color: red;
    font-size: 12px;
    margin-top: -5px;
    display: block;
}

/* Select dropdown specific styles - reinforced */
.custom-booking-form select {
    background-color: #f9f9f9 !important;
    border: 1px solid #ccc;
    padding: 12px;
    padding-right: 35px; /* Make room for the arrow */
    border-radius: 5px;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e") !important;
    background-repeat: no-repeat !important;
    background-position: right 10px center !important;
    background-size: 20px !important;
    cursor: pointer;
}

/* Desktop layout - Grid */
@media (min-width: 768px) {
    .custom-booking-form {
        display: grid;
        grid-template-columns: 200px 1fr;
        gap: 5px 20px;
        align-items: start;
    }

    .custom-booking-form label {
        text-align: left;
        padding-top: 0;
        font-weight: 600;
        line-height: 1.5;
    }

    .custom-booking-form input,
    .custom-booking-form select {
        padding-top: 10px;
    }

    .custom-booking-form input,
    .custom-booking-form select,
    .custom-booking-form textarea {
        width: 100%;
    }

    .custom-booking-form .error-msg {
        grid-column: 2;
        margin-top: -10px;
    }

    .custom-booking-form .inline {
        grid-column: 2;
        margin-top: -10px;
    }

    .custom-booking-form > div:has(> input[type="checkbox"]) {
        grid-column: 2;
        margin-top: -10px;
    }

    .custom-booking-form div > input[type="checkbox"] + label {
        text-align: left;
        padding-top: 0;
        font-weight: normal;
    }

    /* Service type specific containers */
    #dropoff-container,
    #car-container,
    #hours-container {
        display: contents;
    }

    #dropoff-container.hidden,
    #car-container.hidden,
    #hours-container.hidden {
        display: none;
    }

    #dropoff-container label,
    #car-container label,
    #hours-container label {
        text-align: left;
        padding-top: 0;
    }
}

/* Mobile - Stack layout */
@media (max-width: 767px) {
    .custom-booking-form label {
        display: block;
        margin-bottom: 5px;
        font-weight: 600;
    }

    .custom-booking-form input,
    .custom-booking-form select,
    .custom-booking-form textarea {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }

    #dropoff-container,
    #car-container,
    #hours-container {
        display: block;
    }

    #dropoff-container.hidden,
    #car-container.hidden,
    #hours-container.hidden {
        display: none;
    }
}
