/**
 * Standalone 3D Luxury Auth Styling
 * Version: 2.1.3
 */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

.msma-auth-wrapper {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 100vh !important;
    min-height: 100dvh !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 24px 16px !important;
    direction: rtl;
    position: relative;
    z-index: 1;
    margin: 0 auto !important;
}

.msma-auth-box {
    width: 100%;
    max-width: 440px;
    margin: auto !important;
    /* باقی استایل‌ها حفظ شوند */
}

.msma-auth-wrapper .msma-auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
    direction: rtl;
    font-family: inherit;
    position: relative;
    z-index: 1;
}

.msma-auth-wrapper .msma-auth-box {
    width: 100%;
    max-width: 440px;
    background: var(--msma-card-bg, var(--msma-card));
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 
                0 0 0 1px rgba(255, 255, 255, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transform: none;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
    color: var(--msma-text);
    position: relative;
    z-index: 2;
}

/* کارت در هاور حرکت نمی‌کند تا هدف کلیک موس از زیر نشانگر جابه‌جا نشود. */
.msma-auth-wrapper .msma-auth-box:hover {
    transform: none;
    box-shadow: 0 34px 70px rgba(0, 0, 0, 0.42),
                0 0 0 1px rgba(255, 255, 255, 0.10),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.msma-auth-wrapper .msma-logo-wrap {
    text-align: center;
    margin-bottom: 24px;
}

.msma-auth-wrapper .msma-logo {
    max-height: 70px;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0,0,0,0.3));
}

.msma-auth-wrapper .msma-header-area {
    text-align: center;
    margin-bottom: 30px;
}

.msma-auth-wrapper .msma-header-area h2 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--msma-text);
}

.msma-auth-wrapper .msma-header-area p {
    font-size: 14px;
    opacity: 0.75;
    margin: 0;
}

.msma-auth-wrapper .msma-step {
    display: none;
    animation: msmaFadeIn 0.35s ease;
}

.msma-auth-wrapper .msma-step.active {
    display: block;
}

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

.msma-auth-wrapper .msma-input-wrap {
    position: relative;
    margin-bottom: 18px;
}

.msma-auth-wrapper .msma-input-wrap input {
    width: 100%;
    height: 52px;
    background: var(--msma-input-bg);
    border: 1px solid var(--msma-border);
    border-radius: 14px;
    padding: 0 45px 0 16px;
    font-size: 15px;
    color: var(--msma-input-txt);
    box-sizing: border-box;
    outline: none;
    transition: all 0.25s ease;
}

.msma-auth-wrapper .msma-input-wrap input:focus {
    border-color: var(--msma-primary);
    background: var(--msma-input-bg);
    box-shadow: 0 0 0 2px var(--msma-primary);
}

.msma-auth-wrapper .msma-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    opacity: 0.6;
}

.msma-auth-wrapper .msma-submit-btn {
    width: 100%;
    height: 52px;
    background: var(--msma-btn-bg, var(--msma-primary));
    color: var(--msma-btn-text, var(--msma-btn-txt));
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    transition: filter 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    position: relative;
    z-index: 10;
}

.msma-auth-wrapper .msma-submit-btn:hover {
    filter: brightness(1.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.25);
    /* translateY(-2px) به طور کامل حذف شد تا پرش کرسر و لوپ هاور خنثی شود */
}

.msma-auth-wrapper .msma-submit-btn:active {
    filter: brightness(0.95);
    transform: scale(0.98); /* افکت فشردن کلیک بدون خارج شدن از زیر موس */
}

.msma-auth-wrapper .msma-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

.msma-auth-wrapper .msma-phone-badge {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--msma-card);
    padding: 10px 16px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 13px;
}

.msma-auth-wrapper .msma-phone-badge a {
    color: var(--msma-primary);
    text-decoration: none;
}

.msma-auth-wrapper .msma-timer-box {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
    opacity: 0.8;
}

.msma-auth-wrapper #msma-resend-btn {
    background: none;
    border: none;
    color: var(--msma-primary);
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
}

.msma-auth-wrapper .msma-alert {
    margin-top: 18px;
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 13px;
    text-align: center;
    background: var(--msma-err-bg);
    border: 1px solid var(--msma-err-txt);
    color: var(--msma-err-txt);
}

.msma-auth-wrapper .msma-alert.success {
    background: var(--msma-ok-bg);
    border-color: var(--msma-ok-txt);
    color: var(--msma-ok-txt);
}

/* رنگ‌ها به صورت متغیرهای scoped در wrapper تنظیم می‌شوند؛ اینجا فقط fallback داریم. */
.msma-auth-wrapper .msma-input-wrap input::placeholder { color: var(--msma-ph, #8a93a2); opacity: 1; }
.msma-auth-wrapper .msma-input-wrap input:-ms-input-placeholder { color: var(--msma-ph, #8a93a2); }
.msma-auth-wrapper .msma-desc { color: var(--msma-label, #c9d1d9); }
.msma-auth-wrapper .msma-alert { background: var(--msma-err-bg, #3d1a1a); color: var(--msma-err-txt, #ff8585); border: none; }
.msma-auth-wrapper .msma-alert.success { background: var(--msma-ok-bg, #12291c); color: var(--msma-ok-txt, #2ecc71); }
.msma-auth-wrapper .msma-timer-box { color: var(--msma-timer, #8a93a2); }
.msma-auth-wrapper .msma-phone-badge { background: var(--msma-card, #161b22); color: var(--msma-text, #fff); }
.msma-auth-wrapper .msma-phone-badge a, .msma-auth-wrapper #msma-resend-btn { color: var(--msma-primary, #ff5722); }
.msma-auth-wrapper .msma-hp { display: none !important; }

/* تضمین تعامل واقعی دکمه‌ها حتی در قالب‌هایی با لایه‌بندی پیچیده */
.msma-auth-wrapper .msma-step, .msma-auth-wrapper .msma-submit-btn { pointer-events: auto !important; }
.msma-auth-wrapper .msma-submit-btn { display: block; width: 100%; touch-action: manipulation; }
.msma-auth-wrapper .msma-submit-btn:focus-visible { outline: 3px solid rgba(255,255,255,.85); outline-offset: 3px; }
