/* ==============================================
   Calculateur Zone de Livraison - Styles
   ============================================== */

.pizzeria-delivery-calculator {
    background: #ffffff;
    border: 2px solid #e74c3c;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    margin: 20px auto;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.1);
}

.calculator-header {
    text-align: center;
    margin-bottom: 25px;
}

.calculator-header h3 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #e74c3c;
}

.calculator-header p {
    font-size: 1.1em;
    color: #7f8c8d;
    margin: 0;
}

.calculator-form {
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.delivery-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 1em;
    border: 2px solid #ddd;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.delivery-input:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.delivery-button {
    padding: 15px 30px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.delivery-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.delivery-button:active {
    transform: translateY(0);
}

.delivery-button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Résultats */
.delivery-result {
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    animation: slideDown 0.3s ease;
}

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

.delivery-result.success {
    background: #d4edda;
    border: 2px solid #28a745;
    color: #155724;
}

.delivery-result.error {
    background: #f8d7da;
    border: 2px solid #dc3545;
    color: #721c24;
}

.delivery-result.info {
    background: #fff3cd;
    border: 2px solid #ffc107;
    color: #856404;
}

.result-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
    display: block;
}

.result-message {
    font-size: 1.1em;
    margin-bottom: 15px;
    line-height: 1.6;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.detail-item {
    background: rgba(255, 255, 255, 0.7);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.detail-label {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 5px;
    display: block;
}

.detail-value {
    font-size: 1.3em;
    font-weight: bold;
    color: #333;
}

.calculator-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.info-text {
    font-size: 0.95em;
    color: #7f8c8d;
    margin: 0;
}

/* Style Compact */
.pizzeria-delivery-calculator[data-style="compact"] {
    padding: 20px;
    max-width: 500px;
}

.pizzeria-delivery-calculator[data-style="compact"] .calculator-header h3 {
    font-size: 1.5em;
}

.pizzeria-delivery-calculator[data-style="compact"] .form-group {
    flex-direction: column;
}

.pizzeria-delivery-calculator[data-style="compact"] .delivery-button {
    width: 100%;
}

/* Style Inline */
.pizzeria-delivery-calculator[data-style="inline"] {
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
}

.pizzeria-delivery-calculator[data-style="inline"] .calculator-header {
    text-align: left;
    margin-bottom: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .pizzeria-delivery-calculator {
        padding: 20px;
        margin: 10px;
    }
    
    .form-group {
        flex-direction: column;
    }
    
    .delivery-button {
        width: 100%;
    }
    
    .result-details {
        grid-template-columns: 1fr;
    }
    
    .calculator-header h3 {
        font-size: 1.5em;
    }
}

/* Animation de chargement */
.delivery-button.loading::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Call to Action dans le résultat */
.result-cta {
    margin-top: 20px;
    text-align: center;
}

.result-cta-button {
    display: inline-block;
    padding: 12px 30px;
    background: #e74c3c;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.result-cta-button:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.result-cta-button.secondary {
    background: #3498db;
}

.result-cta-button.secondary:hover {
    background: #2980b9;
}