.iaq-widget {
    max-width: 640px;
    margin: 0 auto;
    font-family: 'Roboto', -apple-system, "Segoe UI", sans-serif;
}
.iaq-widget, .iaq-card, .iaq-field { margin-top: 0 !important; }
.iaq-card > *:first-child { margin-top: 0 !important; }

/* Card bianca senza bordo/alone esterni */
.iaq-card {
    background: #fff;
    border-radius: 18px;
    padding: 0 34px 32px;
}

.iaq-title {
    margin: 0 0 24px;
    font-size: 26px;
    font-weight: 400;
    color: #1b2430;
    line-height: 1.2;
}

/* Campo URL a tutta larghezza */
.iaq-field {
    width: 100%;
    box-sizing: border-box;
    padding: 16px 18px;
    border: 1px solid #d9dee3;
    border-radius: 10px;
    font-size: 16px;
    color: #1b2430;
    margin-bottom: 18px;
}
.iaq-field::placeholder { color: #9aa4ae; }
.iaq-field:focus {
    outline: none;
    border-color: #5799ff;
    box-shadow: 0 0 0 3px rgba(87, 153, 255, 0.15);
}

/* Bottone Genera preventivo — largo */
.iaq-widget .iaq-card button.iaq-btn-generate {
    width: 100%;
    box-sizing: border-box !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 20px !important;
    border: none !important;
    background: #5799ff;
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1 !important;
    cursor: pointer;
}
.iaq-widget .iaq-card button.iaq-btn-generate:hover { background: #3d84f0; }
.iaq-widget .iaq-card button.iaq-btn-generate:disabled { opacity: .6; cursor: default; }

/* Riga con i due bottoni finali, affiancati (Scarica preventivo + Chiedi informazioni) */
.iaq-widget .iaq-card .iaq-actions {
    display: flex;
    gap: 12px;
    margin-top: 14px;
    flex-wrap: wrap;
}
.iaq-widget .iaq-card .iaq-actions > * {
    flex: 1 1 0;
    min-width: 200px;
}

/* Bottone Scarica preventivo — verde #3cbf84 */
.iaq-widget .iaq-card a.iaq-btn-download {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 20px !important;
    border: none !important;
    background: #3cbf84;
    color: #fff;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1 !important;
    text-align: center;
    text-decoration: none;
}
.iaq-widget .iaq-card a.iaq-btn-download:hover { background: #33a873; color: #fff; }

/* Bottone Chiedi informazioni su questa auto — outline, affiancato al download */
.iaq-widget .iaq-card button.iaq-btn-contact {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    padding: 0 20px !important;
    border: 1px solid #5799ff !important;
    background: #fff;
    color: #3d84f0;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 400;
    line-height: 1 !important;
    text-align: center;
    cursor: pointer;
}
.iaq-widget .iaq-card button.iaq-btn-contact:hover { background: #f0f6ff; }

/* Caricamento */
.iaq-loading {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    color: #4a5560;
    font-size: 14px;
}
.iaq-spinner {
    width: 20px; height: 20px;
    border: 3px solid #d1d5db;
    border-top-color: #5799ff;
    border-radius: 50%;
    animation: iaq-spin .8s linear infinite;
    flex-shrink: 0;
}
@keyframes iaq-spin { to { transform: rotate(360deg); } }

/* Avviso (es. trasporto non calcolato) */
.iaq-warning-box {
    margin-top: 14px;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
}

/* Errori: sotto al bottone, piccoli */
.iaq-error {
    margin-top: 12px;
    color: #c0392b;
    font-size: 12px;
    line-height: 1.4;
}

/* Riepilogo costi in pagina (tra i due bottoni) */
.iaq-summary {
    margin-top: 14px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 18px 20px;
}
.iaq-summary-title {
    margin: 0 0 12px;
    font-size: 17px;
    font-weight: 500;
    color: #1b2430;
}
.iaq-summary-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
}
.iaq-summary-table td {
    padding: 8px 1ch;
    border-bottom: 1px solid #ececec;
}
.iaq-summary-table td:last-child {
    text-align: right;
    white-space: nowrap;
}
.iaq-summary-table tr:last-child td { border-bottom: none; }
.iaq-summary-total td {
    font-weight: 500;
    font-size: 17px;
    padding-top: 12px;
}
.iaq-summary-text {
    margin: 12px 0 0;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
}

/* Avviso "auto fiscalmente nuova" sotto la tabella dei costi (IVA al margine) */
.iaq-fiscal-warning {
    margin: 12px 0 0;
    font-size: 13px;
    font-weight: 700;
    color: #92400e;
    line-height: 1.5;
}

/* ---- Modal "Chiedi informazioni su questa auto" ---- */
.iaq-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}
.iaq-modal {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 16px;
    padding: 30px 28px 28px;
    box-sizing: border-box;
    font-family: 'Roboto', -apple-system, "Segoe UI", sans-serif;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}
.iaq-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    border-radius: 8px;
}
.iaq-modal-close:hover { background: #f3f4f6; color: #1b2430; }
.iaq-modal-title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 500;
    color: #1b2430;
    padding-right: 28px;
}
.iaq-modal-subtitle {
    margin: 0 0 18px;
    font-size: 13px;
    color: #6b7280;
}
.iaq-modal .iaq-field { margin-bottom: 14px; }
.iaq-modal .iaq-btn-generate { margin-top: 4px; }
.iaq-modal-success {
    margin-top: 6px;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.5;
}
