/* Frontend Styles for Tarif Calculator */
.tarif-calculator {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.tarif-calculator h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    border-bottom: 2px solid #007cba;
    padding-bottom: 15px;
}

.tarif-form {
    margin-bottom: 25px;
}

.tarif-field-group {
    margin-bottom: 20px;
}

.tarif-field-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 600;
    font-size: 14px;
}

.tarif-field-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    background: #fff;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.tarif-field-group select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.tarif-field-group select:disabled {
    background: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.tarif-submit-btn {
    width: 100%;
    padding: 15px 20px;
    background: #007cba;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.tarif-submit-btn:hover {
    background: #005a87;
}

.tarif-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.tarif-result {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin-top: 20px;
}

.tarif-result h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.tarif-info {
    display: grid;
    gap: 12px;
}

.tarif-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #e9ecef;
}

.tarif-item:last-child {
    border-bottom: none;
}

.tarif-label {
    color: #666;
    font-weight: 500;
}

.tarif-value {
    color: #333;
    font-weight: 600;
    font-size: 16px;
}

.tarif-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin-top: 20px;
    color: #721c24;
    text-align: center;
}

/* Loading state */
.tarif-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.tarif-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .tarif-calculator {
        margin: 10px;
        padding: 20px;
    }
    
    .tarif-calculator h3 {
        font-size: 20px;
    }
    
    .tarif-field-group select {
        font-size: 14px;
        padding: 10px 12px;
    }
    
    .tarif-submit-btn {
        font-size: 14px;
        padding: 12px 15px;
    }
    
    .tarif-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tarif-value {
        font-size: 14px;
    }
}
