/* ============================================
   SV Shipping Calculator — Segheria Veronese
   ============================================ */

.sv-shipping-title {
    font-size: 22px;
    color: #3a3a3a;
    margin: 24px 0 0;
}

#sv-shipping-calculator {
    background: #fff;
    border: 1px solid #e0d6c8;
    border-radius: 6px;
    padding: 24px;
    margin: 24px 0;
}

#sv-shipping-calculator h3 {
    margin: 0 0 16px;
    font-size: 18px;
    color: #3a3a3a;
    display: flex;
    align-items: center;
}

#sv-shipping-calculator h3 svg {
    color: #614b36;
}

/* Radio tipo spedizione */
.sv-shipping-type-wrapper {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.sv-shipping-radio {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border: 2px solid #e0d6c8;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 15px;
}

.sv-shipping-radio:hover {
    border-color: #614b36;
}

.sv-shipping-radio.active {
    border-color: #614b36;
    background: #faf6f1;
}

.sv-shipping-radio input[type="radio"] {
    margin: 0;
    accent-color: #614b36;
    width: 18px;
    height: 18px;
}

/* Area calcolatore */
#sv-shipping-calc-area {
    margin-top: 4px;
}

#sv-shipping-calc-area label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

.sv-shipping-input-row {
    display: flex;
    gap: 8px;
}

#sv-shipping-address {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

#sv-shipping-address:focus {
    border-color: #614b36;
    box-shadow: 0 0 0 2px rgba(97, 75, 54, 0.15);
}

#sv-shipping-calc-btn {
    padding: 10px 20px;
    background: #614b36;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}

#sv-shipping-calc-btn:hover {
    background: #4a3828;
}

#sv-shipping-calc-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Risultato */
.sv-shipping-result-data {
    margin-top: 12px;
    padding: 14px 16px;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    align-items: center;
    font-size: 15px;
}

.sv-result-success {
    background: #e8f5e3;
    border: 1px solid #b8dfa8;
    color: #2d5f1a;
}

.sv-result-warning {
    background: #fef3cd;
    border: 1px solid #f0d97a;
    color: #856404;
}

.sv-result-error {
    background: #fce4e4;
    border: 1px solid #f0b0b0;
    color: #8b1a1a;
}

.sv-distance {
    font-weight: 600;
}

.sv-cost {
    font-weight: 700;
    font-size: 16px;
}

.sv-cost-error {
    font-weight: 600;
    font-style: italic;
}

.sv-bancali {
    font-size: 13px;
    color: #666;
    width: 100%;
}

/* Ritiro */
#sv-shipping-ritiro-msg {
    margin-top: 4px;
    padding: 14px 16px;
    background: #f0f7ff;
    border: 1px solid #b8d4f0;
    border-radius: 5px;
    color: #1a4a6b;
}

#sv-shipping-ritiro-msg p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

/* Loading */
#sv-shipping-loading {
    margin-top: 12px;
    padding: 10px;
    color: #666;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sv-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-top-color: #614b36;
    border-radius: 50%;
    animation: sv-spin 0.6s linear infinite;
}

@keyframes sv-spin {
    to { transform: rotate(360deg); }
}

/* Messaggio pagina prodotto */
.sv-shipping-product-msg {
    clear: both;
}

/* Responsive */
@media (max-width: 600px) {
    .sv-shipping-input-row {
        flex-direction: column;
    }

    #sv-shipping-calc-btn {
        width: 100%;
    }

    .sv-shipping-result-data {
        flex-direction: column;
        gap: 4px;
    }

    .sv-bancali {
        width: auto;
    }
}

/* Fix: nasconde il Google Places Autocomplete dropdown z-index issue */
.pac-container {
    z-index: 999999 !important;
}
