/**
 * Digits + Eduma popup - v5.1.18
 *
 * Appearance / layout only. No authentication or timer logic lives here.
 * -----------------------------------------------------------------------
 * v5.1.18: IP rate limits match Digits originals (multiplier default 1.0).
 * -----------------------------------------------------------------------
 * v5.1.10: Version header aligned with theme 5.1.10 (rate-limit +
 * security-toggle polish in functions.php).
 * -----------------------------------------------------------------------
 * v5.0.2: Ensure Resend OTP is visible on OTP step (styles for footer +
 * nested .digits-form_resend_otp). JS recovers Digits' native control
 * when Digits left it hidden.
 * -----------------------------------------------------------------------
 * v5.0.1: OTP / forgot-password step – centre the (i) info icon on the
 * field, add input padding so text never sits under the icon, style the
 * Resend OTP link in the form footer, and (via JS) replace Digits'
 * "Email Passcode" placeholder with "Enter verification code".
 * -----------------------------------------------------------------------
 * v5.0.1: "Lost your password?" is now injected on the initial email
 * step (same line as Remember Me, right-aligned). Digits only creates
 * its real link after Continue; the original footer link stays untouched.
 * -----------------------------------------------------------------------
 * v4.9.10: corrects v4.9.9 which targeted the wrong Digits UI
 * (old "dig_lrf_box" classes) – see section 3f for the real NEW-UI structure.
 * -----------------------------------------------------------------------
 * v4.9.9: second "Lost your password?" link on the login form,
 * right-aligned on the same line as Remember Me (section 3f).
 * -----------------------------------------------------------------------
 * v4.9.7: replaces the v4.9.6 JS-timing fix below for the tab underline
 * with a simpler, strictly more reliable CSS-only one - see section 3d-2
 * further down for the full writeup. Short version: this site only ever
 * renders a single tab, so there's nothing for Digits' JS-measured sliding
 * underline to slide between; a plain CSS border-bottom on the active tab
 * item is sized by the browser's normal layout and can never be
 * "measured too early" the way a JS getBoundingClientRect() read can. The
 * v4.9.6 transitionend-based JS fix is left in place (harmless, and still
 * useful for Turnstile/hCaptcha re-rendering on "digits_reposition"), it
 * just no longer matters for the underline specifically now that the
 * slider line is hidden via CSS.
 *
 * v4.9.6: fixes a real bug in the v4.9.5 underline fix below - it re-fired
 * Digits' "digits_reposition" only 50ms after the popup got its "active"
 * class, but #thim-popup-login opens via its own 300ms CSS
 * transform:scale(...)/opacity transition (parent theme's style.css:
 * "#thim-popup-login{...transform:scale(0.2,0.2);transition:all 0.3s
 * cubic-bezier(0.4,0,1,1)}" / "#thim-popup-login.active{transform:
 * scale(1,1)...}"). Digits measures the active tab's on-screen position
 * with getBoundingClientRect() (what jQuery's .offset()/.position() use),
 * and a CSS transform on an ancestor distorts getBoundingClientRect() for
 * every descendant for as long as that transform is still animating - so
 * the 50ms trigger measured mid-scale-animation and got a shrunk, wrong
 * width/position, which then stuck (baked into the underline's own fixed
 * px width/transform) even once the popup finished opening. This is also
 * why clicking the "Use Email Address" tab itself always "fixed" it:
 * Digits' own tab-click handler re-measures unconditionally, and by the
 * time a click happens the transition has long finished.
 * assets/digits-eduma.js now waits for the popup's own "transitionend"
 * before re-triggering "digits_reposition" (with a timeout fallback for
 * browsers/settings that skip or shorten the transition) instead of a
 * fixed too-short delay - no CSS-only fix is possible here since the
 * underline's position is computed in JS, not CSS.
 *
 * v4.9.5: two more fixes, both scoped to the login/register widget only.
 * - The "Use Email Address" underline (Digits' own JS-driven
 *   ".digits-slider_line", assets/js/script.js -> moveTabSlider()) could
 *   end up positioned away from the tab label. Digits measures the active
 *   tab's position/width once on page load and again only on its own
 *   "digits_reposition" event; but Eduma opens/closes this popup with a
 *   CSS class toggle (#thim-popup-login.active), which Digits has no way
 *   to know about, so the measurement taken while the popup was still
 *   hidden/mid-transition never gets refreshed once it's actually shown.
 *   assets/digits-eduma.js now triggers Digits' own "digits_reposition"
 *   event when the popup opens (and once more after full page load, to
 *   catch any late web-font size changes), so Digits re-measures against
 *   the real, final layout - no CSS-only fix is possible here since the
 *   underline's position is computed in JS, not CSS.
 * - Switching between the Digits widget's Login and Register views was an
 *   instant show/hide with no transition, unlike Eduma's own native
 *   login/register slide (see the removed ".thim-register" panel in
 *   section 4 below, which used to slide via
 *   ".sign-up .thim-popup-inner { transform: translateX(-100%) }" in the
 *   parent theme). Section 6 below adds a matching fade+slide transition
 *   for the real "Register Now" / "Login Now" links
 *   (".dig_login_signup_bar a.digits-form_toggle_login_register", real
 *   classes - verified in includes/forms/render.php), driven by
 *   assets/digits-eduma.js since Digits' own click handler swaps
 *   `display` instantly and CSS alone cannot animate that.
 *
 * v4.9.4: two small fixes, both in section 3d/3e below.
 * - The tab bar (".digits-form_tab-bar", real Digits class, verified in
 *   assets/css/login.css) is a plain `display:flex` with no
 *   justify-content, so Digits left-aligns it. That's invisible when two
 *   tabs (phone + email) are shown, but this site only accepts email
 *   login/registration, so Digits only ever prints ONE tab item ("Use
 *   Email Address" - includes/forms/render.php, signup.php), which then
 *   sits flush-left instead of reading as a centred heading. Centred with
 *   `justify-content: center`.
 * - Eduma's own popup markup (thim_form_login_popup() in the parent
 *   theme) prints a static "Login with your site account" heading above
 *   the whole widget and never updates it, because that heading belongs
 *   to Eduma's own register/login slide toggle, which functions.php
 *   switches off in favour of Digits' single combined widget (see the
 *   file-level PHP doc comment further down for why). Digits' own
 *   internal heading updates fine when its "Register Now" link is
 *   clicked, but that internal heading is hidden by section 2 below, so
 *   the visible Eduma heading was left stuck on "Login with your site
 *   account" even after switching to the Register panel. Fixed with a
 *   small script (assets/digits-eduma.js) that listens for the same
 *   click Digits itself listens for and swaps the Eduma heading text to
 *   match - no changes needed inside the Digits plugin itself.
 *
 * v4.9.3: fixes a real regression from v4.9.1/v4.9.2 - see the "REMOVED in
 * v4.9.3" note in section 3c below for the full root-cause writeup. Short
 * version: forcing a fixed 52px height on the password field's row broke
 * the Register panel, where that row also contains a label above the
 * input, causing the password box to overflow and visually collide with
 * the Continue button underneath it. That forced height and its
 * accompanying icon-position override have been removed; Digits' own
 * unmodified CSS already positions the eye icon correctly without them.
 * Also tightened `.digits-form_input_row`'s margin-bottom (Digits' own
 * stock value, unrelated to the bug above) from 20px to 14px so field-to-
 * field spacing matches Eduma's rhythm elsewhere on the site.
 *
 * v4.9.0: v4.8.0 themed every colour Digits exposes as a CSS variable but
 * left two hardcoded values from Digits' own login.css untouched: an 8px
 * border-radius on every button/input, and no text-transform on the
 * button label. Both are Eduma theme-customizer variables everywhere
 * else on the site, so the form still looked visually "foreign" even
 * with colours matching. Section 3b below overrides just those two
 * properties with the same variables Eduma's own buttons/inputs use.
 *
 * Why this file looks different from v4.7.5:
 * Digits' "new UI" form (digits_render_new_form()) ships its own
 * well-built stylesheet (assets/css/login.css, always enqueued by the
 * plugin itself) that themes its buttons, tabs, focus states, checkboxes
 * etc. entirely through a handful of CSS custom properties:
 *   --dprimary  --dtitle  --dfield_bg  --daccent  --dform_bg  --dbutton_text
 * The previous version of this file never set those and instead tried to
 * !important-override class names such as .digits-form_footer_actions,
 * .dig_remember_me, .digits-form_or, .loginviasms - none of which exist
 * anywhere in the Digits plugin source, so none of those rules ever
 * matched anything. The real classes Digits renders are things like
 * .digits-form_rememberme, .digits-form_login_separator and
 * .dig_login_signup_bar (verified against includes/forms/render.php and
 * includes/wcs.php in the installed plugin).
 *
 * The fix here is mostly a handful of CSS variable overrides so Digits'
 * own CSS naturally matches the Eduma theme colour, plus a small number
 * of real layout tweaks to make the widget sit correctly inside the
 * Eduma login popup shell.
 */

:root {
	--eduma-digits-primary: var(--thim-body-primary-color, #ffb606);
}

/* -------------------------------------------------------------------------
 * 1. Make Digits use the Eduma theme colour for everything it themes
 *    itself (buttons, active tab, focus border, checkboxes, links, "or"
 *    divider, register/login toggle text). This is the single biggest
 *    fix: Digits' own login.css keys almost all of its colour off these
 *    variables already.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits-form_container {
	--dprimary: var(--eduma-digits-primary);
	--daccent: var(--eduma-digits-primary);
	--dbutton_text: #fff;
	--dtitle: var(--thim-font-title-color, #222);
	--dfield_bg: #f5f5f5;
	--dform_bg: transparent;
}

/* -------------------------------------------------------------------------
 * 2. Fit the widget into the Eduma popup panel instead of Digits' own
 *    fixed 400px modal width.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap,
.eduma-digits-form-wrap .digits-form_container {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: 0;
}
.eduma-digits-form-wrap .digits-form_wrapper {
	width: 100%;
}

/* Digits prints its own "Login" / "Register" / "Reset Password" heading
 * (.digits-form_heading) - Eduma already shows its own ".thim-login .title"
 * heading above this widget, so hide Digits' internal one to avoid a
 * duplicate title. */
.eduma-digits-form-wrap .digits-form_heading {
	display: none;
}

/* -------------------------------------------------------------------------
 * 3. Small real-class fixes / spacing to match Eduma's rhythm. Every
 *    selector below exists verbatim in the installed Digits plugin.
 * ------------------------------------------------------------------------- */

/* Divider between "Continue" and "Passwordless login" */
.eduma-digits-form-wrap .digits-form_login_separator {
	margin: 16px 0;
}

/* Field-to-field spacing. Digits' own login.css gives every
 * `.digits-form_input_row` (verified: assets/css/login.css) a flat
 * `margin-bottom: 20px` - this is Digits' stock spacing, not something
 * Eduma or this file previously changed, and on its own it isn't a bug.
 * With a 17px bold label sitting above each 52px input though, that 20px
 * gap reads as noticeably more than 20px of visual whitespace between
 * fields (First Name / Last Name / Email / Password), which is what
 * looked oversized on the Register panel. Tightened here to sit closer
 * to Eduma's own form rhythm elsewhere on the site. */
.eduma-digits-form-wrap .digits-form_input_row {
	margin-bottom: 14px;
}

/* Remember-me row (restored to its original, correct rule - v4.9.9's
 * first attempt at this wrongly zeroed this margin out and moved it to
 * ".digits_login_field_row", a class that only exists in Digits' OLD
 * "dig_lrf_box" renderer. This site actually renders the NEW UI
 * (digits_render_new_form(), verified against the real page markup -
 * ".digits2_box"/".digits-form_*" classes), which never prints that
 * wrapper at all, so that rule matched nothing and the zeroed margin
 * here was pure regression. See section 3f below for the real fix. */
.eduma-digits-form-wrap .digits-form_rememberme {
	margin: 12px 0 20px;
}
.eduma-digits-form-wrap .digits-form_rememberme .dig_input_wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

/* -------------------------------------------------------------------------
 * 3f. v4.9.9 (corrected): second "Lost your password?" / "Forgot
 *    Password?" link, right-aligned on the same line as Remember Me.
 *
 *    This site renders Digits' NEW UI (digits_render_new_form(),
 *    includes/forms/render.php), confirmed against the actual page
 *    markup - NOT the old "dig_lrf_box" UI the first pass of this
 *    feature was (incorrectly) built against. In this UI:
 *      - Remember Me (dig_rememberMe()) is wrapped in
 *        ".digits_form-init_step_data", which Digits' own login.css
 *        hides by default and only shows while the form still carries
 *        ".digits_form_index_section" (i.e. the very first email/phone
 *        step) - assets/js/script.js removes that class the moment the
 *        user continues to the password step, hiding Remember Me again.
 *      - The "Forgot Password?" link (".digits-form_show_forgot_password",
 *        includes/forms/handler/process.php password_tab()) does not
 *        exist in the DOM at all until AFTER that same "Continue" step,
 *        when Digits' own AJAX response adds the password field and
 *        copies that link into the persistent ".digits-form_footer" box
 *        further down the form (assets/js/script.js
 *        update_form_footer()) - nowhere near Remember Me.
 *    So on page load neither element is in a state where they could
 *    ever sit on one line together; getting them side by side needs
 *    two things, both handled here/in the JS:
 *      1. Keep Remember Me visible past the first step (below), instead
 *         of only for as long as ".digits_form_index_section" is present.
 *      2. In assets/digits-eduma.js, watch ".digits-form_footer" and, the
 *         moment Digits' own JS drops the real "Forgot Password?" link
 *         into it, clone that link (same classes, so Digits' existing
 *         delegated click handler still fires on it) into the Remember
 *         Me row. The original link inside ".digits-form_footer" is
 *         left exactly as Digits put it - never removed or moved.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap form.digits_form_index_section .digits_form-init_step_data {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin: 12px 0 20px;
}
.eduma-digits-form-wrap .digits_form-init_step_data .digits-form_rememberme {
	margin: 0;
}
.eduma-digits-form-wrap .digits_form-init_step_data .eduma-lost-pass-inline {
	color: var(--eduma-digits-primary);
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
}
.eduma-digits-form-wrap .digits_form-init_step_data .eduma-lost-pass-inline:hover {
	text-decoration: underline;
}

/* "Not a member yet? Register Now" / "Already a member? Login Now" */
.eduma-digits-form-wrap .dig_login_signup_bar {
	text-align: center;
	font-size: 15px;
}
.eduma-digits-form-wrap .dig_login_signup_bar a {
	color: var(--eduma-digits-primary);
}

/* Submit buttons already inherit --dprimary/--dbutton_text; just make sure
 * they don't fight Eduma's own global "button" rules for height/margin. */
.eduma-digits-form-wrap .digits-form_button {
	margin: 0 0 4px;
}

/* -------------------------------------------------------------------------
 * 3b. Digits' own login.css hardcodes an 8px pill radius on every button
 *    and input (.digits-form_button, .digits-form_input input) and never
 *    applies a text-transform to the button label - verified in
 *    assets/css/login.css. Eduma's own buttons/inputs everywhere else on
 *    the site key both of those off theme customizer variables
 *    (--thim-border-radius-button / --thim-font-button-text-transform),
 *    so without this the Digits form is the one rounded, lowercase button
 *    on an otherwise square, uppercase-button site. Override with the
 *    same variables Eduma's own markup uses, so it inherits whatever the
 *    customizer is set to instead of Digits' fixed 8px/none.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits-form_button,
.eduma-digits-form-wrap .digits-form_input input,
.eduma-digits-form-wrap .digits-form_input textarea {
	border-radius: var(--thim-border-radius-button, 0);
}
.eduma-digits-form-wrap .digits-form_button-text {
	text-transform: var(--thim-font-button-text-transform);
}

/* -------------------------------------------------------------------------
 * 3c. REMOVED in v4.9.3 - this was a real bug, not a fix.
 *
 * v4.9.1/v4.9.2 forced `height: 52px` on any `.digits-form_input_row`
 * containing the password eye icon, to give a percentage `top` something
 * definite to resolve against. That reasoning only holds for rows whose
 * ONLY content is the 52px input - true for the login-flow password field
 * (includes/forms/handler/process.php: password_tab(), no label).
 *
 * It is NOT true for the register form's password row (includes/forms/
 * signup.php: field_render(), "dig_cs_password"), which prints a
 * <label class="field_label"> ABOVE the input inside the same row. That
 * row's real content is taller than 52px, so forcing the box down to
 * 52px doesn't shrink it - the label + input still render at full size
 * and overflow past the row's own (now too-short) box, visually
 * colliding with whatever sits directly below (the Continue button).
 * That overflow is exactly the "password box touching the box below it"
 * bug on the Register panel.
 *
 * Fix: removed the forced height and the accompanying `top: 50%`
 * override entirely. Digits' own unmodified login.css already positions
 * `.digits_password_eye` correctly for both cases without needing a
 * definite row height: it anchors the icon from the BOTTOM of the row
 * (`bottom: 14px; right: 14px`), and the input is always the last
 * element in the row with nothing below it - so the row's bottom edge
 * always coincides with the input's own bottom edge, whether or not a
 * label sits above the input. A bottom-anchored offset needs no
 * percentage math and no definite container height, so it centers the
 * icon on the 52px input correctly in every case: login (no label) and
 * register (with label) alike.
 * ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
 * 3d. Centre the tab bar. Real class, verified in assets/css/login.css
 *    (".digits-form_tab-bar { display:flex; gap:24px; }" - no
 *    justify-content set there). This site only accepts email
 *    login/registration, so Digits renders a single tab item ("Use Email
 *    Address"); left it flush-left before, now centred. Harmless if a
 *    second tab (phone) is ever re-enabled - two centred tabs still read
 *    fine.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits-form_tab-bar {
	justify-content: center;
}

/* 3d-2. v4.9.7: bypass Digits' JS-measured sliding underline
 * (".digits-slider_line", assets/js/script.js -> moveTabSlider()) entirely
 * and draw the underline with plain CSS instead.
 *
 * That slider only exists so the underline can *animate* between two
 * tabs - but per the comment right above, this site only ever renders ONE
 * tab ("Use Email Address"; the phone tab is disabled), so there is
 * nothing to slide between. The JS version has to call
 * getBoundingClientRect() (via jQuery's .position()/.outerWidth(), used in
 * moveTabSlider()) to know where to draw the line, and that measurement is
 * only ever correct once #thim-popup-login's own open transition
 * (transform:scale(...)/opacity, parent theme's style.css) has fully
 * finished - a CSS transform on an ancestor distorts
 * getBoundingClientRect() for descendants for as long as it's still
 * animating. assets/digits-eduma.js already works around that by waiting
 * for "transitionend" before re-measuring, but for the single-tab case
 * there's a simpler, strictly more reliable fix: don't measure anything in
 * JS at all. A plain CSS border-bottom on the tab item is automatically
 * sized to that tab's own text by the browser's normal layout - it cannot
 * be "measured too early" because it isn't measured; it's just drawn.
 *
 * Digits' own login.css deliberately switches its stock border-bottom
 * underline off in favour of the JS slider (its own comment there: "hide
 * old border bottom underline" - ".digits-form_tab-item.digits-tab_active
 * { border-bottom: none !important; ... }"). This turns it back on for
 * the (only) active tab and hides the JS slider so the two can never
 * visually collide or race each other.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits-slider_line {
	display: none !important;
}
.eduma-digits-form-wrap .digits-form_tab-item.digits-tab_active {
	border-bottom: 3px solid var(--dprimary) !important;
	padding-bottom: 3px;
}

/* 3e. The "Login with your site account" / "Register a new account"
 * heading swap on toggle is handled in assets/digits-eduma.js, not here -
 * it's a text change driven by a click event, not something CSS can do. */

/* -------------------------------------------------------------------------
 * 4. Hide Eduma's native register panel and its slide mechanism.
 *
 * Eduma's popup markup (thim_form_login_popup() in the parent theme)
 * always prints a second ".thim-register" panel and a "Register now" /
 * "Login now" link that slide #thim-popup-login .thim-popup-inner via a
 * "sign-up" / "sign-in" class. Digits' combined form already contains its
 * own login/register/forgot-password toggle inside the single widget
 * rendered into ".thim-login", so the Eduma-native panel is switched off
 * entirely rather than trying to keep two register UIs in sync.
 * ------------------------------------------------------------------------- */
body.eduma-digits-active #thim-popup-login .thim-register {
	display: none;
}
body.eduma-digits-active #thim-popup-login .thim-login > .link-bottom {
	display: none;
}

/* Some header/menu widgets link straight into the "sign-up" state
 * (Eduma's own "Register" nav link). With the register panel hidden that
 * slide would otherwise reveal blank space, so keep the panel that IS
 * visible (.thim-login, containing the Digits widget) always in view. */
body.eduma-digits-active #thim-popup-login .thim-popup-inner {
	transform: none !important;
}

/* -------------------------------------------------------------------------
 * 5. Popup shell sizing (legitimate Eduma classes - unrelated to Digits'
 *    own markup, kept from the previous version of this file).
 * ------------------------------------------------------------------------- */
#thim-popup-login .thim-login-container {
	height: auto;
	max-height: calc(100vh - 40px);
}
#thim-popup-login .thim-popup-inner {
	height: auto;
	min-height: 0;
	max-height: calc(100vh - 80px);
	overflow-x: hidden;
	overflow-y: auto;
	padding-bottom: 8px;
}
#thim-popup-login .thim-login {
	height: auto;
	min-height: 0;
}
#thim-popup-login .close-popup {
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 30;
	opacity: 1;
	visibility: visible;
	cursor: pointer;
}

@media (max-width: 480px) {
	#thim-popup-login .thim-popup-inner {
		max-height: calc(100vh - 48px);
	}
}

/* -------------------------------------------------------------------------
 * 6. Login <-> Register slide transition (assets/digits-eduma.js drives
 *    the class swap on click; this just defines what each state looks
 *    like). Mirrors Eduma's own native login/register slide direction:
 *    moving to Register shifts content leftward (new panel enters from
 *    the right), moving back to Login shifts it rightward (new panel
 *    enters from the left).
 *
 * v4.9.8: added the height animation itself (the "eduma-fx-sizing" rule
 * right above, plus the measuring/animating logic in
 * assets/digits-eduma.js). Root cause of the reported "different height"
 * jump: Eduma's OWN native login/register slide (the removed
 * ".thim-register"/"sign-up" mechanism referenced in section 4 above)
 * never had this problem because the parent theme lays its two panels
 * out as permanent flex siblings inside ".thim-login-container"
 * ("display:flex" + each panel "min-width:100%", verified in the parent
 * theme's style.css) - both panels are always present at once, so the
 * container is always exactly as tall as the taller of the two, and
 * "sliding" is just a horizontal transform with zero height change,
 * ever. Digits' combined widget doesn't work that way: its login,
 * register and forgot-password panels are three separate <form
 * class="digits_form_index_section">s that Digits shows/hides with
 * plain display:none/block (its own script.js click handler, and the
 * $current.hide()/$next.show() calls in section 3's click handler in
 * assets/digits-eduma.js) - only ONE panel ever actually occupies space
 * at a time, so the wrapper's height is always just that one panel's own
 * height, and switching to a taller/shorter panel is a hard, instant
 * snap with nothing to animate between.
 *
 * Rebuilding Digits' three panels as permanent flex siblings (Eduma's
 * exact approach) would need them to stay in the DOM and take up layout
 * space simultaneously, which means the off-screen one's form fields
 * would still be tabbable/focusable while "hidden" only by
 * overflow:hidden clipping - a real accessibility regression this file
 * has no easy way to fully undo, since Digits' own script.js reaches
 * into these panels independently of anything added here. Animating the
 * wrapper's height instead needs no DOM/visibility restructuring at all:
 * assets/digits-eduma.js measures $next's real, undistorted height with
 * a plain .outerHeight() read (offsetHeight-based - unlike
 * getBoundingClientRect()/.position() in section 3d-2 above, this is
 * NOT affected by an ancestor's CSS transform, so it needs none of that
 * section's transitionend-timing workaround) while it's still
 * display:none, then sets the wrapper's height from the old value to
 * that new value across a CSS transition (the "eduma-fx-sizing" rule
 * above) at the same time as the existing fade/slide. The box resizes
 * smoothly to the incoming panel's real height instead of jumping - not
 * literally "two panels of fixed equal height" like Eduma's own
 * mechanism, but the same end result the user sees: no jarring snap.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits-form_wrapper {
	position: relative;
}
/* Only clip during the optional height animation – never permanently */
.eduma-digits-form-wrap .digits-form_wrapper.eduma-fx-sizing {
	overflow: hidden;
}
/* v4.9.8: only apply while assets/digits-eduma.js is actively driving a
 * height change (class added/removed right before/after the animated
 * height is set - see section 6 write-up below). Left off the rest of
 * the time so a normal, non-animated layout change (e.g. a validation
 * message appearing) is never clipped by the overflow:hidden above. */
.eduma-digits-form-wrap .digits-form_wrapper.eduma-fx-sizing {
	transition: height 0.25s ease;
}
.eduma-digits-form-wrap .digits-form_wrapper .digits_form_index_section {
	transition: opacity 0.25s ease, transform 0.25s ease;
}
.eduma-digits-form-wrap .digits-form_wrapper .digits_form_index_section.eduma-fx-hidden-left {
	opacity: 0;
	transform: translateX(-24px);
}
.eduma-digits-form-wrap .digits-form_wrapper .digits_form_index_section.eduma-fx-hidden-right {
	opacity: 0;
	transform: translateX(24px);
}

/* -------------------------------------------------------------------------
 * 3g. v4.9.12 – OTP / forgot-password step polish
 *
 * 1) Info (i) icon: Digits positions .digits_otp_info_ic with
 *    top: calc(50% - 9px) absolute, but the parent .digits-form_input
 *    (class digits-form_input_info) does not always establish a
 *    positioning context cleanly after AJAX injection, and the input
 *    has no extra right padding so the placeholder can sit under the
 *    icon. Force relative on the wrapper, centre the icon on the 52px
 *    input, and give the field breathing room on the right.
 *
 * 2) Resend OTP: Digits copies .digits-form_footer_content into
 *    .digits-form_footer via update_form_footer() and then calls
 *    .show() from digits_resend_timer(). Ensure the footer link is
 *    visible, centred, and styled when Digits un-hides it – without
 *    overriding Digits' own timer / disabled state.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits-form_input.digits-form_input_info {
	position: relative;
}
.eduma-digits-form-wrap .digits-form_input.digits-form_input_info input.otp_input,
.eduma-digits-form-wrap .digits-form_input.digits-form_input_info input.digits_otp_input-field {
	/* (i) icon hidden in v4.9.15 – normal padding is enough */
	padding-right: 16px;
}
.eduma-digits-form-wrap .digits_otp_info {
	position: absolute;
	right: 0;
	top: 0;
	bottom: auto;
	height: 52px;
	width: 44px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: auto;
	z-index: 2;
}
.eduma-digits-form-wrap .digits_otp_info_ic {
	position: static;
	right: auto;
	top: auto;
	height: 18px;
	width: 18px;
	flex-shrink: 0;
}
/* Tooltip stays above the field */
.eduma-digits-form-wrap .digits_otp_info_desc {
	left: auto;
	right: 0;
	top: -8px;
	transform: translateY(-100%);
}



/* -------------------------------------------------------------------------
 * 3h. v4.9.15 – Option A polish (user preference)
 *
 * 1) Hide Digits' broken (i) tooltip that overlaps the OTP tab underline.
 *    The hover card is confusing; remove the whole info chip instead of
 *    fighting Digits' absolute positioning.
 * 2) Resend OTP: was display:block so the underline stretched full width.
 *    Use inline-block so underline matches text only; no permanent
 *    underline, only on hover when the link is enabled.
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .digits_otp_info {
	display: none !important;
}

/* Resend OTP – style only when Digits shows it (footer or nested). Never set display. */
.eduma-digits-form-wrap .digits-form_footer {
	text-align: center;
}
.eduma-digits-form-wrap .digits-form_footer_content {
	text-align: center;
	margin-top: 12px;
}
.eduma-digits-form-wrap .digits-form_footer .digits-form_resend_otp,
.eduma-digits-form-wrap .digits-form_footer_content .digits-form_resend_otp {
	width: auto;
	max-width: 100%;
	margin-top: 8px;
	padding: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--eduma-digits-primary);
	cursor: pointer;
	text-decoration: none;
	text-underline-offset: 3px;
	line-height: 1.4;
}
.eduma-digits-form-wrap .digits-form_footer .digits-form_resend_otp.digits_resend_disabled,
.eduma-digits-form-wrap .digits-form_footer_content .digits-form_resend_otp.digits_resend_disabled {
	opacity: 0.45;
	cursor: default;
}
.eduma-digits-form-wrap .digits-form_footer .digits-form_resend_otp:not(.digits_resend_disabled):hover,
.eduma-digits-form-wrap .digits-form_footer_content .digits-form_resend_otp:not(.digits_resend_disabled):hover {
	text-decoration: underline;
}




/* -------------------------------------------------------------------------
 * 3i. v4.9.16 – "Code sent to …" line + Back to Login / Register
 * ------------------------------------------------------------------------- */
.eduma-digits-form-wrap .eduma-code-sent {
	display: block;
	text-align: center;
	font-size: 13px;
	line-height: 1.4;
	color: #5a6570;
	background: #eef8f1;
	border: 1px solid #cfe9d6;
	border-radius: 20px;
	padding: 8px 14px;
	margin: 0 0 14px;
	word-break: break-word;
}

.eduma-digits-form-wrap .eduma-auth-nav {
	display: block;
	text-align: center;
	margin-top: 18px;
	font-size: 15px;
	color: inherit;
}
.eduma-digits-form-wrap .eduma-auth-nav a {
	color: var(--eduma-digits-primary);
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}
.eduma-digits-form-wrap .eduma-auth-nav a:hover {
	text-decoration: underline;
}
.eduma-digits-form-wrap .eduma-auth-nav-sep {
	color: #8a949e;
	font-weight: 400;
	margin: 0 2px;
}


/* -------------------------------------------------------------------------
 * 3j. Password eye – vertical alignment ONLY
 *
 * Digits owns open/closed SVG + slash-line animation.
 * Do NOT touch: overflow (must stay hidden), .digits_password_eye-line
 * transforms, or SVG paths. Only place the 24×24 box on the input centre
 * (top is set by JS alignPasswordEyes).
 * ------------------------------------------------------------------------- */

#thim-popup-login .digits_password_inp_row,
.eduma-digits-form-wrap .digits_password_inp_row {
	position: relative !important;
}

/* Room so typed text does not sit under the icon */
#thim-popup-login .digits_password_inp_row input[type="password"],
#thim-popup-login .digits_password_inp_row input[type="text"],
.eduma-digits-form-wrap .digits_password_inp_row input[type="password"],
.eduma-digits-form-wrap .digits_password_inp_row input[type="text"] {
	padding-right: 44px !important;
	box-sizing: border-box !important;
}

/*
 * Position shell only. Keep Digits overflow:hidden so the slash line is
 * clipped when translated off-box. Do not set transform (Digits + JS).
 */
#thim-popup-login .digits_password_inp_row .digits_password_eye,
.eduma-digits-form-wrap .digits_password_inp_row .digits_password_eye {
	position: absolute !important;
	right: 14px !important;
	left: auto !important;
	width: 24px !important;
	height: 24px !important;
	margin: 0 !important;
	overflow: hidden !important; /* required – clips the slash line */
	z-index: 5;
	pointer-events: auto !important;
	opacity: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

/* Do NOT style .digits_password_eye-line – leave Digits animation intact */

html[dir="rtl"] #thim-popup-login .digits_password_inp_row .digits_password_eye,
html[dir="rtl"] .eduma-digits-form-wrap .digits_password_inp_row .digits_password_eye {
	right: auto !important;
	left: 14px !important;
}
html[dir="rtl"] #thim-popup-login .digits_password_inp_row input[type="password"],
html[dir="rtl"] .eduma-digits-form-wrap .digits_password_inp_row input[type="password"] {
	padding-right: 16px !important;
	padding-left: 44px !important;
}
