/* ==========================================================================
   Page: Account/Login
   --------------------------------------------------------------------------
   Page-specific adjustments only. The card itself is the shared
   .ms-form-card--sectioned variant (mosadaqa-forms.css). Every selector is
   prefixed with `.ms-page-login` so nothing here can affect other pages.
   Depends on: mosadaqa-tokens.css, mosadaqa-forms.css.
   ========================================================================== */

/* Canvas: legacy .musadqa-container without illustration/chrome, card centred */
.ms-page-login .musadqa-container {
    background-image: none !important; /* legacy sets it with !important */
    background-color: transparent;
    box-shadow: none;
    padding: 0 !important;
    min-height: 0;
    align-items: flex-start;
}

.ms-page-login .login-box {
    max-width: 520px;
}

.ms-page-login .login {
    padding: 0;
}

/* Chrome's UA stylesheet forces direction:ltr on type=email, so in Arabic the placeholder sat on the left.
   Keep the typed address LTR but anchor it (and the placeholder) to the right like the other fields. */
[dir="rtl"] .ms-page-login input[type="email"] {
    text-align: right;
}

[dir="rtl"] .ms-page-login input[type="email"]::placeholder {
    direction: rtl;
    text-align: right;
}

/* Server-side ValidationSummary renders nothing (or an empty .validation-summary-valid) when there are no errors; drop its reserved gap */
.ms-page-login .ms-form-card__body > .form-group:first-child:not(:has(*)),
.ms-page-login .ms-form-card__body > .form-group:has(> .validation-summary-valid) {
    display: none;
}

/* "Forgot password" row sits tight under the password field */
.ms-page-login .ms-login__forgot {
    display: flex;
    justify-content: flex-end;
    margin-top: calc(-1 * var(--mosadaqa-space-3));
}

/* Captcha block (shared _Captcha partial) — rendered only after a failed attempt */
.ms-page-login .ms-login__captcha {
    padding: var(--mosadaqa-space-4);
    background: var(--mosadaqa-white);
    border: 1px solid var(--mosadaqa-line);
    border-radius: 12px;
}

.ms-page-login .ms-login__captcha-hint {
    display: flex;
    align-items: flex-start;
    gap: var(--mosadaqa-space-2);
    margin: 0 0 var(--mosadaqa-space-3);
    font-size: var(--mosadaqa-text-sm);
    line-height: 1.6;
    color: var(--mosadaqa-ink);
}

.ms-page-login .ms-login__captcha-hint i {
    margin-top: 3px;
    color: var(--mosadaqa-blue-dark);
}

.ms-page-login .ms-login__captcha .form-group {
    margin-bottom: 0;
}

.ms-page-login .ms-captcha__refresh {
    display: inline-block;
    margin-bottom: var(--mosadaqa-space-2);
}

.ms-page-login .ms-captcha__image {
    border-radius: 12px;
    max-height: 90px;
    object-fit: cover;
}

.ms-page-login .ms-form-card .tetco-checkbox label {
    margin: 0;
    font-size: var(--mosadaqa-text-md);
    font-weight: 600;
}

/* Sign-up call-to-action under the button */
.ms-page-login .ms-login__signup {
    margin-top: var(--mosadaqa-space-2);
    padding-bottom: var(--mosadaqa-space-2);
}

.ms-page-login .ms-login__signup .btn-link {
    font-size: var(--mosadaqa-text-md);
}
