/* CAR360 – Reservations drawer
   Aligns with theme tokens: --clr-primary #E8311A, Manrope/Sora fonts. */

.c360res-sr { position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden; }

.c360res-backdrop {
    position: fixed; inset: 0;
    background: rgba(15,15,15,.55);
    z-index: 99998;
    opacity: 0; transition: opacity .25s ease;
}
.c360res-backdrop.is-open { opacity: 1; }

.c360res-drawer {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: 620px; max-width: 100vw;
    background: #fff;
    z-index: 99999;
    display: flex; flex-direction: column;
    transform: translateX(100%);
    transition: transform .3s cubic-bezier(.4,0,.2,1);
    box-shadow: -8px 0 32px rgba(0,0,0,.15);
    font-family: 'Manrope', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
}
.c360res-drawer.is-open { transform: translateX(0); }

@media (max-width: 900px) {
    .c360res-drawer { width: 100vw; }
}

/* Header */
.c360res-drawer__header {
    padding: 16px 20px;
    border-bottom: 1px solid #eee;
    display: flex; align-items: center; gap: 12px;
    background: #fafafa;
}
.c360res-drawer__car {
    display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0;
}
.c360res-drawer__car-img {
    width: 56px; height: 40px; object-fit: cover; border-radius: 6px;
    background: #eee; flex-shrink: 0;
}
.c360res-drawer__car-img:not([src]) { display:none; }
.c360res-drawer__car-meta { min-width: 0; }
.c360res-drawer__car-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700; font-size: 15px; line-height: 1.2;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.c360res-drawer__car-rate {
    font-size: 13px; color: #E8311A; font-weight: 600; margin-top: 2px;
}
.c360res-drawer__car-rate small { color: #888; font-weight: 500; }
.c360res-drawer__close {
    background: transparent; border: 0; cursor: pointer;
    padding: 8px; border-radius: 6px; color: #333;
    transition: background .15s;
}
.c360res-drawer__close:hover { background: #eee; }

/* Steps */
.c360res-steps {
    padding: 14px 20px 0;
    border-bottom: 1px solid #f0f0f0;
    background: #fff;
}
.c360res-steps ol {
    list-style: none; padding: 0; margin: 0;
    display: flex; gap: 4px; justify-content: space-between;
}
.c360res-step {
    display: flex; align-items: center; gap: 6px;
    font-size: 12px; color: #999; font-weight: 500;
    transition: color .2s;
}
.c360res-step span {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: #eee; color: #999; font-weight: 700; font-size: 11px;
    transition: all .2s;
}
.c360res-step.is-active { color: #E8311A; }
.c360res-step.is-active span { background: #E8311A; color: #fff; }
.c360res-step.is-done span { background: #22a06b; color: #fff; }
.c360res-step.is-done { color: #22a06b; }
@media (max-width: 480px) {
    .c360res-step { font-size: 0; }
    .c360res-step span { width: 26px; height: 26px; font-size: 12px; }
}
.c360res-steps__bar {
    height: 3px; background: #f0f0f0; border-radius: 2px;
    margin-top: 12px; overflow: hidden;
}
.c360res-steps__fill {
    height: 100%; width: 25%;
    background: #E8311A; border-radius: 2px;
    transition: width .3s ease;
}

/* Form */
.c360res-form {
    flex: 1; overflow-y: auto;
    display: flex; flex-direction: column;
    position: relative;
}
.c360res-panel {
    display: none;
    padding: 20px;
    animation: c360res-fade .25s ease;
}
.c360res-panel.is-active { display: block; }
@keyframes c360res-fade { from { opacity:0; transform: translateY(4px); } to { opacity:1; transform: none; } }

.c360res-h3 {
    font-family: 'Sora', sans-serif;
    font-size: 17px; font-weight: 700;
    margin: 0 0 16px; color: #111;
}

.c360res-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
    margin-bottom: 12px;
}
@media (max-width: 520px) {
    .c360res-row { grid-template-columns: 1fr; }
}
.c360res-field { display: block; }
.c360res-field--full { grid-column: 1 / -1; }
.c360res-field > span {
    display: block;
    font-size: 12px; font-weight: 600; color: #555;
    margin-bottom: 6px;
}
.c360res-field input,
.c360res-field select,
.c360res-field textarea {
    width: 100%; box-sizing: border-box;
    padding: 11px 12px;
    background: #faf7f4;
    border: 1px solid #e8e3de;
    border-radius: 8px;
    font-family: inherit; font-size: 15px; color: #1a1a1a;
    transition: border-color .15s, background .15s;
}
.c360res-field input:focus,
.c360res-field select:focus,
.c360res-field textarea:focus {
    outline: 0;
    border-color: #E8311A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,49,26,.12);
}
.c360res-field textarea { resize: vertical; min-height: 72px; }

/* Summary chip (step 1) */
.c360res-summary {
    display: flex; gap: 12px;
    background: #fff7f5; border: 1px solid #fde3de;
    padding: 14px 16px; border-radius: 10px;
    margin: 16px 0 8px;
}
.c360res-summary > div { flex: 1; }
.c360res-summary span { display: block; font-size: 11px; color: #999; text-transform: uppercase; letter-spacing: .5px; }
.c360res-summary strong {
    display: block; font-family: 'Sora', sans-serif;
    font-size: 18px; color: #E8311A; margin-top: 4px;
}

.c360res-hint { font-size: 12px; color: #888; margin: 8px 0 0; }

/* Location blocks */
.c360res-loc {
    border: 1px solid #eee; border-radius: 10px;
    padding: 14px; margin-bottom: 12px;
    background: #fdfdfd;
}
.c360res-loc__head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 10px;
}
.c360res-loc__label {
    font-family: 'Sora', sans-serif; font-weight: 700; font-size: 14px;
    color: #111;
}
.c360res-badge {
    font-size: 12px; font-weight: 600;
    padding: 4px 10px; border-radius: 999px;
    background: #f0f0f0; color: #555;
}
.c360res-badge.is-free { background: #e6f6ef; color: #1a7a4c; }
.c360res-badge.is-fee  { background: #fff2e6; color: #b56100; }
.c360res-badge.is-tbd  { background: #f0f0f0; color: #555; font-style: italic; }

.c360res-map-wrap { margin-top: 10px; }
.c360res-map {
    height: 220px; border-radius: 8px; overflow: hidden;
    border: 1px solid #eee;
    cursor: crosshair;
}
.c360res-map .leaflet-container { height: 100%; width: 100%; }
.c360res-map-hint {
    font-size: 11px; color: #888;
    margin: 6px 2px 0; display: flex; align-items: center; gap: 6px;
}
.c360res-map-hint::before {
    content: ""; display: inline-block; width: 8px; height: 8px;
    background: #E8311A; border-radius: 50%;
}

.c360res-check {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 10px 0; font-size: 13px; color: #444;
    cursor: pointer;
}
.c360res-check input { margin-top: 2px; accent-color: #E8311A; }

/* Recap */
.c360res-recap {
    border: 1px solid #eee; border-radius: 10px;
    overflow: hidden;
}
.c360res-recap .row {
    display: flex; padding: 10px 14px; border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}
.c360res-recap .row:last-child { border-bottom: 0; }
.c360res-recap .row.section {
    background: #fafafa; font-family: 'Sora', sans-serif; font-weight: 700; color: #111;
    font-size: 13px; text-transform: uppercase; letter-spacing: .4px;
}
.c360res-recap .k { flex: 0 0 45%; color: #666; }
.c360res-recap .v { flex: 1; color: #111; font-weight: 500; text-align: right; }
.c360res-recap .row.total { background: #fff7f5; }
.c360res-recap .row.total .v { color: #E8311A; font-weight: 700; font-family: 'Sora', sans-serif; }

/* Actions */
.c360res-actions {
    padding: 14px 20px;
    border-top: 1px solid #eee;
    background: #fff;
    display: flex; gap: 10px; justify-content: space-between;
    position: sticky; bottom: 0;
}
.c360res-actions[data-hidden] { display: none; }
.c360res-btn {
    flex: 1;
    padding: 12px 18px; border-radius: 8px;
    font-family: inherit; font-size: 14px; font-weight: 700;
    cursor: pointer; border: 0;
    transition: transform .12s, background .15s, box-shadow .15s;
}
.c360res-btn:active { transform: scale(.98); }
.c360res-btn--primary {
    background: #E8311A; color: #fff;
    box-shadow: 0 2px 8px rgba(232,49,26,.25);
}
.c360res-btn--primary:hover { background: #cf2915; }
.c360res-btn--primary:disabled { background: #f0b0a7; cursor: not-allowed; box-shadow: none; }
.c360res-btn--ghost {
    background: transparent; color: #555;
    border: 1px solid #ddd;
}
.c360res-btn--ghost:hover { background: #f5f5f5; }

/* Error */
.c360res-error {
    margin: 12px 20px 0;
    background: #fdecea; color: #b3261e; border: 1px solid #f5c0b8;
    border-radius: 8px; padding: 10px 14px; font-size: 13px;
}

/* Success */
.c360res-panel--success .c360res-success {
    text-align: center; padding: 20px;
}
.c360res-panel--success h3 {
    font-family: 'Sora', sans-serif; font-size: 20px; margin: 16px 0 8px; color: #111;
}
.c360res-panel--success p { color: #555; margin: 0 0 20px; line-height: 1.5; }

/* Trigger button (in single-vehicle template) */
.c360-vehicle__cta--book,
.c360res-trigger {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 14px 20px;
    background: #fff;
    color: #E8311A;
    border: 2px solid #E8311A;
    border-radius: 10px;
    font-family: 'Sora', sans-serif; font-weight: 700; font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    transition: background .15s, color .15s, transform .12s;
    width: 100%;
    box-sizing: border-box;
    margin-top: 10px;
}
.c360-vehicle__cta--book:hover,
.c360res-trigger:hover {
    background: #E8311A; color: #fff;
}
.c360-vehicle__cta--book:active,
.c360res-trigger:active { transform: scale(.98); }

/* Sticky bar variant */
.c360-vehicle__sticky-cta--book {
    background: #E8311A !important;
    color: #fff !important;
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 14px;
    border-radius: 8px;
    font-weight: 700; font-size: 13px;
    text-decoration: none;
    border: 0; cursor: pointer;
    font-family: inherit;
}

body.c360res-open { overflow: hidden; }

/* Flatpickr overrides — match theme accent */
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:hover,
.flatpickr-day.startRange:hover,
.flatpickr-day.endRange:hover {
    background: #E8311A !important;
    border-color: #E8311A !important;
    color: #fff !important;
}
.flatpickr-day.today {
    border-color: #E8311A !important;
    color: #E8311A;
}
.flatpickr-day.today:hover { color: #fff; }
.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-weekdays,
span.flatpickr-weekday {
    background: #fff !important;
    color: #111 !important;
    fill: #111 !important;
}
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: #E8311A !important;
    fill: #E8311A !important;
}
.flatpickr-calendar {
    box-shadow: 0 8px 32px rgba(0,0,0,.15) !important;
    border-radius: 10px !important;
    font-family: 'Manrope', system-ui, sans-serif !important;
}
/* Make the input keep the theme look after flatpickr wraps it */
.c360res-field input.flatpickr-input.form-control.input,
.c360res-field .flatpickr-input + input {
    padding: 11px 12px;
    background: #faf7f4;
    border: 1px solid #e8e3de;
    border-radius: 8px;
    font-family: inherit; font-size: 15px; color: #1a1a1a;
    width: 100%; box-sizing: border-box;
}
.c360res-field .flatpickr-input + input:focus {
    outline: 0;
    border-color: #E8311A;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(232,49,26,.12);
}
