/* ========================================
   Shipping Info Plugin - Versione MINIMAL con WhatsApp
   Design discreto e non invasivo + Link WhatsApp
   ======================================== */

   .shipping-info-minimal {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    font-size: 14px;
    color: #495057;
}

/* Costs Section - Inline */
.shipping-costs-simple {
    margin-bottom: 15px;
    text-align: center;
}

.shipping-title {
    font-size: 16px;
    font-weight: 600;
    color: #343a40;
    margin-bottom: 8px;
    display: block;
}

.costs-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 14px;
}

.cost-item {
    color: #495057;
}

.cost-item strong {
    color: #007bff;
    font-weight: 600;
}

.cost-separator {
    color: #adb5bd;
    font-weight: bold;
}

/* CAP Checker - Compact */
.cap-check-simple {
    border-top: 1px solid #e9ecef;
    padding-top: 15px;
}

.cap-input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

#cap-input-minimal {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    transition: border-color 0.2s ease;
}

#cap-input-minimal:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
}

#check-cap-btn-minimal {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

#check-cap-btn-minimal:hover {
    background: #0056b3;
}

#check-cap-btn-minimal:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Result Display - Minimal */
.cap-result-minimal {
    margin-top: 12px;
    padding: 10px;
    border-radius: 4px;
    font-size: 13px;
    text-align: center;
    animation: slideDown 0.3s ease;
}

.cap-result-minimal.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.cap-result-minimal.error {
    background: linear-gradient(135deg, #f8d7da 0%, #ffeee8 100%);
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
}

.cap-result-minimal.loading {
    background: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.result-icon-minimal {
    margin-right: 5px;
}

/* ========================================
   STILI WHATSAPP - NUOVO
   ======================================== */

/* Link WhatsApp Base */
.whatsapp-link {
    color: #25D366 !important;
    font-weight: bold;
    text-decoration: none !important;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
    padding: 6px 12px;
    background: rgba(37, 211, 102, 0.1);
    border-radius: 20px;
    font-size: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(37, 211, 102, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.whatsapp-link:hover {
    color: white !important;
    background: #25D366;
    transform: scale(1.05);
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
}

.whatsapp-link:active {
    transform: scale(0.95);
}

/* Enhanced WhatsApp in Error State */
.cap-result-minimal.error .whatsapp-link {
    background: #25D366;
    color: white !important;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
    border: none;
    padding: 8px 14px;
    margin-left: 10px;
    margin-top: 5px;
    border-radius: 25px;
}

.cap-result-minimal.error .whatsapp-link:hover {
    background: #128C7E !important;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.5);
    transform: scale(1.08);
}

/* WhatsApp Icon Pulse Animation */
@keyframes whatsapp-pulse {
    0% { 
        transform: scale(1); 
        box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
    }
    50% { 
        transform: scale(1.05); 
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    100% { 
        transform: scale(1); 
        box-shadow: 0 3px 8px rgba(37, 211, 102, 0.3);
    }
}

.whatsapp-link:hover {
    animation: whatsapp-pulse 0.6s ease-in-out;
}

/* Active Cost Item Styles */
.cost-item.active {
    color: #007bff !important;
    font-weight: 600 !important;
}

.cost-item.active strong {
    color: #0056b3 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .shipping-info-minimal {
        padding: 15px;
        margin: 15px 0;
    }
    
    .costs-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .cost-separator {
        display: none;
    }
    
    .cap-input-row {
        flex-direction: column;
        gap: 8px;
    }
    
    #cap-input-minimal,
    #check-cap-btn-minimal {
        width: 100%;
    }
    
    /* WhatsApp Mobile Styles */
    .whatsapp-link {
        font-size: 13px;
        padding: 8px 16px;
        margin-left: 0;
        margin-top: 8px;
        display: flex;
        justify-content: center;
        width: auto;
        border-radius: 25px;
    }
    
    .cap-result-minimal.error .whatsapp-link {
        width: 100%;
        margin-left: 0;
        margin-top: 10px;
        padding: 10px 16px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .shipping-info-minimal {
        padding: 12px;
        font-size: 13px;
    }
    
    .shipping-title {
        font-size: 15px;
    }
    
    .cap-result-minimal {
        font-size: 12px;
        padding: 10px 8px;
    }
    
    .whatsapp-link {
        width: 100%;
        text-align: center;
        margin-top: 10px;
        font-size: 14px;
        padding: 12px 20px;
    }
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Loading Spinner Minimal */
.loading-spinner-minimal {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Focus States */
#cap-input-minimal.valid {
    border-color: #28a745;
    background-color: #f8fff9;
}

#cap-input-minimal.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .shipping-info-minimal {
        background: #fff;
        border: 2px solid #000;
    }
    
    #check-cap-btn-minimal {
        background: #000;
        border: 1px solid #000;
    }
    
    .whatsapp-link {
        background: #000 !important;
        color: #fff !important;
        border: 2px solid #000;
    }
    
    .whatsapp-link:hover {
        background: #333 !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .whatsapp-link:hover {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .shipping-info-minimal {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .shipping-title {
        color: #ecf0f1;
    }
    
    .cost-item {
        color: #bdc3c7;
    }
    
    #cap-input-minimal {
        background: #34495e;
        border-color: #4a5568;
        color: #ecf0f1;
    }
    
    .cap-result-minimal.success {
        background: #27ae60;
        color: white;
    }
    
    .cap-result-minimal.error {
        background: #e74c3c;
        color: white;
    }
}

/* Hover Effects Enhancement */
.shipping-info-minimal:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow 0.3s ease;
}

/* WhatsApp Success Animation */
@keyframes whatsapp-success {
    0% { 
        background: #25D366; 
        transform: scale(1);
    }
    50% { 
        background: #128C7E; 
        transform: scale(1.1);
    }
    100% { 
        background: #25D366; 
        transform: scale(1);
    }
}

.whatsapp-link.clicked {
    animation: whatsapp-success 0.4s ease-in-out;
}

/* Print Styles */
@media print {
    .shipping-info-minimal {
        box-shadow: none;
        border: 1px solid #000;
        background: white;
    }
    
    .whatsapp-link {
        display: none;
    }
    
    .cap-result-minimal.error::after {
        content: " - Contatta: +393403329933";
        font-weight: bold;
    }
}