/* NoleGiglio — Frontend CSS */
:root {
    --ng-blu:    #279bd4;
    --ng-verde:  #1fb79d;
    --ng-nero:   #000;
    --ng-grigio: #9a9a9a;
    --ng-bianco: #fff;
    --ng-bg:     #f5f5f5;
    --ng-bordo:  #e0e0e0;
    --ng-errore: #d32f2f;
}

* { box-sizing: border-box; }

.ng-wrap { margin: 0 auto; font-size: 16px; color: #000; font-family: inherit; }
.ng-wrap h1 { font-size: 35px; color: #279bd4; margin-bottom: 24px; }
.ng-wrap h2 { font-size: 28px; color: #000; margin-bottom: 20px; }
.ng-wrap h3 { font-size: 22px; color: #000; margin-bottom: 14px; }
.ng-veicolo-card h3 {color: #279bd4}

/* ============================================================
   FILTRO RICERCA
   ============================================================ */
.ng-filtro-wrap {
    background-image: linear-gradient(160deg, #279bd4 0%, #1fb79d 100%);
    border-radius: 6px;
    margin-bottom: 36px;
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 0px;
}

.ng-filtro-riga {
    display: flex;
    gap: 20px;
    align-items: flex-end;
}

.ng-filtro-gruppo {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-width: 130px;
    padding-top: 20px;
    padding-bottom: 20px;
}

:root { --ng-btn-cerca-larghezza: 260px; }
select#ng_ora_ritiro:disabled,
select#ng_ora_consegna:disabled {
    background: #fff;
    opacity: 1;
    color: #000;
    -moz-appearance: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    -o-appearance: none;
    appearance: none;
}
.ng-filtro-gruppo label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: #fff;
    padding-bottom: 10px;
}

.ng-filtro-gruppo input[type="date"],
.ng-filtro-gruppo select {
    padding: 11px 12px;
    border: 1px solid #fff;
    border-radius: 4px;
    font-size: 15px;
    color: #000;
    background: #fff;
    width: 100%;
    appearance: auto;
    height: 45px;
}

.ng-filtro-gruppo select:disabled {
    background: #EDEDED;
    color: #888;
    cursor: not-allowed;
}

.ng-filtro-gruppo input:focus,
.ng-filtro-gruppo select:focus {
    outline: 2px solid var(--ng-blu);
    border-color: var(--ng-blu);
}

.ng-filtro-gruppo--btn { flex: 0 0 auto; min-width: var(--ng-btn-cerca-larghezza); }
.ng-filtro-gruppo--btn label { visibility: hidden; }

.ng-tariffa-nota {
margin: 0px 4px 30px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    color: #000;
    background: #26a4c121;
    border-left: 3px solid var(--ng-blu);
    border-radius: 4px;
}
.ng-tariffa-nota .ng-nota-evidenza { color: #000; font-weight: 600; }

#ng-form-ricerca .ng-btn-cerca {
    background: transparent;
    color: #fff;
    padding: 11px 20px;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
    letter-spacing: 1px;
    text-transform: uppercase;
    white-space: nowrap;
    width: 100%;
    height: 45px;
    border-radius: 4px;
    transition: background 0.2s;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
#ng-form-ricerca .ng-btn-cerca:hover { background: transparent; color: #fff; }

.ng-form-error {
    background: #fdecea;
    border-left: 4px solid var(--ng-errore);
    padding: 12px 16px;
    color: var(--ng-errore);
    font-size: 15px;
    margin-top: 12px;
    border-radius: 2px;
}

.ng-loader { display: flex; align-items: center; gap: 12px; padding: 20px 0; color: var(--ng-grigio); font-size: 15px; }
.ng-spinner { width: 22px; height: 22px; border: 3px solid var(--ng-bordo); border-top-color: var(--ng-blu); border-radius: 50%; animation: ng-spin 0.7s linear infinite; flex-shrink: 0; }
@keyframes ng-spin { to { transform: rotate(360deg); } }

/* ============================================================
   CARD VEICOLO — RISULTATI
   ============================================================ */
.ng-risultati-wrap { margin-top: 8px; }
.ng-riepilogo-date { font-size: 15px; color: var(--ng-grigio); margin-bottom: 20px; }

.ng-veicolo-card {
    border: 1px solid var(--ng-bordo);
    border-radius: 8px;
    background: #fff;
    margin-bottom: 24px;
    display: flex;
    overflow: hidden;
}

.ng-veicolo-foto {
    width: 260px;
    min-height: 200px;
    flex-shrink: 0;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.ng-veicolo-foto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ng-veicolo-foto-placeholder {
    color: var(--ng-grigio);
    font-size: 13px;
    text-align: center;
    padding: 20px;
}

.ng-veicolo-contenuto {
    flex: 1;
    padding: 0px;
    display: flex;
    flex-direction: column;
}

.ng-veicolo-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.ng-veicolo-titolo h3 {
    font-size: 22px;
    color: #000;
    margin: 0 0 8px;
	font-weight: 700;
}

.ng-veicolo-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 20px;
    margin-right: 6px;
}
.ng-badge-anno { background: var(--ng-blu); color: #fff; }
.ng-badge-alim { background: #eee; color: #555; }

.ng-veicolo-prezzo {
    text-align: right;
    flex-shrink: 0;
}
.ng-prezzo-numero {
    font-size: 36px;
    font-weight: 700;
    color: #000;
    line-height: 1;
}
.ng-prezzo-unita {
    font-size: 14px;
    color: var(--ng-grigio);
    display: block;
    margin-top: 3px;
}

.ng-veicolo-mid {
    display: flex;
    gap: 28px;
    flex: 1;
    flex-wrap: wrap;
}

.ng-info-table {
    border-collapse: collapse;
    font-size: 15px;
    flex: 1;
    min-width: 160px;
}
.ng-info-table td { padding: 5px 0; border-bottom: 1px solid var(--ng-bg); }
.ng-info-table td:first-child { color: var(--ng-grigio); width: 110px; font-size: 13px; }
.ng-incluso {padding: 20px 0px 0px 20px;}
.ng-incluso, .ng-escluso { flex: 1; min-width: 150px; }
.ng-incluso strong, .ng-escluso strong {
    display: block; margin-bottom: 6px;
    font-size: 11px; color: var(--ng-grigio);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.ng-incluso ul, .ng-escluso ul { margin: 0; padding: 0; list-style: none; }
.ng-incluso ul li, .ng-escluso ul li { padding-bottom: 10px; font-size: 14px; }
/*.ng-incluso ul li::before { content: '+ '; color: var(--ng-verde); font-weight: 700; }
.ng-escluso ul li::before { content: '- '; color: var(--ng-errore); font-weight: 700; }*/

.ng-veicolo-bottom {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
}

.ng-totale-testo { font-size: 14px; color: var(--ng-grigio); }
.ng-totale-testo strong { color: #000; font-size: 16px; }
.ng-disponibili { font-size: 13px; color: var(--ng-grigio); margin: 0; }

/* ============================================================
   BOTTONI
   ============================================================ */
.ng-btn {
    display: inline-block; padding: 12px 28px;
    font-size: 15px; font-weight: 700; cursor: pointer;
    border: none; text-decoration: none;
    transition: background 0.2s; border-radius: 4px;
}
#ng-modal-step-1 .ng-btn--primario, #ng-btn-continua,
#ng-btn-richiedi-otp, #ng-btn-verifica-otp, #ng-btn-continua, #ng-btn-richiedi-otp, #ng-btn-verifica-otp { background-image: linear-gradient(150deg, var(--ng-blu) 0%, var(--ng-verde) 100%); color: #fff; }
.ng-btn--primario:hover { background: var(--ng-verde)!important; color: #fff; }
.ng-btn--verde { background: var(--ng-verde); color: #fff; }
.ng-btn--verde:hover { background: #189e87; color: #fff; }
.ng-btn--secondario { background: #ededed; color: black;font-weight:400 }
.ng-btn--secondario:hover { background: #a7a7a7; color: #fff; }
.ng-btn--prenota { background-image: linear-gradient(150deg, var(--ng-blu) 0%, var(--ng-verde) 100%); color: #fff; }
.ng-btn--prenota:hover { background:var(--ng-verde); }
.ng-btn:disabled { background: #9a9a9a5e; cursor: not-allowed;color:#fff }

.ng-torna-ricerca { margin-top: 12px; font-size: 15px; }
.ng-torna-ricerca a { color: var(--ng-blu); text-decoration: underline; cursor: pointer; }

/* ============================================================
   MODAL FLUSSO PRENOTAZIONE
   ============================================================ */
.ng-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    overflow-y: auto;
    padding: 40px 20px;
    backdrop-filter: blur(4px);
}
.ng-modal-overlay.aperto { display: flex; align-items: flex-start; justify-content: center; }

.ng-modal {
    background: #fff;
    width: 100%;
    max-width: 700px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    margin: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.ng-modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--ng-bordo);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-shrink: 0;
}

.ng-modal-step-bar {
    display: flex;
    align-items: center;
    flex: 1;
}

.ng-modal-step-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ng-grigio);
    font-weight: 600;
}

.ng-step-num {
    width: 28px; height: 28px;
    border-radius: 50%;
    border: 2px solid var(--ng-bordo);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0; background: #fff;
    transition: background 0.2s, border-color 0.2s;
}

.ng-modal-step-item.active { color: #000; }
.ng-modal-step-item.active .ng-step-num { background: var(--ng-blu); border-color: var(--ng-blu); color: #fff; }
.ng-modal-step-item.completato .ng-step-num { background: var(--ng-verde); border-color: var(--ng-verde); color: #fff; }

.ng-modal-step-linea { flex: 1; height: 2px; background: var(--ng-bordo); margin: 0 10px; transition: background 0.3s; }
.ng-modal-step-linea.completata { background: var(--ng-verde); }

.ng-modal-riepilogo {
    padding: 12px 24px;
    background: var(--ng-bg);
    border-bottom: 1px solid var(--ng-bordo);
    display: flex;
    align-items: center;
    gap: 14px;
    flex-shrink: 0;
}

.ng-modal-riepilogo-foto {
    width: 64px;
    object-fit: cover;
    border-radius: 4px;
    flex-shrink: 0;
    background: #ddd;
    overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.ng-modal-riepilogo-foto img { width: 100%; height: 100%; object-fit: cover; }

.ng-modal-riepilogo-testo strong { display: block; font-size: 15px; color: #000; }
.ng-modal-riepilogo-testo span { font-size: 13px; color: var(--ng-grigio); }

.ng-modal-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

/* Sicurezza: tutti gli step nascosti di default */
.ng-modal-step-content { display: none; }

/* ============================================================
   FORM NEL MODAL
   ============================================================ */
.ng-sezione-titolo {
    font-size: 12px; font-weight: 700; color: var(--ng-blu);
    border-bottom: 2px solid var(--ng-blu); padding-bottom: 4px;
    margin: 22px 0 12px; text-transform: uppercase;
}
.ng-sezione-titolo:first-child { margin-top: 0; }

.ng-form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ng-form-group { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 4px; }
.ng-form-group--full { flex: 1 1 100%; }
.ng-form-group--small { flex: 0 0 100px; max-width: 100px; }

.ng-form-group label { font-size: 13px; font-weight: 600; color: #000; }

.ng-form-group input[type="text"],
.ng-form-group input[type="email"],
.ng-form-group input[type="tel"],
.ng-form-group input[type="date"],
.ng-form-group input[type="number"],
.ng-form-group input[type="password"],
.ng-form-group input[type="file"],
.ng-form-group select,
.ng-form-group textarea {
    padding: 9px 10px; border: 1px solid var(--ng-bordo);
    font-size: 15px; color: #000; background: #fff;
    width: 100%; border-radius: 4px;
}
.ng-form-group input:focus, .ng-form-group select:focus { outline: 2px solid #279bd436; border-color:#279bd4!important; }
.ng-form-group input.ng-campo-errore { border-color: var(--ng-errore) !important; }

.ng-campo-msg { font-size: 12px; display: none; }
.ng-msg-errore { color: var(--ng-errore); }
.ng-upload-info { font-size: 12px; color: var(--ng-grigio); }
.ng-form-row--azioni { margin-top: 18px; }

.ng-checkbox-label {
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 12px !important;
    line-height: 1.4; }
.ng-checkbox-label a {color:#000!important;text-decoration:underline!important}
.ng-checkbox-label input[type="checkbox"] { width: 17px; height: 17px; flex-shrink: 0; margin-top: 0px; cursor: pointer; }
.ng-checkboxes-gruppo { margin-bottom: 8px; display: flex;flex-direction: column;}

.ng-contratto-box { background: var(--ng-bg); border: 1px solid var(--ng-bordo); padding: 16px; border-radius: 4px; }
.ng-contratto-letto-ok { color: var(--ng-verde); font-weight: 700; margin-top: 10px; font-size: 15px; }

.ng-riepilogo-box { background: var(--ng-bg); border: 1px solid var(--ng-bordo); padding: 14px 18px; border-radius: 4px; margin-bottom: 30px;}
.ng-riepilogo-riga { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--ng-bordo); font-size: 16px; }
.ng-riepilogo-riga:last-child { border-bottom: none; }
.ng-riepilogo-riga span { color: var(--ng-grigio); }
.ng-riepilogo-totale strong { color: var(--ng-blu); font-size: 20px; }

.ng-form-success { background: #e8f5e9; border-left: 4px solid var(--ng-verde); padding: 14px 18px; color: #1b5e20; font-size: 16px; border-radius: 2px; }

.ng-conferma-wrap { max-width: 600px; margin: 40px auto; }
.ng-conferma-wrap h2 { font-size: 28px; color: #000; margin-bottom: 16px; }
.ng-conferma-wrap .ng-form-success { margin-bottom: 20px; }

/* ============================================================
   FOOTER NAVIGAZIONE MODAL
   ============================================================ */
.ng-modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--ng-bordo);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    flex-shrink: 0;
}

.ng-modal-footer-destra { display: flex; gap: 12px; align-items: center; }

.ng-btn--termina {
    background: #ededed;
    color: #000;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    border-radius: 4px;
    transition: border-color 0.2s, color 0.2s;
}
.ng-btn--termina:hover { background-color: #a7a7a7; color: #fff; }

.ng-btn--errore { background: var(--ng-errore); color: #fff; }
.ng-btn--errore:hover { background: #b71c1c; color: #fff; }

.ng-modal-footer.nascosto { display: none; }

/* ============================================================
   ALERT PERSONALIZZATO TERMINA
   ============================================================ */
#ng-alert-termina { position: fixed; inset: 0; z-index: 999999; }

.ng-alert-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.5); }

.ng-alert-box {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    background: #fff; padding: 32px 28px;
    border-radius: 8px; max-width: 400px; width: 90%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3); text-align: center;
}
.ng-alert-box p { font-size: 16px; color: #000; margin-bottom: 24px; line-height: 1.5; }
.ng-alert-azioni { display: flex; gap: 12px; justify-content: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 700px) {
    .ng-veicolo-card { flex-direction: column; }
    .ng-veicolo-foto { width: 100%; height: 300px; min-height: 0; }
    .ng-veicolo-contenuto { padding: 0px; }
    .ng-filtro-riga { flex-wrap: wrap; }
    .ng-filtro-gruppo { flex: 1 1 45%; }
    .ng-modal-body { padding: 16px; }
    .ng-modal-header { padding: 12px 16px; }
    .ng-modal-footer { padding: 12px 16px; }
    .ng-modal-step-item span:not(.ng-step-num) { display: none; }
    .ng-form-row { flex-direction: column; gap: 10px; }
    .ng-form-group--small { flex: 1 1 100%; max-width: 100%; }
    .ng-veicolo-mid { flex-direction: column; gap: 14px; }
    .ng-veicolo-top { flex-direction: column; }
    .ng-veicolo-prezzo { text-align: left; }
	.ng-filtro-riga {gap:0px 10px}
	.ng-filtro-wrap {padding: 20px 10px 0px;}
	.ng-filtro-gruppo {padding-top:0px}
	.ng-filtro-gruppo--btn {flex-basis:100%; min-width:0;}
	.ng-filtro-gruppo--btn label {display:none;}
	#ng-form-ricerca .ng-btn-cerca {width:100%;}
	.ng-filtro-gruppo label {font-size: 12px;}
	.ng-filtro-gruppo input[type="date"],
    .ng-filtro-gruppo select {
        -webkit-appearance: none;
        appearance: none;
        min-width: 0;
        width: 100% !important;
    }
	.ng-incluso {padding: 15px 15px 0px 15px;}
	.ng-escluso {border-left:0px;border-radius:0px;}
	.riga_info {padding: 10px 15px;}
	.ng-veicolo-bottom {flex-wrap: nowrap;}
	.ng-modal-riepilogo div#ng-modal-riepilogo-foto {display: none;}
	.ng-modal-riepilogo-testo strong, .ng-modal-riepilogo-testo span {font-size:12px}
	
}

/* ============================================================
   TIMER PRENOTAZIONE
   ============================================================ */
.ng-modal-timer {
    margin-left: auto;
    flex-shrink: 0;
    text-align: right;
}

.ng-timer-label {
    display: block;
    font-size: 11px;
    color: var(--ng-grigio);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.ng-timer-valore {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: var(--ng-blu);
    font-variant-numeric: tabular-nums;
    transition: color 0.3s;
}

.ng-timer-valore.urgente { color: var(--ng-errore); }
.ng-escluso {
    display: grid;
	border-left: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
	border-radius: 0px 0px 0px 10px;
}
.riga_info {
    display: flex;
    font-size: 14px;
    align-items: center;
	padding: 10px;
    column-gap: 10px;
    border-bottom: 1px solid #e0e0e0;
}
.riga_info div:first-child {
    width: 50%;
}
.ng-escluso .riga_info:last-child {border-bottom:0px}
.riga_info div:last-child {
    width: 50%;
}
button#ng-btn-nuova-ricerca {
    background: #ededed;
    color: #000;
    border: 0px;
    font-weight: 400;
}