/* ── EasyCarental Booking — Frontend Styles ── */

/* Grid veicoli */
.ecr-vehicle-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin: 24px 0;
}
@media (max-width: 768px) { .ecr-vehicle-grid { grid-template-columns: 1fr; } }
@media (max-width: 1024px) { .ecr-vehicle-grid { grid-template-columns: repeat(2, 1fr); } }

/* Card veicolo */
.ecr-vehicle-card {
    border: 1.5px solid #E0DDD8;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
    background: white;
}
.ecr-vehicle-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.10);
    border-color: #C8102E;
}
.ecr-vehicle-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.ecr-card-body { padding: 18px 20px 20px; }
.ecr-card-badge {
    display: inline-block;
    background: rgba(200,16,46,.1);
    color: #C8102E;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 8px;
    letter-spacing: .4px;
}
.ecr-card-body h3 { margin: 0 0 6px; font-size: 1.1rem; }
.ecr-card-body h3 a { color: #0D0D0D; text-decoration: none; }
.ecr-card-body h3 a:hover { color: #C8102E; }
.ecr-card-excerpt { font-size: 13px; color: #666; line-height: 1.6; margin: 0 0 12px; }
.ecr-card-specs { display: flex; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.ecr-card-specs span { font-size: 12px; color: #888; }
.ecr-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid #E0DDD8;
}
.ecr-card-price { font-size: 1.3rem; font-weight: 700; color: #0D0D0D; }
.ecr-card-price small { font-size: 12px; color: #888; font-weight: 400; }
.ecr-card-btn {
    background: #C8102E;
    color: white;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    transition: background .2s;
}
.ecr-card-btn:hover { background: #9A0C22; color: white; }

/* ── Form prenotazione ── */
.ecr-booking-wrap {
    background: #F5F5F3;
    border-radius: 12px;
    padding: 28px;
    margin: 24px 0;
}
.ecr-section-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #555;
    margin: 0 0 16px;
}
.ecr-date-pickers {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}
.ecr-date-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 140px; }
.ecr-date-field label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: #888; }
.ecr-date-field input[type="text"],
.ecr-date-field input[type="date"] {
    border: 1.5px solid #E0DDD8;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    background: white;
    outline: none;
    transition: border-color .2s;
    cursor: pointer;
}
.ecr-date-field input:focus { border-color: #C8102E; }
.ecr-date-arrow { font-size: 20px; color: #C8102E; padding-bottom: 10px; }

/* Risultato disponibilità */
.ecr-availability-result { margin: 14px 0 8px; font-size: 14px; font-weight: 500; }
.ecr-ok    { color: #1a7f37; }
.ecr-no    { color: #C8102E; }
.ecr-checking { color: #888; }
.ecr-price-summary {
    background: white;
    border-left: 3px solid #C8102E;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 8px 0 20px;
    font-size: 15px;
}
.ecr-price-label { color: #666; }
.ecr-price-value { font-weight: 700; color: #C8102E; font-size: 1.2rem; margin: 0 8px; }
.ecr-price-breakdown { font-size: 12px; color: #888; }

/* Form campi cliente */
.ecr-form { margin-top: 20px; }
.ecr-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
@media (max-width: 600px) { .ecr-form-row { grid-template-columns: 1fr; } }
.ecr-form-field { display: flex; flex-direction: column; gap: 5px; }
.ecr-form-field label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .7px; color: #888; }
.ecr-req { color: #C8102E; }
.ecr-form-field input,
.ecr-form-field textarea {
    border: 1.5px solid #E0DDD8;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    background: white;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}
.ecr-form-field input:focus,
.ecr-form-field textarea:focus { border-color: #C8102E; }

/* Bottone submit */
.ecr-submit-btn {
    width: 100%;
    background: #C8102E;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
    transition: background .2s;
    letter-spacing: .3px;
}
.ecr-submit-btn:hover { background: #9A0C22; }
.ecr-submit-btn:disabled { background: #aaa; cursor: not-allowed; }

/* Messaggi esito */
.ecr-form-result { margin-top: 14px; }
.ecr-success {
    background: #e6f4ea;
    color: #1a7f37;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}
.ecr-error {
    background: #fce8eb;
    color: #C8102E;
    padding: 14px 16px;
    border-radius: 8px;
    font-size: 14px;
}

/* ── Search form ── */
.ecr-search-form {
    background: rgba(255,255,255,.97);
    border-radius: 14px;
    padding: 24px;
    max-width: 820px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}
.ecr-search-tabs {
    display: flex;
    margin-bottom: 18px;
    border: 1.5px solid #E0DDD8;
    border-radius: 8px;
    overflow: hidden;
}
.ecr-stab {
    flex: 1;
    padding: 12px 10px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    background: white;
    color: #666;
    transition: all .2s;
}
.ecr-stab.active { background: #C8102E; color: white; }
.ecr-search-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
@media (max-width: 480px) { .ecr-search-fields { grid-template-columns: 1fr; } }
.ecr-sf { display: flex; flex-direction: column; gap: 5px; }
.ecr-sf label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .8px; color: #888; }
.ecr-sf input[type="date"] {
    border: 1.5px solid #E0DDD8;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
    width: 100%;
}
.ecr-sf input:focus { border-color: #C8102E; }
.ecr-search-btn {
    width: 100%;
    background: #C8102E;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 14px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}
.ecr-search-btn:hover { background: #9A0C22; }

/* jQuery UI datepicker override */
.ui-datepicker { font-size: 13px !important; }
.ui-datepicker .ui-state-highlight { background: #fce8eb !important; border-color: #C8102E !important; color: #C8102E !important; }
.ui-datepicker .ui-state-active { background: #C8102E !important; border-color: #C8102E !important; }
.ui-datepicker td.ui-datepicker-unselectable span { background: #f0f0f0; color: #bbb; text-decoration: line-through; }
