﻿
:root {
    --primary: #0a2a6e;
    --primary-mid: #1a4fae;
    --primary-light: #1e6abf;
    --accent: #f59e0b;
    --radius: 14px;
    --shadow: 0 8px 32px rgba(10,42,110,0.13);
    --transition: all 0.25s ease;
}

.payment-wrapper {
    min-height: 100vh;
    background: #f9fafb;
    padding: 80px 16px 60px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.payment-card {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow);
    width: 100%;
    max-width: 560px;
    overflow: hidden;
}

.payment-header {
    background: linear-gradient(135deg, #0a2a6e, #1e6abf);
    padding: 32px 32px 24px;
    text-align: center;
    position: relative;
}

.payment-header-icon {
    width: 56px;
    height: 56px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    backdrop-filter: blur(8px);
}

.payment-header h1 {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-header p {
    color: rgba(255,255,255,0.8);
    font-size: 13px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-body {
    padding: 28px 32px 32px;
}

.form-group {
    margin-bottom: 16px;
}

    .form-group label {
        display: block;
        font-size: 12px;
        font-weight: 600;
        color: #64748b;
        margin-bottom: 6px;
        text-align: right;
    }

    .form-group .form-control {
        width: 100%;
        border: 1.5px solid #e2e8f0;
        border-radius: var(--radius);
        padding: 11px 16px;
        font-size: 14px;
        color: #1e293b;
        background: #f8fafc;
        transition: var(--transition);
/*        text-align: right;*/
        direction: rtl;
        box-sizing: border-box;
    }

        .form-group .form-control:focus {
            outline: none;
            border-color: var(--primary-mid);
            background: #fff;
            box-shadow: 0 0 0 3px rgba(26,79,174,0.1);
        }

        .form-group .form-control:disabled {
            background: #f1f5f9;
            color: #94a3b8;
            cursor: not-allowed;
        }

    .form-group textarea.form-control {
        resize: none;
        height: 72px;
    }

.error {
    color: #ef4444;
    font-size: 11px;
    margin-top: 4px;
    text-align: right;
}

.gateway-label {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-align: right;
    margin: 20px 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .gateway-label::after {
        content: '';
        flex: 1;
        height: 1px;
        background: #e2e8f0;
    }

/* رادیو باتن‌های درگاه */
.radiobuttonlist-inline table {
    width: 100%;
    border-spacing: 0 8px;
}

.radiobuttonlist-inline td {
    display: block;
    width: 100%;
}

.radiobuttonlist-inline input[type="radio"] {
    display: none;
}

.radiobuttonlist-inline label {
    display: block;
    cursor: pointer;
}

.panel.panel-default {
    border: 2px solid #e2e8f0;
    border-radius: var(--radius) !important;
    transition: var(--transition);
    margin: 0;
}

.panel-body.panel-body2 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px !important;
    border-radius: var(--radius) !important;
    gap: 12px;
}

.lbl1 {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.percentage {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 20px;
    border: 1px solid #fbbf24;
}

.finalAmount {
    font-size: 12px;
    color: #059669;
    font-weight: 600;
    min-width: 120px;
    text-align: center;
}

.imgiconbank {
    width: 48px;
    height: 32px;
    object-fit: contain;
    border-radius: 6px;
}

/* استایل وقتی رادیو انتخاب شده */
.radiobuttonlist-inline input[type="radio"]:checked + label .panel.panel-default {
    border-color: var(--primary-mid);
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    box-shadow: 0 0 0 3px rgba(26,79,174,0.12);
}

/* hover روی پنل */
.radiobuttonlist-inline label:hover .panel.panel-default {
    border-color: var(--primary-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26,79,174,0.1);
}

.attention-box {
    background: linear-gradient(135deg, #fef2f2, #fee2e2);
    border: 1px solid #fca5a5;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 20px;
    text-align: right;
    direction: rtl;
}

    .attention-box .attention-title {
        color: #dc2626;
        font-size: 13px;
        font-weight: 700;
        margin-bottom: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 6px;
    }

    .attention-box p {
        color: #7f1d1d;
        font-size: 12px;
        margin: 0;
        line-height: 1.8;
    }

@media (max-width: 600px) {
    .payment-body {
        padding: 20px 16px 24px;
    }

    .payment-header {
        padding: 24px 16px 20px;
    }
}




.error,
span[id*="lblError"] {
    display: block;
    color: #ef4444;
    font-size: 11.5px;
    font-weight: 500;
    margin-top: 5px;
    padding: 6px 10px;
    background: #fef2f2;
    border-right: 3px solid #ef4444;
    border-radius: 6px;
    text-align: right;
    direction: rtl;
    animation: slideDown 0.2s ease;
}

    span[id*="lblError"]:empty {
        display: none;
    }

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* وقتی فیلد خطا داره، border قرمز بشه */
.form-control.is-invalid {
    border-color: #ef4444 !important;
    background: #fff5f5 !important;
    box-shadow: 0 0 0 3px rgba(239,68,68,0.1) !important;
}



html:lang(en) .gateway-label {
    direction: ltr;
}



/* اصلاح اصلی برای پوشش کامل صفحه */
#AutoPayModal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    direction: rtl;
}

.pay-modal-backdrop {
    position: fixed; /* به جای absolute از fixed استفاده کن */
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.45); /* کمی تیره‌تر برای حس امنیت بیشتر */
    backdrop-filter: blur(4px); /* اضافه کردن بلر */
    z-index:999;
}

.pay-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 92%;
    max-width: 420px;
    transform: translate(-50%, -50%);
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.18);
    padding: 28px 24px 22px 24px;
    text-align: center;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #e8edf3;
    z-index:999;
}

.pay-modal-icon-wrap {
    width: 68px;
    height: 68px;
    margin: 0 auto 18px auto;
    border-radius: 50%;
    background: #eef5ff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pay-modal-icon {
    width: 30px;
    height: 30px;
    border: 3px solid #c7d7f2;
    border-top: 3px solid #1d4ed8;
    border-radius: 50%;
    box-sizing: border-box;
    animation: paySpin 0.9s linear infinite;
}

.pay-modal-title {
    color: #1f2937;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.9;
    margin-bottom: 8px;
}

.pay-modal-text {
    color: #6b7280;
    font-size: 16px;
    line-height: 2;
    margin: 0 auto 22px auto;
    max-width: 320px;
}

.pay-modal-progress {
    width: 100%;
    height: 6px;
    background: #edf2f7;
    border-radius: 999px;
    overflow: hidden;
}

    .pay-modal-progress span {
        display: block;
        width: 35%;
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, #2563eb 0%, #60a5fa 100%);
        animation: payProgress 1.4s ease-in-out infinite;
    }

@keyframes paySpin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes payProgress {
    0% {
        transform: translateX(0);
    }

    50% {
        transform: translateX(180px);
    }

    100% {
        transform: translateX(0);
    }
}

@media (max-width: 480px) {
    .pay-modal {
        width: calc(100% - 24px);
        padding: 24px 16px 18px 16px;
        border-radius: 12px;
    }

    .pay-modal-title {
        font-size: 20px;
        line-height: 1.8;
    }

    .pay-modal-text {
        font-size: 14px;
        line-height: 1.9;
        margin-bottom: 18px;
    }

    .pay-modal-icon-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }

    .pay-modal-icon {
        width: 28px;
        height: 28px;
    }
}

