/**
 * این فایل استایل‌های مدرن و ظاهر شیشه‌ای (Glassmorphism) فرم پرداخت و استپر در بخش کاربری را کنترل می‌کند.
 * نسخه: 1.0
 * طراحی اختصاصی: آکادمی فنابایت | www.fanabyte.com
 */

.fnp-payment-container, 
.fnp-payment-container input, 
.fnp-payment-container button,
.fnp-payment-container select,
.fnp-payment-wrapper {
    font-family: inherit !important;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; }

.fnp-payment-wrapper {
    display: flex;
    justify-content: center;
    padding: 60px 20px;
    background: transparent !important;
    min-height: 400px;
}

.fnp-payment-container {
    width: 100%;
    max-width: 600px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0,0,0,0.05), 0 10px 20px rgba(0,0,0,0.02);
    overflow: hidden;
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.8);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.fnp-stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 40px 20px;
    background: transparent;
    position: relative;
}

.fnp-step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    color: #a0aec0;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.fnp-step-item.active { color: #2d3748; }
.fnp-step-item.completed { color: #38a169; }

.step-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #f7fafc;
    border: 2px solid #edf2f7;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-size: 22px;
    color: #cbd5e0;
}

.fnp-step-item.active .step-icon {
    background: #4299e1;
    border-color: #4299e1;
    color: #ffffff;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(66, 153, 225, 0.3);
}

.fnp-step-item.completed .step-icon {
    background-color: #38a169;
    border-color: #38a169;
    color: #ffffff;
}

.step-label { 
    font-size: 13px; 
    font-weight: 600;
    white-space: nowrap;
}

.fnp-step-line {
    flex: 1;
    height: 2px;
    background: #edf2f7;
    margin: 0 -15px;
    position: relative;
    top: -22px;
    z-index: 1;
}

.fnp-form-body { 
    padding: 20px 45px 45px; 
}

.fnp-step-content { 
    display: none; 
    animation: fnpFadeInUp 0.6s ease; 
}
.fnp-step-content.active { display: block; }

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

.fnp-row { display: flex; gap: 24px; margin-bottom: 24px; }
.fnp-col { flex: 1; }

label {
    display: block;
    margin-bottom: 10px;
    font-size: 14px;
    color: #4a5568;
    font-weight: 700;
    padding-right: 4px;
}

.fnp-input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #f1f4f8;
    background: #f8fafc;
    font-size: 15px;
    border-radius: 14px;
    transition: all 0.3s ease;
    outline: none;
    color: #2d3748;
}

.fnp-input:focus {
    background: #ffffff;
    border-color: #4299e1;
    box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.1);
}

.fnp-input.large-input {
    /* font-size: 22px; */
    font-weight: 800;
    text-align: center;
    letter-spacing: 2px;
    /* padding: 18px; */
    color: #059669;
    background-color: #f0fff4;
    border-color: #c6f6d5;
}

.fnp-input.large-input:focus {
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.15);
    border-color: #059669;
}

/* اصلاح مارجین منفی و حالت پیش‌فرض مخفی */
.fnp-amount-words {
    background: #f0f9ff;
    color: #0284c7;
    padding: 12px 15px;
    border-radius: 12px;
    font-size: 14px;
    margin: 15px 0 25px; 
    text-align: center;
    border: 1px solid #e0f2fe;
    min-height: 20px;
    font-weight: 600;
    display: none; 
}

.fnp-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    font-size: 16px;
    cursor: pointer;
    font-weight: 800;
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}

.fnp-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.fnp-btn:active { transform: translateY(-1px); }

.fnp-summary-wrapper {
    background: #f8fafc;
    border-radius: 20px;
    padding: 20px;
    border: 1px solid #edf2f7;
    margin-bottom: 25px;
}

.fnp-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 5px;
    border-bottom: 1px solid #edf2f7;
    font-size: 14px;
}

.fnp-summary-row:last-child { border-bottom: none; }
.fnp-summary-label { color: #718096; font-weight: 600; }
.fnp-summary-value { color: #2d3748; font-weight: 700; }

.fnp-toggle-wrapper {
    margin-bottom: 30px;
}

.fnp-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    background: #ffffff;
    padding: 18px 25px;
    border-radius: 18px;
    border: 2px solid #edf2f7;
    transition: all 0.3s ease;
}

.fnp-toggle-text {
    flex: 1;
    text-align: right;
    font-size: 15px;
    color: #2d3748;
    font-weight: 700;
    user-select: none;
    padding-left: 15px;
}

.fnp-toggle-switch {
    width: 50px;
    height: 28px;
    background: #e2e8f0;
    border-radius: 30px;
    position: relative;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.fnp-toggle-switch::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 20px;
    height: 20px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.fnp-toggle-input {
    display: none;
}

.fnp-toggle-input:checked + .fnp-toggle-label {
    border-color: #38a169;
    background: #f0fff4;
}

.fnp-toggle-input:checked + .fnp-toggle-label .fnp-toggle-switch {
    background: #38a169;
}

.fnp-toggle-input:checked + .fnp-toggle-label .fnp-toggle-switch::after {
    left: 26px;
}

.fnp-loader-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4299e1;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: fnpSpin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes fnpSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 550px) {
    .fnp-row { flex-direction: column; gap: 18px; }
    .fnp-stepper { padding: 30px 20px 10px; }
    .step-label { font-size: 11px; }
    .fnp-form-body { padding: 20px 25px 30px; }
}