/*
 * Stylesheet for the Rent‑A‑Car reservation plugin.
 *
 * This file is deliberately minimal and uses modern CSS features (flexbox,
 * variables) to ensure quick loading and excellent Core Web Vitals scores.  It
 * provides two layouts (horizontal and vertical) for the search form and
 * responsive styling for the results page.  Adjust colours and spacing to
 * match your theme.
 */

:root {
    --rentacar-primary: #0058a3;
    --rentacar-secondary: #004278;
    --rentacar-accent: #f5f5f5;
    --rentacar-text: #333;
}

/* Generic form styling */
.rentacar‑form {
    background: var(--rentacar-accent);
    padding: 1rem;
    border: 1px solid #ccc;
    margin-bottom: 1.5rem;
    /* Remove rounded corners for fields and buttons */
    border-radius: 0;
    font-size: 16px;
    color: var(--rentacar-text);
}
.rentacar‑form label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.rentacar‑form input,
.rentacar‑form select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #bbb;
    /* Remove border radius for fields */
    border-radius: 0;
    font-size: 1rem;
    box-sizing: border-box;
    color: var(--rentacar-text);
}
.rentacar‑actions {
    margin-top: 1rem;
}
/* Buttons */
.rentacar‑actions button {
    padding: 0.6rem 1.2rem;
    background: var(--rentacar-primary);
    color: #fff;
    border: none;
    /* Remove border radius for buttons */
    border-radius: 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}
.rentacar‑actions button:hover {
    background: var(--rentacar-secondary);
}

/* Required asterisk */
.rentacar‑form .required {
    color: red;
    margin-left: 0.2rem;
}

/* jQuery UI datepicker basic styling */
.ui-datepicker {
    background: #fff;
    border: 1px solid #ccc;
    padding: 0.5rem;
    z-index: 1000;
}
.ui-datepicker .ui-datepicker-header {
    background: var(--rentacar-primary);
    color: #fff;
    padding: 0.25rem;
    text-align: center;
    border: none;
}
.ui-datepicker table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.5rem;
}
.ui-datepicker th {
    text-align: center;
    padding: 0.25rem;
}
.ui-datepicker td {
    text-align: center;
    padding: 0.3rem;
}
.ui-datepicker td a {
    display: block;
    padding: 0.3rem;
    text-decoration: none;
    color: var(--rentacar-text);
}
.ui-datepicker .ui-state-active {
    background: var(--rentacar-primary);
    color: #fff;
}
.ui-datepicker .ui-state-highlight {
    background: var(--rentacar-secondary);
    color: #fff;
}

/* Horizontal layout */
.rentacar‑horizontal {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-end;
}
.rentacar‑horizontal .rentacar‑field {
    flex: 1 1 200px;
}

/* Vertical layout */
.rentacar‑vertical {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Results page grid */
.rentacar‑results .rentacar‑row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}
.rentacar‑results .rentacar‑col {
    flex: 1 1 200px;
}

/* Vehicle list */
.rentacar‑vehicle‑list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.rentacar‑vehicle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background: #fff;
    /* Remove radius to match design */
    border-radius: 0;
}
.rentacar‑vehicle .status {
    font-weight: 600;
}
.rentacar‑vehicle.available .status {
    color: #008800;
}
.rentacar‑vehicle.booked .status {
    color: #cc0000;
}

/* Vehicle image */
.rentacar‑vehicle img {
    width: 100px;
    height: auto;
}
.rentacar‑vehicle label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    cursor: pointer;
}
.rentacar‑vehicle input[type="radio"] {
    margin-right: 0.5rem;
}
.rentacar‑vehicle .car-name {
    flex: 1 1 auto;
    font-weight: 600;
}
.rentacar‑vehicle .car-price {
    white-space: nowrap;
    margin-left: auto;
    font-weight: 600;
}

/* Optional extras */
.rentacar‑extras {
    margin-top: 1rem;
    border-top: 1px solid #ddd;
    padding-top: 1rem;
}
.rentacar‑extras .rentacar‑extra {
    margin-bottom: 0.5rem;
}
.rentacar‑extras label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 600;
}
.rentacar‑extras select {
    width: auto;
    padding: 0.3rem;
    border: 1px solid #bbb;
    border-radius: 0;
}

/* Summary */
.rentacar‑summary {
    margin-top: 1rem;
    font-size: 1.2rem;
}

/* Admin page list */
.rentacar‑bookings {
    list-style: disc;
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    .rentacar‑horizontal {
        flex-direction: column;
    }
    .rentacar‑horizontal .rentacar‑field {
        flex: 1 1 100%;
    }
    .rentacar‑results .rentacar‑row {
        flex-direction: column;
    }
    .rentacar‑results .rentacar‑col {
        flex: 1 1 100%;
    }
}