/**
 * YuKassa Payment Modal Styles
 */

/* Modal Base */
.payment-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.payment-modal-content {
    position: relative;
    background: #1a1a2e;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease;
}

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

.payment-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #888;
    font-size: 28px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.payment-modal-close:hover {
    color: #fff;
}

/* Payment Summary */
.payment-step h3 {
    color: #fff;
    font-size: 24px;
    text-align: center;
    margin-bottom: 25px;
}

.payment-summary {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
}

.payment-credits {
    display: flex;
    align-items: center;
    gap: 10px;
}

.credits-amount {
    font-size: 32px;
    font-weight: 700;
    color: #4ade80;
}

.listik-icon {
    width: 28px;
    height: 28px;
}

.payment-price {
    font-size: 32px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.payment-price .price-currency {
    font-size: 32px;
    font-weight: 700;
}

/* Payment Form */
.payment-form {
    margin-bottom: 25px;
}

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

.form-group label {
    display: block;
    color: #ccc;
    font-size: 14px;
    margin-bottom: 8px;
}

.form-group input[type="email"] {
    width: 90%;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    transition: border-color 0.2s, background 0.2s;
}

.form-group input[type="email"]:focus {
    outline: none;
    border-color: #4ade80;
    background: rgba(255, 255, 255, 0.1);
}

.form-group input[type="email"]::placeholder {
    color: #666;
}

.form-hint {
    display: block;
    color: #888;
    font-size: 12px;
    margin-top: 6px;
}

.form-checkbox {
    display: flex;
    align-items: center;
}

.form-checkbox label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    color: #aaa;
    font-size: 14px;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #4ade80;
    cursor: pointer;
}

/* Payment Button */
.btn-payment {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-payment:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(74, 222, 128, 0.3);
}

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

/* Payment Secure */
.payment-secure {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.payment-secure img {
    margin-bottom: 10px;
    background: #fff;
    padding: 8px 15px;
    border-radius: 8px;
}

.payment-secure p {
    color: #888;
    font-size: 13px;
    margin: 0;
}

/* Loading State */
.payment-step-loading {
    text-align: center;
    padding: 40px 20px;
}

.payment-loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: #4ade80;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.payment-step-loading p {
    color: #aaa;
    font-size: 16px;
}

/* Error State */
.payment-step-error {
    text-align: center;
    padding: 30px 20px;
}

.payment-error-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.payment-step-error h3 {
    color: #ef4444;
}

.error-message {
    color: #aaa;
    margin-bottom: 25px;
}

.btn-retry {
    padding: 12px 30px;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-retry:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Status Modal */
.payment-status-checking,
.payment-status-success,
.payment-status-pending,
.payment-status-failed {
    text-align: center;
    padding: 30px 20px;
}

.success-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #fff;
    font-size: 36px;
    line-height: 70px;
    border-radius: 50%;
    margin: 0 auto 20px;
}

.pending-icon,
.failed-icon {
    font-size: 50px;
    margin-bottom: 15px;
}

.failed-icon {
    color: #ef4444;
}

.payment-status-success h3 {
    color: #4ade80;
}

.credits-added {
    color: #aaa;
    font-size: 16px;
    margin-bottom: 25px;
}

.btn-continue {
    padding: 14px 35px;
    background: linear-gradient(135deg, #4ade80, #22c55e);
    color: #000;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-continue:hover {
    transform: translateY(-2px);
}

/* Body modal-open state */
body.modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
    .payment-modal-content {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .credits-amount,
    .payment-price {
        font-size: 28px;
    }
    
    .payment-price .price-currency {
        font-size: 28px;
    }
}

/* Success/Fail Modal Styles */
.payment-status-success,
.payment-status-failed {
    text-align: center;
    padding: 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #4ade80;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
}

.failed-icon {
    width: 80px;
    height: 80px;
    background: #ef4444;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: white;
    margin: 0 auto 20px;
}

.payment-status-success h3,
.payment-status-failed h3 {
    color: #fff;
    font-size: 24px;
    margin-bottom: 15px;
}

.payment-status-success p,
.payment-status-failed p {
    color: #aaa;
    margin-bottom: 25px;
}

.btn-continue,
.btn-retry {
    background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
    width: 100%;
    margin-bottom: 10px;
}

.btn-continue:hover,
.btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(74, 222, 128, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #888;
    border: 1px solid #444;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    width: 100%;
}

.btn-secondary:hover {
    border-color: #666;
    color: #fff;
}

.payment-status-failed .btn-retry {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.payment-status-failed .btn-retry:hover {
    box-shadow: 0 5px 20px rgba(249, 115, 22, 0.4);
}
