/* ============================================================
   МОДАЛЬНОЕ ОКНО ОПЛАТЫ (ТАРИФ)
   ============================================================ */

.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.payment-modal {
    background: white;
    border-radius: 20px;
    max-width: 560px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    animation: paymentModalIn 0.3s ease;
}

@keyframes paymentModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.payment-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 2px solid #f1f5f9;
}

.payment-modal-header h3 {
    margin: 0;
    font-size: 1.25rem;
    color: #0f2c3d;
}

.payment-modal-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: #f1f5f9;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
}

.payment-modal-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

.payment-modal-body {
    padding: 20px 24px;
}

/* ===== БЛОК ТАРИФА ===== */
.tariff-block {
    background: linear-gradient(145deg, #f8fafc, #ffffff);
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e2e8f0;
    margin-bottom: 20px;
    transition: all 0.3s;
}

.tariff-block:hover {
    border-color: #1f6392;
    box-shadow: 0 4px 20px rgba(31, 99, 146, 0.08);
}

.tariff-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.tariff-plan {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tariff-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 14px;
    border-radius: 12px;
    background: #dcfce7;
    color: #16a34a;
    display: inline-block;
    letter-spacing: 0.5px;
    width: fit-content;
}

.tariff-name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    color: #0f2c3d;
    line-height: 1.2;
}

.tariff-price {
    text-align: right;
}

.tariff-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #1f6392;
    display: block;
    line-height: 1.2;
}

.tariff-period {
    font-size: 0.85rem;
    color: #94a3b8;
}

.tariff-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 16px 0 20px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.tariff-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    color: #334155;
}

.feature-icon {
    font-size: 1rem;
    width: 24px;
    flex-shrink: 0;
}

/* ===== КНОПКА ОПЛАТЫ (ССЫЛКА) ===== */
.tariff-pay-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(145deg, #1f6392, #0e4a6e);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 4px;
    text-decoration: none;
    box-sizing: border-box;
}

.tariff-pay-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(31, 99, 146, 0.35);
    background: linear-gradient(145deg, #0e4a6e, #073a55);
    color: white;
    text-decoration: none;
}

.tariff-pay-btn:active {
    transform: translateY(0);
}

.tariff-pay-btn:visited {
    color: white;
}

.tariff-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    justify-content: center;
}

.tariff-notice span:first-child {
    font-size: 1rem;
}

/* ===== БЛОК БЕЗОПАСНОСТИ ===== */
.payment-security {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    background: #f0f7ff;
    border-radius: 14px;
    border: 1px solid #bfdbfe;
    margin-bottom: 20px;
}

.security-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.security-text h4 {
    margin: 0 0 2px 0;
    font-size: 0.95rem;
    color: #1e40af;
}

.security-text p {
    margin: 0;
    font-size: 0.85rem;
    color: #3b82f6;
}

/* ===== СЕКЦИЯ FAQ ===== */
.payment-faq-section {
    margin-top: 4px;
}

.faq-title {
    font-size: 1rem;
    color: #0f2c3d;
    margin: 0 0 12px 0;
}

.payment-faq {
    background: #f8fafc;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 10px;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-faq:hover {
    border-color: #94a3b8;
}

.payment-faq summary {
    font-weight: 600;
    color: #0f2c3d;
    font-size: 0.9rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}

.payment-faq summary::-webkit-details-marker {
    display: none;
}

.payment-faq summary::before {
    content: '▶';
    font-size: 0.65rem;
    color: #94a3b8;
    transition: transform 0.2s;
}

.payment-faq[open] summary::before {
    transform: rotate(90deg);
}

.payment-faq p {
    margin: 10px 0 0 0;
    padding: 10px 0 0 0;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    font-size: 0.85rem;
    line-height: 1.6;
}

/* ===== ФУТЕР МОДАЛКИ ===== */
.payment-modal-footer {
    padding: 16px 24px 24px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: flex-end;
}

.payment-btn-close {
    padding: 10px 32px;
    background: #e2e8f0;
    color: #475569;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.payment-btn-close:hover {
    background: #cbd5e1;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 640px) {
    .payment-modal {
        border-radius: 16px;
        margin: 10px;
    }
    
    .payment-modal-header {
        padding: 16px 18px 12px;
    }
    
    .payment-modal-body {
        padding: 16px 18px;
    }
    
    .tariff-block {
        padding: 18px;
    }
    
    .tariff-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .tariff-price {
        text-align: left;
    }
    
    .tariff-amount {
        font-size: 1.6rem;
    }
    
    .tariff-name {
        font-size: 1.3rem;
    }
    
    .tariff-feature {
        font-size: 0.85rem;
    }
    
    .tariff-pay-btn {
        font-size: 0.95rem;
        padding: 12px 16px;
    }
    
    .payment-modal-footer {
        padding: 12px 18px 18px;
    }
}