/**
 * Stili per il calcolatore auto con IVA
 */

/* Stili per i sottotitoli nelle card */
.auto-subtitle {
    font-size: 14px;
    color: #888;
    margin: 5px 0 10px 0;
    font-weight: 400;
    font-style: italic;
    line-height: 1.3;
}

/* Dettagli prezzo nella card */
.auto-pricing-details {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.pricing-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.pricing-row:last-child {
    border-bottom: none;
}

.pricing-row.highlight {
    background: rgba(0, 123, 255, 0.1);
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin: 5px -5px;
}

.pricing-row.total {
    background: rgba(40, 167, 69, 0.1);
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
    margin: 5px -5px;
    font-size: 1.1em;
}

.pricing-label {
    color: #6c757d;
    font-size: 0.9em;
}

.pricing-value {
    font-weight: bold;
    color: #212529;
}

.pricing-vat-note {
    text-align: center;
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    margin-top: 10px;
}

/* Stili per pricing semplificato (slider) */
.auto-pricing-simple {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin: 10px 0;
}

.pricing-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 15px;
}

.anticipo-info,
.canone-info {
    flex: 1;
    text-align: center;
}

.anticipo-info .pricing-label,
.canone-info .pricing-label {
    display: block;
    color: #6c757d;
    font-size: 0.8em;
    margin-bottom: 4px;
}

.anticipo-info .pricing-value,
.canone-info .pricing-value {
    display: block;
    font-weight: bold;
    color: #212529;
    font-size: 1.1em;
}

.canone-info .pricing-value.highlight {
    color: #007bff;
    font-size: 1.3em;
}

.pricing-note {
    text-align: center;
    font-size: 0.75em;
    color: #6c757d;
    font-style: italic;
    border-top: 1px solid #dee2e6;
    padding-top: 8px;
}

/* Prezzo semplice (quando mancano dati) */
.auto-price-simple {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 10px 0;
}

.auto-price-simple .price-label {
    display: block;
    color: #6c757d;
    font-size: 0.9em;
    margin-bottom: 5px;
}

.auto-price-simple .price-value {
    display: block;
    font-size: 1.5em;
    font-weight: bold;
    color: #28a745;
}

.auto-price-simple .price-vat-note {
    font-size: 0.8em;
    color: #6c757d;
    font-style: italic;
    margin-top: 5px;
}

/* Calcolatore */
.auto-calculator {
    background: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin: 15px 0;
}

.calculator-header h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1.1em;
    border-bottom: 1px solid #dee2e6;
    padding-bottom: 10px;
}

.auto-calculator label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #495057;
}

.custom-deposit-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    margin-bottom: 15px;
    box-sizing: border-box;
    
    /* Safari compatibility fixes */
    -webkit-appearance: none;
    -moz-appearance: textfield;
    appearance: none;
    
    /* Remove Safari default styling */
    -webkit-border-radius: 4px;
    -webkit-box-shadow: none;
    
    /* Ensure consistent font rendering */
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    
    /* Safari text selection fix */
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    
    /* Prevent zoom on iOS Safari */
    font-size: max(16px, 14px);
}

/* Safari-specific input number spinner removal */
.custom-deposit-input::-webkit-outer-spin-button,
.custom-deposit-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.custom-deposit-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    
    /* Safari focus fixes */
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    -webkit-box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    -webkit-tap-highlight-color: transparent;
}

.vat-option {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.vat-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.vat-option input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.2);
}

/* Risultati del calcolo */
.calculated-results {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.calculation-results h5 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 1em;
}

.result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
}

.result-row.highlight {
    background: rgba(0, 123, 255, 0.1);
    padding: 10px;
    border-radius: 4px;
    margin: 5px -10px;
    font-weight: bold;
}

.result-row.total {
    background: rgba(40, 167, 69, 0.1);
    padding: 10px;
    border-radius: 4px;
    margin: 5px -10px;
    font-weight: bold;
    font-size: 1.05em;
}

/* Responsive */
@media (max-width: 768px) {
    .pricing-row,
    .result-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
    
    .pricing-label {
        font-size: 0.8em;
    }
    
    .pricing-value {
        font-size: 1.1em;
    }
}

/* Reset button styling */
.search-reset {
    background: #6c757d;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
}

.search-reset:hover {
    background: #5a6268;
}

/* No results message */
.no-results {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-style: italic;
}

/* === OFFER CARDS SEMPLICI === */
.offer-card {
    display: block;
    visibility: visible;
    opacity: 1;
}

.offer-card:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 15px rgba(0,124,186,0.2) !important;
}

.offer-card.active {
    border-color: #f3993d !important;
    box-shadow: 0 4px 15px rgba(243,153,61,0.3) !important;
}

/* Forza visibilità contenuto cards */
.offer-card .offer-duration,
.offer-card .offer-price,
.offer-card .offer-deposit,
.offer-card .price-amount,
.offer-card .price-period {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.offer-card .offer-duration {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    color: #333 !important;
    font-weight: 600 !important;
}

.offer-card .offer-price {
    margin-bottom: 8px !important;
}

.offer-card .price-amount,
.offer-card .offer-price {
    font-size: 24px !important;
    font-weight: bold !important;
    color: #f3993d !important;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1) !important;
}

.offer-card .price-period {
    font-size: 14px !important;
    color: #666 !important;
}

.offer-card .offer-deposit {
    font-size: 12px !important;
    color: #666 !important;
    margin-top: 5px !important;
}

/* Container per le offer cards */
.offers-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

/* Responsive per mobile */
@media (max-width: 768px) {
    .offers-cards {
        flex-direction: column !important;
    }
    
    .offer-card {
        width: 100% !important;
        margin: 5px 0 !important;
    }
}