/* ============================================
   PAYMENT MODAL & LANGUAGE SWITCHER
   ============================================ */

/* --- Language Switcher --- */
.lang-switcher {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 999;
    display: flex;
    gap: 4px;
    background: white;
    padding: 4px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.lang-btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 16px;
    color: var(--color-text-light);
    transition: all 0.2s ease;
}

.lang-btn:hover {
    color: var(--color-primary);
}

.lang-btn.active {
    background: var(--color-primary);
    color: white;
}

/* --- Payment Modal --- */
.payment-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-y: auto;
}

.payment-modal.active {
    display: flex;
}

.payment-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
    z-index: 1;
}

.modal-close:hover {
    background: #e0e0e0;
    color: #333;
}

/* --- Payment Panel --- */
.payment-panel {
    padding: 30px;
}

.payment-panel h2 {
    font-size: 1.4rem;
    color: var(--color-primary-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.payment-panel h2 i {
    color: var(--color-primary);
}

.payment-amount {
    font-size: 1.1rem;
    color: var(--color-text);
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.payment-amount strong {
    font-size: 1.5rem;
    color: var(--color-primary);
}

/* --- Payment Options Grid --- */
.payment-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.payment-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.payment-option:hover {
    border-color: var(--color-primary);
    background: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.payment-option-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 24px;
}

.payment-option-icon.paypal-icon {
    background: #003087;
    color: white;
}

.payment-option-icon.card-icon {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.payment-option-icon.gpay-icon {
    background: #4285f4;
    color: white;
}

.payment-option-icon.applepay-icon {
    background: #000;
    color: white;
}

.payment-option span {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text);
}

/* --- Card Form (Stripe-like) --- */
.card-form {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.card-form h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--color-primary-dark);
}

.form-group {
    margin-bottom: 15px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
}

.form-group input {
    width: 100%;
    padding: 14px 15px;
    font-size: 1rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    font-family: 'Monaco', 'Consolas', monospace;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-group input::placeholder {
    color: #aaa;
    font-family: var(--font-body);
}

.card-brands {
    position: absolute;
    right: 12px;
    top: 38px;
    display: flex;
    gap: 5px;
}

.card-brands i {
    font-size: 1.5rem;
    color: #ccc;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.btn-pay {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s ease;
    margin-top: 10px;
}

.btn-pay:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.3);
}

.secure-note {
    text-align: center;
    font-size: 0.8rem;
    color: #888;
    margin-top: 15px;
}

.secure-note i {
    color: #28a745;
    margin-right: 5px;
}

/* --- Vietnam Payment --- */
.bank-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.qr-code {
    background: white;
    padding: 10px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.qr-code img {
    max-width: 250px;
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.bank-details {
    width: 100%;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 12px;
}

.bank-logo {
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.bank-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: #00843D;
    letter-spacing: 1px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #e9ecef;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    font-size: 0.85rem;
    color: #666;
    min-width: 100px;
}

.detail-row .value {
    flex: 1;
    font-weight: 600;
    color: var(--color-text);
    font-family: 'Monaco', 'Consolas', monospace;
}

.copy-btn {
    width: 36px;
    height: 36px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

.copy-btn.copied {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.transfer-note {
    margin-top: 20px;
    padding: 15px;
    background: #fff3e0;
    border-radius: 10px;
    font-size: 0.9rem;
    color: #e65100;
}

.transfer-note i {
    margin-right: 5px;
}

.transfer-note p {
    margin: 5px 0;
}

/* --- Updated Payment Buttons --- */
.payment-methods {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.payment-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.payment-btn.international {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.payment-btn.international:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.payment-btn.vietnam {
    background: linear-gradient(135deg, #00843D, #00a550);
    color: white;
}

.payment-btn.vietnam:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 132, 61, 0.4);
}

/* --- Share Buttons Update --- */
.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.twitter:hover {
    background: #0d8ecf;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.whatsapp:hover {
    background: #1da851;
}

.share-btn.pinterest {
    background: #E60023;
}

.share-btn.pinterest:hover {
    background: #c7001f;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .lang-switcher {
        top: auto;
        bottom: 20px;
        right: 20px;
    }
    
    .payment-modal {
        padding: 10px;
    }
    
    .payment-modal-content {
        max-height: 95vh;
    }
    
    .payment-panel {
        padding: 20px;
    }
    
    .payment-options-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .payment-option {
        padding: 15px 10px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .qr-code img {
        max-width: 200px;
    }
    
    .detail-row {
        flex-wrap: wrap;
    }
    
    .detail-row .label {
        min-width: auto;
        width: 100%;
        margin-bottom: 5px;
    }
}

/* --- Processing Animation --- */
.processing {
    pointer-events: none;
    opacity: 0.7;
}

.processing::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* --- Success State --- */
.payment-success {
    text-align: center;
    padding: 40px 20px;
}

.payment-success .success-icon {
    width: 80px;
    height: 80px;
    background: #28a745;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.payment-success .success-icon i {
    font-size: 40px;
    color: white;
}

.payment-success h3 {
    font-size: 1.5rem;
    color: #28a745;
    margin-bottom: 10px;
}

.payment-success p {
    color: #666;
    margin-bottom: 20px;
}
