/**
 * Calculateur de forfaits eSIM - Styles COMPACTS
 * GoDataTravel - Version 2.0 COMPACT
 * 
 * Fichier: /css/calculator.css
 */

/* ==========================================
   FORMULAIRE DU CALCULATEUR - COMPACT
   ========================================== */

.calculator-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px 0;
}

.calculator-container {
    max-width: 1150px;
    margin: 0 auto;
    background: white;
    border-radius: 14px;
    padding: 20px 35px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.calculator-title {
    text-align: center;
    color: #333;
    font-size: 1.15rem;
    margin-bottom: 4px;
}

.calculator-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 12px;
    font-size: 0.8rem;
}

.calculator-form {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 15px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 180px;
}

.calculate-plan-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #f7931e 0%, #e8850a 100%);
    color: white;
    border: none;
    padding: 0 28px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 42px;
    min-height: 42px;
    white-space: nowrap;
}

.calculate-plan-btn:hover {
    background: linear-gradient(135deg, #e8850a 0%, #d4780a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(247, 147, 30, 0.4);
}

.form-group label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
    font-size: 11px;
}

.form-group select,
.form-group input {
    padding: 8px 10px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
    background: white;
    cursor: pointer;
}

.form-group select:focus,
.form-group input:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

/* ==========================================
   RÉSULTATS DU CALCULATEUR - COMPACT
   ========================================== */

#calculator-results,
#results {
    display: none;
    max-width: 650px;
    margin: 0 auto;
    padding: 20px 12px;
}

.results-header {
    text-align: center;
    margin-bottom: 20px;
}

.results-header h2 {
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 6px;
}

.results-meta {
    color: #666;
    font-size: 0.85rem;
}

.results-section {
    margin-bottom: 20px;
}

.section-title {
    font-size: 1rem;
    color: #333;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 2px solid #667eea;
}

/* ==========================================
   GRILLE DE FORFAITS - COMPACT
   ========================================== */

.plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.plan-card {
    background: white;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    border: 2px solid #f0f0f0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plan-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: #667eea;
}

/* Badge */
.plan-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-recommended {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Plan header */
.plan-header {
    margin-bottom: 10px;
    padding-right: 60px;
}

.plan-name {
    font-size: 0.95rem;
    color: #333;
    margin: 0 0 3px 0;
}

.plan-data {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    margin: 0;
}

/* Prix */
.plan-price {
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 800;
    color: #333;
}

.price-currency {
    font-size: 0.85rem;
    color: #666;
}

/* Durée */
.plan-duration {
    color: #888;
    margin-bottom: 10px;
    font-size: 0.75rem;
}

/* Features */
.plan-features {
    list-style: none;
    padding: 0;
    margin: 0 0 12px 0;
}

.plan-features li {
    padding: 4px 0;
    color: #555;
    font-size: 0.75rem;
    border-bottom: 1px solid #f5f5f5;
}

.plan-features li:last-child {
    border-bottom: none;
}

/* Bouton */
.btn-select-plan {
    width: 100%;
    padding: 8px;
    background: linear-gradient(135deg, #f7931e 0%, #e8850a 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-select-plan:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 12px rgba(247, 147, 30, 0.4);
}

/* ==========================================
   MODAL CHECKOUT - COMPACT
   ========================================== */

#checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 12px;
}

.checkout-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 380px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.35);
}

.checkout-modal-header {
    padding: 15px 18px 12px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.checkout-modal-header::before {
    display: none !important;
}

.checkout-modal-header h2 {
    margin: 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 700;
}

.close-modal {
    background: #f5f5f5;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
}

.checkout-modal-body {
    padding: 18px;
}

.selected-plan-summary {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f4ff 100%);
    border: 2px solid #e8edff;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 15px;
}

.selected-plan-summary h3 {
    margin: 0 0 10px 0;
    color: #1e5799;
    font-size: 1rem;
    font-weight: 700;
}

.selected-plan-summary p {
    margin: 6px 0;
    color: #555;
    font-size: 12px;
}

.checkout-form-group {
    margin-bottom: 12px;
}

.checkout-form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #333;
    font-size: 11px;
}

.checkout-form-group input,
.checkout-form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 13px;
    min-height: 40px;
}

.checkout-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 15px;
}

.checkout-form-actions .btn {
    flex: 1;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: none;
}

.checkout-form-actions .btn-primary {
    background: linear-gradient(135deg, #f7931e 0%, #e6850e 100%);
    color: white;
}

.checkout-form-actions .btn-secondary {
    background: #f5f5f5;
    color: #666;
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 768px) {
    .calculator-container {
        padding: 15px;
        margin: 0 8px;
        max-width: 100%;
    }
    
    .calculator-form {
        flex-direction: column;
        flex-wrap: wrap;
    }
    
    .form-group {
        width: 100%;
        flex: 1 1 100%;
    }
    
    .calculator-title {
        font-size: 1.1rem;
    }
    
    .calculate-plan-btn {
        width: 100%;
        margin-top: 5px;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .price-amount {
        font-size: 1.3rem;
    }
    
    .calculate-plan-btn {
        padding: 9px 15px;
        font-size: 12px;
    }
}
