/*
 * REDESIGNED RENTWAY BRIDGE STYLES (v6 - "Find Booking" page)
 * Theme: Luxury, Minimal, Clean
 * This version adds styles for the [rentway_find_booking] shortcode.
 */

/* =================================================================== */
/* 1. SEARCH WIDGET STYLES (rentway_searchwidget)                      */
/* =================================================================== */

/* Use the ID for high specificity */
#rentway_searchcar.rentway-search-widget-wrapper {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    border: 1px solid #eee;
}

#rentway_searchcar.rentway-search-widget-wrapper .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}
#rentway_searchcar.rentway-search-widget-wrapper .form-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    text-align: left !important;
}

/* NEW MODERN INPUT STYLE (replaces theme's red-border style) */
#rentway_searchcar.rentway-search-widget-wrapper .form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #e0e0e0; /* Softer, modern border */
    border-radius: 8px; /* Rounded corners */
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f9f9f9; /* Light grey background */
    height: auto; /* Override theme defaults */
    box-shadow: none; /* Remove theme shadow */
    -webkit-appearance: none; /* Fix for iOS styling */
}
/* Explicitly override text inputs */
#rentway_searchcar.rentway-search-widget-wrapper input.form-control {
    color: #333;
}
/* Explicitly override select dropdowns */
#rentway_searchcar.rentway-search-widget-wrapper select.form-control {
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%3Cpath%20d%3D%22m5%206%205%208%205-8%22%20stroke%3D%22%23666%22%20stroke-width%3D%221.5%22%20fill%3D%22none%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px 16px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Focus style for all inputs */
#rentway_searchcar.rentway-search-widget-wrapper .form-control:focus {
    outline: none;
    border-color: #d9232d; /* Focus with theme red */
    background: #fff;
    box-shadow: 0 0 0 3px rgba(217, 35, 45, 0.1); /* Soft red glow */
}

/* Style the search button */
#rentway_searchcar.rentway-search-widget-wrapper .form-btn {
    margin-top: 10px;
}
#rentway_searchcar.rentway-search-widget-wrapper .submit-btn {
    width: 100%;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #d9232d; /* Red from your logo */
    color: #ffffff;
}
#rentway_searchcar.rentway-search-widget-wrapper .submit-btn:hover {
    background-color: #b01c24; /* Darker red */
    box-shadow: 0 5px 15px rgba(217, 35, 45, 0.2);
}


/* =================================================================== */
/* 2. BOOKING WIZARD STYLES (rentway_booking)                          */
/* =================================================================== */

/* --- Global Wizard Styles --- */
#checkout_wizard.rentway-booking-wrapper {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1a1a1a;
}

/* --- Wizard Step Header (Flat Tab Style) --- */
#checkout_wizard .steps {
    background: #ffffff; /* Clean white background */
    border-bottom: 1px solid #e5e7eb; /* Light border */
    padding: 0 30px; /* Spacing for the tabs */
    margin: 0;
}
#checkout_wizard .steps ul {
    display: flex; /* Makes tabs horizontal */
    justify-content: flex-start; /* Aligns tabs to the left */
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}
#checkout_wizard .steps li {
    flex: 0 1 auto; /* Tabs only take space they need */
    text-align: left;
    position: relative;
    border-bottom: 3px solid transparent; /* The inactive underline */
    margin: 0 30px 0 0; /* Space between tabs */
    padding: 0;
    margin-bottom: -2px; /* Pulls the active border over the main border */
}
#checkout_wizard .steps li.current {
    border-bottom-color: #d9232d; /* Red from your logo */
}
#checkout_wizard .steps li.done {
    opacity: 0.7; /* Completed steps are slightly faded */
}
#checkout_wizard .steps li a,
#checkout_wizard .steps li a:hover,
#checkout_wizard .steps li a:active {
    display: block;
    text-decoration: none;
    color: #555;
    font-size: 16px; /* Larger, cleaner font */
    font-weight: 600;
    padding: 20px 4px; /* Vertical padding gives the header height */
    margin: 0;
    background: none !important;
}
#checkout_wizard .steps li.current a {
    color: #1a1a1a; /* Active tab text is darker */
}
#checkout_wizard .steps li .number {
    display: none; /* Hide the "1", "2", "3" numbers */
}
#checkout_wizard .title {
    display: none; /* Hide the wizard's default h2 titles */
}

/* --- Wizard Content Section --- */
#checkout_wizard .content {
    padding: 30px 40px 20px 40px;
    margin: 0;
    background: #fff;
}
#checkout_wizard section {
    padding: 0;
    margin: 0;
}
.rentway-step-title {
    font-size: 24px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 10px;
    color: #1a1a1a;
}
.rentway-step-subtitle {
    font-size: 16px;
    color: #666;
    margin-top: 0;
    margin-bottom: 30px;
}

/* --- Wizard Navigation Buttons (Next/Previous) --- */
#checkout_wizard .actions {
    background: #fff;
    border-top: 1px solid #f0f0f0;
    padding: 20px 40px 30px 40px;
    margin: 0;
}
#checkout_wizard .actions ul {
    display: flex;
    justify-content: space-between;
    margin: 0;
    padding: 0;
    list-style: none;
}
#checkout_wizard .actions li {
    margin: 0;
    padding: 0;
}
#checkout_wizard .actions li.disabled {
    opacity: 0.5;
}
#checkout_wizard .actions a,
#checkout_wizard .actions a:hover,
#checkout_wizard .actions a:active {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
}
#checkout_wizard .actions a[href="#previous"] {
    background-color: #f0f0f0;
    color: #555 !important;
}
#checkout_wizard .actions a[href="#previous"]:hover {
    background-color: #e0e0e0;
}
#checkout_wizard .actions a[href="#next"],
#checkout_wizard .actions a[href="#finish"] {
    background-color: #333;
    color: #ffffff !important;
}
#checkout_wizard .actions a[href="#next"]:hover,
#checkout_wizard .actions a[href="#finish"]:hover {
    background-color: #1a1a1a;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Step 1: Vehicle & Extras --- */
.rentway-step-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}
.vehicle-card {
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}
.vehicle-card img {
    width: 100%;
    height: auto;
    display: block;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
}
.vehicle-card h4 {
    font-size: 20px;
    margin: 0;
    padding: 20px 20px 15px 20px;
}
.booking-details-summary {
    padding: 0 20px 20px 20px;
    font-size: 14px;
}
.booking-details-summary > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #666;
}
.booking-details-summary > div strong {
    color: #1a1a1a;
    margin-right: 10px;
}
.price-summary-box {
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
.price-summary-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}
.price-line {
    display: flex;
    justify-content: space-between;
    font-size: 15px;
    color: #555;
    margin-bottom: 10px;
}
.price-line strong {
    color: #1a1a1a;
    font-weight: 700;
}
.price-line.total {
    font-size: 18px;
    font-weight: 700;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.price-line.total strong {
    font-size: 20px;
    color: #333;
}
.extras-box h4 {
    margin-top: 0;
    margin-bottom: 15px;
}
.extras-list .extra-item {
    display: flex;
    align-items: center;
    background: #fdfdfd;
    border: 2px solid #eee; /* Thicker border for selection */
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}
.extras-list .extra-item:hover {
    border-color: #d9232d; /* Hover with red border */
}
/* This class is added by rentwaybridge.js */
.extras-list .extra-item.extra-item-checked {
    border-color: #d9232d; /* Selected with red border */
    background: #fff8f8; /* Faint red background */
}
.extras-list .extra-item.extra-item-checked .extra-info strong {
    color: #d9232d;
}

.extras-list .extra-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 15px;
    flex-shrink: 0;
}
.extra-info strong {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}
.extra-info span {
    font-size: 14px;
    color: #777;
}

/* --- Step 2: Customer Info (Booking Wizard) --- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.form-group {
    display: flex;
    flex-direction: column;
}
.form-group.grid-col-2 { grid-column: span 2; }
.form-group.grid-col-4 { grid-column: span 4; }

.form-grid .form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    text-align: left !important;
}
.form-grid .form-group input[type="text"],
.form-grid .form-group input[type="email"],
.form-grid .form-group input[type="tel"],
.form-grid .form-group textarea,
.form-grid .form-group input.form-control,
.form-grid .form-group textarea.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 15px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff; /* White background for wizard inputs */
}
.form-grid .form-group input:focus,
.form-grid .form-group textarea:focus,
.form-grid .form-group input.form-control:focus,
.form-grid .form-group textarea.form-control:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 3px rgba(51, 51, 51, 0.1);
}
.form-grid .form-group textarea {
    resize: vertical;
}

/* --- Step 3: Payment Summary --- */
.payment-summary {
    text-align: center;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eee;
    border-radius: 8px;
}
.payment-loader {
    padding: 40px;
    color: #999;
}
#paymentoutputdiv form {
    margin-top: 20px;
}
#paymentoutputdiv .btn-success {
    background-color: #333;
    color: #fff;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
}
#paymentoutputdiv .btn-success:hover {
    background-color: #1a1a1a;
}

/* =================================================================== */
/* 3. RESPONSIVE MEDIA QUERIES                                         */
/* =================================================================== */

@media (max-width: 768px) {
    /* Responsive Booking Wizard */
    #checkout_wizard.rentway-booking-wrapper {
        margin: 20px auto;
        border-radius: 0;
        box-shadow: none;
    }
    #checkout_wizard .content {
        padding: 20px;
    }
    #checkout_wizard .actions {
        padding: 20px;
    }
    #checkout_wizard .steps {
        padding: 0 15px;
    }
    #checkout_wizard .steps li {
        margin-right: 20px;
    }
    #checkout_wizard .steps li a {
        font-size: 14px;
        padding: 15px 2px;
    }
    .rentway-step-grid {
        grid-template-columns: 1fr; /* Stack columns */
    }
    .form-grid {
        grid-template-columns: 1fr; /* Stack form fields */
    }
    .form-group.grid-col-2,
    .form-group.grid-col-4 {
        grid-column: span 1; /* Reset spans */
    }
    
    /* Responsive Search Widget */
    #rentway_searchcar.rentway-search-widget-wrapper {
        padding: 20px;
    }
}


/* =================================================================== */
/* 4. CAR LIST & BUTTON STYLES (User Request)                          */
/* =================================================================== */

/* --- Style for Car List "Réserver" Button --- */
.cars-listing-results .my-list a[href*="car="] {
    display: inline-block;
    padding: 10px 24px;
    background: #333 !important; /* Black button */
    color: #fff !important; /* White text */
    text-decoration: none !important;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    transition: all 0.3s ease;
}
.cars-listing-results .my-list a[href*="car="]:hover {
    background: #1a1a1a !important; /* Darker black */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}
.cars-listing-results .my-list img {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* --- Force Wizard Button Styles (to match screenshot) --- */
#checkout_wizard .actions a[href="#previous"] {
    background-color: #f3f4f6 !important; /* Light grey */
    color: #9ca3af !important; /* Grey text */
    border: 1px solid #e5e7eb !important;
}
#checkout_wizard .actions a[href="#previous"]:hover {
    background-color: #e5e7eb !important;
}
#checkout_wizard .actions a[href="#next"],
#checkout_wizard .actions a[href="#finish"] {
    background-color: #333 !important; /* Dark grey/black */
    color: #ffffff !important;
    border: 1px solid #333 !important;
}
#checkout_wizard .actions a[href="#next"]:hover,
#checkout_wizard .actions a[href="#finish"]:hover {
    background-color: #1a1a1a !important;
    border-color: #1a1a1a !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* --- Style Unstyled Car List (from screenshot) --- */
.cars-listing-results .my-list {
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.cars-listing-results .my-list h3 {
    font-size: 20px;
    font-weight: 700;
    margin-top: 15px;
    margin-bottom: 15px;
}
.cars-listing-results .my-list span {
    font-size: 15px;
    color: #555;
}
.cars-listing-results .my-list span.pull-right {
    font-weight: 600;
    color: #1a1a1a;
}
.cars-listing-results .my-list hr.clearfixtaw {
    margin-top: 10px;
    margin-bottom: 10px;
    border: 0;
    border-top: 1px solid #eee;
}


/* =================================================================== */
/* 5. NEW: FIND MY BOOKING STYLES (rentway_find_booking)               */
/* =================================================================== */

.rentway-find-booking-wrapper {
    max-width: 600px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    padding: 30px 40px;
    border: 1px solid #eee;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.rentway-find-booking-form .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}
.rentway-find-booking-form .form-group label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}
.rentway-find-booking-form .form-control {
    width: 100%;
    padding: 14px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #f9f9f9;
}
.rentway-find-booking-form .form-control:focus {
    outline: none;
    border-color: #d9232d;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(217, 35, 45, 0.1);
}
.rentway-find-booking-form .form-btn {
    margin-top: 10px;
}
.rentway-find-booking-form .submit-btn {
    width: 100%;
    padding: 14px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #333;
    color: #ffffff;
}
.rentway-find-booking-form .submit-btn:hover {
    background-color: #1a1a1a;
}
.rentway-booking-error {
    background: #fff8f8;
    border: 1px solid #d9232d;
    color: #d9232d;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}
.rentway-contact-note {
    background: #f9f9f9;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
    font-size: 15px;
}
.rentway-contact-note p {
    margin: 0;
    line-height: 1.6;
}
.rentway-find-booking-btn {
    display: inline-block;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    margin-top: 20px;
    padding: 12px 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f0f0f0;
    color: #555;
    text-decoration: none;
}
.rentway-find-booking-btn:hover {
    background-color: #e0e0e0;
}