/* Payment Modal Styles */
.payment-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
    padding-top: max(20px, env(safe-area-inset-top));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    animation: fadeIn 0.2s ease;
    overflow-y: auto; /* Enable scroll if content too tall */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.payment-modal {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: calc(100vh - 40px); /* Prevent overflow */
    max-height: calc(100dvh - 40px); /* Use dynamic viewport height on mobile */
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
    overflow-y: auto; /* Scroll if content too tall */
    margin: auto; /* Center vertically when scrolling */
}

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

.payment-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.payment-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.payment-modal-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-modal-close:hover {
    background: rgba(255, 77, 77, 0.2);
    transform: rotate(90deg);
}

.payment-modal-body {
    padding: 24px;
    max-height: calc(100vh - 200px); /* Reserve space for header */
    max-height: calc(100dvh - 200px);
    overflow-y: auto; /* Scroll body if needed */
}

.payment-plan-info {
    text-align: center;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(9, 190, 188, 0.1);
    border-radius: 12px;
    border: 1px solid rgba(9, 190, 188, 0.2);
}

.payment-plan-info h3 {
    margin: 0 0 8px 0;
    font-size: 1.25rem;
    color: white;
}

.payment-price-info {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
}

.price-usd {
    font-size: 2rem;
    font-weight: 800;
    color: #09BEBC;
}

.price-vnd {
    font-size: 1rem;
    color: #94a3b8;
}

.payment-methods {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.payment-method-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 16px;
    color: white;
}

.payment-method-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(9, 190, 188, 0.3);
    border-color: #09BEBC;
    background: rgba(9, 190, 188, 0.1);
}

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

.payment-method-info {
    flex: 1;
    text-align: left;
}

.payment-method-name {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.payment-method-desc {
    font-size: 0.875rem;
    color: #94a3b8;
}

.payment-method-arrow {
    font-size: 1.5rem;
    color: #09BEBC;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s;
}

.payment-method-btn:hover .payment-method-arrow {
    opacity: 1;
    transform: translateX(0);
}

.payment-security-note {
    text-align: center;
    font-size: 0.875rem;
    color: #94a3b8;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

.payment-loading {
    text-align: center;
    padding: 40px 20px;
    font-size: 1.125rem;
    color: #09BEBC;
}

.payment-error {
    text-align: center;
    padding: 40px 20px;
    color: #ff6b6b;
}

.retry-btn {
    margin-top: 20px;
    padding: 12px 32px;
    background: rgba(9, 190, 188, 0.2);
    border: 1px solid #09BEBC;
    border-radius: 8px;
    color: #09BEBC;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.retry-btn:hover {
    background: rgba(9, 190, 188, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(9, 190, 188, 0.4);
}

/* Responsive */
@media (max-width: 640px) {
    .payment-modal-overlay {
        padding: 0;
        align-items: flex-end; /* Align to bottom on mobile */
    }

    .payment-modal {
        max-width: 100%;
        width: 100%;
        border-radius: 20px 20px 0 0;
        max-height: 90vh; /* Leave space for status bar */
        max-height: 90dvh;
        margin: 0;
    }

    .payment-modal-body {
        max-height: calc(90vh - 80px); /* Adjust for header on mobile */
        max-height: calc(90dvh - 80px);
    }

    .payment-modal-header {
        padding: 20px;
    }

    .payment-modal-header h2 {
        font-size: 1.25rem;
    }

    .price-usd {
        font-size: 1.5rem;
    }

    .payment-method-btn {
        padding: 16px;
    }

    .payment-method-icon {
        font-size: 1.5rem;
    }

    .payment-method-name {
        font-size: 1rem;
    }
}

/* Banking Info Compact Design */
.banking-info-compact {
    padding: 0;
}

.banking-info-compact img {
    transition: transform 0.3s ease;
}

.banking-info-compact img:hover {
    transform: scale(1.02);
}

/* Smooth button transitions */
.banking-info-compact button {
    transition: all 0.2s ease;
}

.banking-info-compact button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(9, 190, 188, 0.3);
}

.banking-info-compact button:active {
    transform: translateY(0);
}


