/* ==========================================================================
   نایسی - استایل پیش‌فرض فرم ورود/عضویت و مودال پاپ‌آپ
   این استایل، تم پیش‌فرض شیک را می‌سازد. تمام مقادیر از طریق کنترل‌های
   المنتور (روی هر ویجت) به‌طور کامل قابل تغییر و شخصی‌سازی است.
   ========================================================================== */

.nicek-login-wrapper {
    --nicek-accent: #6d5bf0;
    --nicek-accent-2: #a78bfa;
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 36px 32px;
    background: #ffffff;
    border: 1px solid #ece9fb;
    border-radius: 20px;
    text-align: center;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    box-shadow: 0 18px 45px -20px rgba(76, 55, 189, 0.25);
    font-family: 'Ravi', 'Vazirmatn', Tahoma, sans-serif;
    overflow: hidden;
}
.nicek-login-wrapper::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 160px; height: 160px;
    background: radial-gradient(circle, var(--nicek-accent-2) 0%, transparent 70%);
    opacity: 0.35;
    pointer-events: none;
}
.nicek-login-wrapper.nicek-in-popup {
    border: none;
    box-shadow: none;
}
.nicek-logo-wrap img {
    max-width: 110px;
    height: auto;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}
.nicek-title {
    margin: 0 0 12px;
    font-size: 21px;
    font-weight: 800;
    color: #1e1b2e;
    position: relative;
    z-index: 1;
}
.nicek-subtext {
    font-size: 13.5px;
    color: #6c6a80;
    margin-bottom: 22px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}
.nicek-input-group {
    position: relative;
    margin-bottom: 18px;
}
.nicek-input {
    width: 100%;
    padding: 15px 16px;
    border: 1.5px solid #e6e4f5;
    border-radius: 14px;
    font-size: 17px;
    text-align: center;
    direction: ltr;
    box-sizing: border-box;
    transition: all 0.25s;
    background: #fbfbfe;
    font-family: inherit;
}
.nicek-input:focus {
    border-color: var(--nicek-accent);
    outline: none;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(109, 91, 240, 0.12);
}
.nicek-otp-box-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    direction: ltr;
    margin-bottom: 22px;
}
.nicek-otp-digit {
    width: 52px;
    height: 56px;
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    border: 1.5px solid #e6e4f5;
    border-radius: 12px;
    margin: 0;
    padding: 0;
    background: #fbfbfe;
    transition: all 0.2s;
    font-family: inherit;
}
.nicek-otp-digit:focus {
    border-color: var(--nicek-accent);
    outline: none;
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(109, 91, 240, 0.12);
    transform: translateY(-1px);
}
.nicek-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--nicek-accent) 0%, #5947d8 100%);
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 15.5px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 10px 25px -10px rgba(109, 91, 240, 0.65);
    font-family: inherit;
    position: relative;
    z-index: 1;
}
.nicek-btn:hover {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -10px rgba(109, 91, 240, 0.75);
}
.nicek-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
}
.nicek-msg-box {
    margin-top: 16px;
    font-size: 13.5px;
    padding: 11px 14px;
    border-radius: 10px;
    display: none;
    font-weight: 600;
}
.nicek-error { color: #c22a44; background: #fdecef; }
.nicek-success { color: #147a54; background: #e7faf3; }
.nicek-timer-box { font-size: 12.5px; color: #8a8798; margin: 16px 0; }
.nicek-actions { display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; margin-top: 16px; }
.nicek-action-link { text-decoration: none; color: var(--nicek-accent); font-weight: 600; transition: 0.2s; }
.nicek-action-link:hover { opacity: 0.75; }

.nicek-header-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    background: linear-gradient(135deg, #6d5bf0 0%, #5947d8 100%);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    transition: 0.25s;
    cursor: pointer;
    font-weight: 600;
    font-family: 'Ravi', 'Vazirmatn', Tahoma, sans-serif;
}
.nicek-header-btn:hover { opacity: 0.92; transform: translateY(-1px); }
.nicek-header-btn i { font-size: 16px; }

/* Back to Home Button in Form */
.nicek-back-home {
    display: block;
    margin-top: 18px;
    font-size: 12.5px;
    color: #9491a3;
    text-decoration: none;
    transition: 0.2s;
}
.nicek-back-home:hover { color: #4a4760; }

/* Modal Styles */
.nicek-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(20, 15, 45, 0.55);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}
.nicek-modal-content {
    position: relative;
    width: 100%;
    max-width: 440px;
    animation: nicekFadeIn 0.35s ease;
}
.nicek-modal-close {
    position: absolute;
    top: -16px;
    right: -16px;
    background: #fff;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    text-align: center;
    line-height: 32px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    color: #333;
    box-shadow: 0 4px 14px rgba(20,15,45,0.25);
    z-index: 10;
    transition: 0.2s;
}
.nicek-modal-close:hover { transform: rotate(90deg); }
@keyframes nicekFadeIn {
    from { opacity: 0; transform: translateY(-24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 480px) {
    .nicek-login-wrapper:not(.nicek-in-popup) { padding: 26px 20px; box-shadow: none; border: none; }
    .nicek-header-btn .nicek-btn-text { display: none; }
    .nicek-header-btn i { margin: 0 !important; font-size: 20px; }
}

/* ==========================================================================
   طرح‌های آماده فرم ورود/ثبت‌نام (نسخه 3.3.1)
   ========================================================================== */
.nicek-auth-layout,
.nicek-auth-layout * {
    box-sizing: border-box;
}
.nicek-auth-layout {
    --nicek-auth-hero: none;
    --nicek-auth-hero-mobile: var(--nicek-auth-hero);
    --nicek-auth-pattern: none;
    width: 100%;
    margin-inline: auto;
    position: relative;
    direction: ltr;
    overflow: hidden;
    font-family: 'Ravi', 'Vazirmatn', Tahoma, sans-serif;
}
.nicek-auth-media {
    position: relative;
    background-image: var(--nicek-auth-hero), linear-gradient(145deg, #0f1b2c, #7e3150);
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
}
.nicek-auth-media::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--nicek-auth-pattern);
    background-repeat: repeat;
    background-position: center;
    background-size: 220px auto;
    opacity: .22;
}
.nicek-auth-media-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
}
.nicek-auth-content {
    direction: rtl;
    position: relative;
    z-index: 1;
}
.nicek-auth-pattern {
    position: absolute;
    inset: 0;
    background-image: var(--nicek-auth-pattern);
    background-repeat: no-repeat;
    background-position: right top;
    background-size: 220px auto;
    opacity: .2;
    pointer-events: none;
}
.nicek-auth-layout .nicek-logo-wrap {
    position: relative;
    z-index: 2;
    text-align: center;
}
.nicek-auth-layout .nicek-welcome-text {
    margin: 0 0 4px;
    color: #1f2d48;
    font-size: 17px;
    line-height: 1.8;
}
.nicek-auth-layout .nicek-field-label {
    display: block;
    color: #1f2d48;
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 7px;
    text-align: right;
}
.nicek-auth-layout .nicek-input-group {
    width: 100%;
}
.nicek-auth-layout .nicek-phone-icon {
    position: absolute;
    left: 16px;
    bottom: 14px;
    width: 18px;
    height: 18px;
    z-index: 2;
    opacity: .55;
    border: 2px solid currentColor;
    border-radius: 45% 45% 52% 52%;
    transform: rotate(-34deg) scale(.65);
}
.nicek-auth-layout .nicek-phone-icon::after {
    content: '';
    position: absolute;
    inset: 3px;
    border: 2px solid currentColor;
    border-block-color: transparent;
    border-radius: 50%;
}
.nicek-auth-layout .nicek-input {
    padding-left: 48px;
}
.nicek-auth-layout .nicek-phone {
    direction: ltr;
    text-align: right;
}
.nicek-auth-layout .nicek-phone::placeholder {
    direction: ltr;
    text-align: right;
    letter-spacing: .08em;
}
.nicek-auth-layout .nicek-terms-text {
    color: #25334c;
    font-size: 12px;
    line-height: 1.9;
    margin: 2px 0 28px;
}
.nicek-auth-layout .nicek-terms-text p {
    margin: 0;
}
.nicek-auth-layout .nicek-terms-text a {
    color: inherit;
    text-decoration: underline;
}
.nicek-auth-footer {
    direction: rtl;
    position: relative;
    z-index: 2;
    color: #536079;
    font-size: 12px;
    font-weight: 600;
    text-align: center;
}
.nicek-auth-footer a {
    color: inherit;
    font-weight: 800;
    text-decoration: none;
}

/* سازگاری با ظاهر قدیمی */
.nicek-auth-preset-classic {
    max-width: 420px;
}
.nicek-auth-preset-classic .nicek-auth-media,
.nicek-auth-preset-classic .nicek-auth-pattern {
    display: none;
}
.nicek-auth-preset-classic .nicek-auth-footer {
    margin-top: 14px;
}
.nicek-auth-preset-classic .nicek-welcome-text,
.nicek-auth-preset-classic .nicek-field-label,
.nicek-auth-preset-classic .nicek-terms-text,
.nicek-auth-preset-classic .nicek-auth-footer {
    display: none;
}

/* طرح فخار: تصویر چپ، فرم راست */
.nicek-auth-preset-fakhar {
    display: flex;
    width: min(100%, 960px);
    max-width: 960px;
    min-height: 590px;
    background: #fff;
    border: 1px solid #eeeae5;
    border-radius: 48px;
    box-shadow: 0 25px 70px -45px rgba(15, 27, 44, .35);
}
.nicek-auth-preset-fakhar .nicek-auth-media {
    flex: 0 0 42%;
    width: 42%;
    min-height: 590px;
}
.nicek-auth-preset-fakhar .nicek-auth-content {
    flex: 1 1 58%;
    width: 58%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 54px 58px 40px;
    background: #fff;
}
.nicek-auth-preset-fakhar .nicek-auth-pattern {
    background-position: right top, left bottom;
}
.nicek-auth-preset-fakhar .nicek-logo-wrap img {
    max-width: 120px;
    margin-bottom: 28px;
}
.nicek-auth-preset-fakhar .nicek-login-wrapper,
.nicek-auth-preset-fixa .nicek-login-wrapper {
    width: 100%;
    max-width: none;
    min-height: 0;
    margin: 0;
    padding: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: right;
    justify-content: flex-start;
}
.nicek-auth-preset-fakhar .nicek-login-wrapper::before,
.nicek-auth-preset-fixa .nicek-login-wrapper::before {
    display: none;
}
.nicek-auth-preset-fakhar .nicek-title {
    color: #1d2a44;
    font-size: 29px;
    text-align: right;
}
.nicek-auth-preset-fakhar .nicek-subtext {
    margin: 0 0 34px;
    color: #7b8494;
    text-align: right;
}
.nicek-auth-preset-fakhar .nicek-input,
.nicek-auth-preset-fixa .nicek-input {
    height: 52px;
    border: 0;
    border-radius: 28px;
    background: #f8f8f8;
    box-shadow: 0 10px 25px -22px rgba(15, 27, 44, .7);
}
.nicek-auth-preset-fakhar .nicek-btn,
.nicek-auth-preset-fixa .nicek-btn {
    min-height: 46px;
    border-radius: 28px;
    background: #121d2e;
    box-shadow: none;
}
.nicek-auth-preset-fakhar .nicek-btn:hover,
.nicek-auth-preset-fixa .nicek-btn:hover {
    background: #273750;
    transform: translateY(-1px);
}
.nicek-auth-preset-fakhar .nicek-back-home,
.nicek-auth-preset-fixa .nicek-back-home {
    display: none;
}
.nicek-auth-preset-fakhar .nicek-auth-footer {
    margin-top: auto;
    padding-top: 32px;
}

/* طرح فیکسا: هدر تصویری/پترن و کارت مرکزی */
.nicek-auth-preset-fixa {
    display: flex;
    flex-direction: column;
    width: min(100%, 960px);
    max-width: 960px;
    min-height: 690px;
    background: #f4f4f4;
    border-radius: 0;
    overflow: visible;
}
.nicek-auth-preset-fixa .nicek-auth-media {
    flex: 0 0 auto;
    width: 100%;
    height: 330px;
    min-height: 330px;
    background-image: var(--nicek-auth-hero), linear-gradient(145deg, #08735e, #005d4e);
}
.nicek-auth-preset-fixa .nicek-auth-content {
    width: min(100% - 48px, 560px);
    margin: -100px auto 40px;
    padding: 42px 18px 18px;
    border: 1px solid #d9e2e9;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 45px -38px rgba(16, 42, 70, .45);
}
.nicek-auth-preset-fixa .nicek-auth-pattern {
    display: none;
}
.nicek-auth-preset-fixa .nicek-logo-wrap {
    position: absolute;
    right: 0;
    left: 0;
    top: -165px;
}
.nicek-auth-preset-fixa .nicek-logo-wrap img {
    max-width: 110px;
    max-height: 64px;
    margin: 0;
    object-fit: contain;
}
.nicek-auth-preset-fixa .nicek-login-wrapper {
    padding: 0;
}
.nicek-auth-preset-fixa .nicek-welcome-text {
    display: none;
}
.nicek-auth-preset-fixa .nicek-title {
    margin-bottom: 10px;
    color: #171717;
    font-size: 20px;
    text-align: right;
}
.nicek-auth-preset-fixa .nicek-subtext {
    margin: 0 0 46px;
    color: #8291a4;
    text-align: right;
}
.nicek-auth-preset-fixa .nicek-input-group {
    margin-bottom: 12px;
}
.nicek-auth-preset-fixa .nicek-terms-text {
    margin: 0 0 45px;
    color: #4c6674;
}
.nicek-auth-preset-fixa .nicek-btn:disabled {
    background: #ddd;
    color: #9da4aa;
}
.nicek-auth-preset-fixa .nicek-auth-footer {
    margin-top: 20px;
}

/* پاپ‌آپ همیشه جمع‌وجور باقی می‌ماند و از عرض پنجره بیرون نمی‌زند. */
.nicek-auth-layout.nicek-auth-in-popup {
    display: block;
    width: 100%;
    max-width: 440px;
    min-height: 0;
    border-radius: 20px;
    overflow: hidden;
}
.nicek-auth-layout.nicek-auth-in-popup .nicek-auth-media,
.nicek-auth-layout.nicek-auth-in-popup .nicek-auth-pattern,
.nicek-auth-layout.nicek-auth-in-popup .nicek-auth-footer,
.nicek-auth-layout.nicek-auth-in-popup .nicek-welcome-text,
.nicek-auth-layout.nicek-auth-in-popup .nicek-field-label,
.nicek-auth-layout.nicek-auth-in-popup .nicek-terms-text {
    display: none;
}
.nicek-auth-layout.nicek-auth-in-popup .nicek-auth-content {
    width: 100%;
    min-height: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}
.nicek-auth-layout.nicek-auth-in-popup .nicek-logo-wrap {
    position: static;
    padding-top: 28px;
}
.nicek-auth-layout.nicek-auth-in-popup .nicek-login-wrapper {
    padding: 32px;
    background: #fff;
}

@media (max-width: 767px) {
    .nicek-auth-layout .nicek-auth-media {
        background-image: var(--nicek-auth-hero-mobile), linear-gradient(145deg, #0f1b2c, #7e3150);
    }
    .nicek-auth-preset-fakhar {
        width: min(100%, 430px);
        min-height: 700px;
        border: 0;
        border-radius: 34px;
    }
    .nicek-auth-preset-fakhar .nicek-auth-media {
        position: absolute;
        inset: 0;
        z-index: 0;
        width: 100%;
        height: 100%;
        min-height: 100%;
    }
    .nicek-auth-preset-fakhar .nicek-auth-media-overlay {
        background: rgba(9, 17, 30, .12);
    }
    .nicek-auth-preset-fakhar .nicek-auth-content {
        width: 100%;
        min-height: 700px;
        padding: 32px 28px 20px;
        background: transparent;
        justify-content: center;
    }
    .nicek-auth-preset-fakhar .nicek-auth-pattern {
        display: none;
    }
    .nicek-auth-preset-fakhar .nicek-logo-wrap {
        margin-bottom: 14px;
    }
    .nicek-auth-preset-fakhar .nicek-logo-wrap img {
        max-width: 92px;
        margin: 0;
    }
    .nicek-auth-preset-fakhar .nicek-login-wrapper:not(.nicek-in-popup) {
        width: 100%;
        max-width: 330px;
        margin: auto;
        padding: 28px 22px;
        border: 1px solid rgba(255, 255, 255, .7);
        border-radius: 28px;
        background: rgba(255, 255, 255, .88);
        box-shadow: 0 20px 45px -25px rgba(10, 18, 30, .75);
        backdrop-filter: blur(12px);
    }
    .nicek-auth-preset-fakhar .nicek-welcome-text,
    .nicek-auth-preset-fakhar .nicek-title,
    .nicek-auth-preset-fakhar .nicek-subtext {
        text-align: center;
    }
    .nicek-auth-preset-fakhar .nicek-title {
        font-size: 20px;
    }
    .nicek-auth-preset-fakhar .nicek-subtext {
        display: none;
    }
    .nicek-auth-preset-fakhar .nicek-terms-text {
        font-size: 10px;
        text-align: center;
        margin-bottom: 12px;
    }
    .nicek-auth-preset-fakhar .nicek-auth-footer {
        position: absolute;
        right: 0;
        bottom: 22px;
        left: 0;
        padding: 0;
        color: #fff;
        text-shadow: 0 1px 4px rgba(0, 0, 0, .6);
    }
    .nicek-auth-preset-fixa {
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 620px !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    .nicek-auth-preset-fixa .nicek-auth-media {
        position: relative !important;
        flex: 0 0 240px !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        height: 240px !important;
        min-height: 240px !important;
        background-image: var(--nicek-auth-hero-mobile), linear-gradient(145deg, #08735e, #005d4e);
    }
    .nicek-auth-preset-fixa .nicek-auth-content {
        position: relative !important;
        flex: 0 0 auto !important;
        box-sizing: border-box !important;
        width: calc(100% - 28px) !important;
        max-width: calc(100% - 28px) !important;
        min-width: 0 !important;
        min-height: 0 !important;
        margin: -70px auto 24px !important;
        padding: 34px 18px 22px !important;
        overflow: visible !important;
    }
    .nicek-auth-preset-fixa .nicek-login-wrapper:not(.nicek-in-popup),
    .nicek-auth-preset-fixa .nicek-step-1,
    .nicek-auth-preset-fixa .nicek-step-2,
    .nicek-auth-preset-fixa .nicek-input-group {
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        min-height: 0 !important;
    }
    .nicek-auth-preset-fixa .nicek-login-wrapper:not(.nicek-in-popup) {
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    .nicek-auth-preset-fixa .nicek-input,
    .nicek-auth-preset-fixa .nicek-btn {
        display: block !important;
        box-sizing: border-box !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .nicek-auth-preset-fixa .nicek-logo-wrap {
        top: -120px;
    }
    .nicek-auth-preset-fixa .nicek-subtext {
        margin-bottom: 28px;
    }
    .nicek-auth-preset-fixa .nicek-terms-text {
        margin-bottom: 26px;
    }
    .elementor-widget-nicek_login_form,
    .elementor-widget-nicek_login_form > .elementor-widget-container {
        min-width: 0 !important;
        max-width: 100% !important;
        overflow: hidden;
    }
}

/* ==========================================================================
   احراز هویت شماره موبایل در صفحه پرداخت (Checkout)
   ========================================================================== */
.nicek-checkout-verify-wrap { margin-top: 10px; font-family: 'Ravi', 'Vazirmatn', Tahoma, sans-serif; }
.nicek-checkout-btn {
    background-color: #333 !important;
    color: #fff !important;
    padding: 9px 18px !important;
    font-size: 13px !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer;
    transition: 0.2s;
}
.nicek-checkout-btn:hover { filter: brightness(1.1); }
#nicek-checkout-otp-group { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
#nicek-checkout-otp {
    border: 1.5px solid #ddd;
    padding: 9px 12px;
    border-radius: 8px;
    width: 130px;
    direction: ltr;
    text-align: center;
    letter-spacing: 2px;
}
#nicek-checkout-verify-btn {
    border-radius: 8px !important;
}
#nicek-checkout-msg { font-size: 12px; }

/* بج «شماره تایید شد» که پس از احراز هویت، به‌جای دکمه احراز هویت نمایش داده می‌شود */
.nicek-verified-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #147a54;
    background: #e7faf3;
    border: 1px solid #b9ecdb;
    border-radius: 10px;
    padding: 9px 14px;
    font-weight: 700;
    font-size: 13px;
    margin-top: 10px;
    direction: rtl;
    width: fit-content;
}
.nicek-verified-badge .dashicons { color: #17a673; font-size: 17px; width: 17px; height: 17px; }
.nicek-verified-badge .nicek-verified-phone { direction: ltr; unicode-bidi: embed; font-weight: 800; }
