/* Payment Gateway Modal Styles */

.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

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

.payment-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
}

.payment-modal-content {
    position: relative;
    background: linear-gradient(135deg, #1a1a2e 0%, #16162a 100%);
    border-radius: 24px;
    max-width: 540px;
    width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

.payment-step {
    overflow-y: auto;
    max-height: 90vh;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: all 0.3s ease;
    z-index: 1;
}

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

.payment-modal-header {
    text-align: center;
    padding: 40px 40px 20px;
    position: relative;
}

.back-button {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.payment-icon {
    display: inline-flex;
    margin-bottom: 20px;
}

.payment-icon svg {
    filter: drop-shadow(0 8px 16px rgba(102, 126, 234, 0.3));
}

.payment-modal-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px;
}

.payment-modal-header p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
}

.payment-modal-body {
    padding: 0 40px 40px;
}

.plan-summary {
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border: 1px solid rgba(103, 126, 234, 0.2);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
}

.plan-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-name {
    font-size: 16px;
    font-weight: 600;
    color: #fff;
}

.plan-amount {
    font-size: 24px;
    font-weight: 700;
    color: #667eea;
}

/* Gateway Options */
.gateway-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.gateway-option {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    width: 100%;
}

.gateway-option:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(103, 126, 234, 0.3);
    transform: translateY(-2px);
}

.gateway-option.selected {
    background: linear-gradient(135deg, rgba(103, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.gateway-icon {
    flex-shrink: 0;
}

.gateway-icon svg {
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.gateway-info {
    flex: 1;
}

.gateway-info h3 {
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    margin: 0 0 4px;
}

.gateway-info p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.6);
    margin: 0;
    line-height: 1.4;
}

.gateway-badge {
    display: inline-block;
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 12px;
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gateway-check {
    flex-shrink: 0;
    color: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.gateway-option.selected .gateway-check {
    color: #667eea;
}

.gateway-check svg {
    display: block;
}

/* Payment Forms */
.payment-form {
    display: block;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-size: 16px;
    color: #fff;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

.form-group input::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.form-error {
    display: block;
    font-size: 12px;
    color: #f87171;
    margin-top: 6px;
    min-height: 18px;
}

.payment-info {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: rgba(79, 172, 254, 0.1);
    border: 1px solid rgba(79, 172, 254, 0.2);
    border-radius: 12px;
    margin-bottom: 24px;
}

.payment-info svg {
    flex-shrink: 0;
    color: #4facfe;
    margin-top: 2px;
}

.payment-info p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.7);
}

/* Buttons */
.payment-continue-btn,
.payment-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    position: relative;
}

.payment-submit-btn .btn-loader {
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.payment-submit-btn .btn-loader svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.payment-submit-btn.loading .btn-text {
    opacity: 0;
}

.payment-submit-btn.loading .btn-loader {
    display: block;
}

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

.success-icon {
    display: inline-flex;
    margin-bottom: 24px;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.payment-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 12px;
}

.payment-success p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 8px;
}

.invoice-id {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Courier New', monospace;
}

.invoice-id span {
    color: #667eea;
    font-weight: 600;
}

/* Button States */
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 768px) {
    .payment-modal-header {
        padding: 32px 24px 16px;
    }

    .payment-modal-header h2 {
        font-size: 24px;
    }

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

    .plan-summary {
        padding: 16px;
    }

    .plan-amount {
        font-size: 20px;
    }

    .gateway-option {
        padding: 16px;
    }

    .gateway-info h3 {
        font-size: 16px;
    }
}

/* Scrollbar */
.payment-modal-content::-webkit-scrollbar {
    width: 8px;
}

.payment-modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.payment-modal-content::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.payment-modal-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}