/* ===========================================================================
   Login, registration, password forgotten - the inner look
   ---------------------------------------------------------------------------
   Moved out of a.css (2026-11-28) so the app can use it too: the website's
   auth modals (js/main2025.js buildLoginModal / buildSignupModal /
   buildForgotPasswordModal) and the app's login, registration and password
   screens (mobile/src/index.html) share this markup and these rules. The app
   gets a copy with `npm run sync` in mobile/.

   Everything is scoped to .modal-v2, the class both website carriers (the
   auth modal and the upsell overlay) and the app's auth panels carry. The
   carriers themselves - backdrop, box, phone full-screen - stay in a.css,
   because the app has its own screens instead of a modal.

   Linked on every page right after a.css (includes/header.php), so the
   cascade is the same as when these rules sat at the end of a.css's modal
   section. Colours: --lg-modal-* in tokens.css (light and dark).
   =========================================================================== */

/* Success state inside .modal-v2 — built by form-register and form-password-forgotten
   submit handlers using <div class="modal__top">…<div class="modal__shade">…. The
   shade hosts body copy + secondary headline; .h2-style for the secondary heading. */
.modal-v2 .modal__shade > p { margin:0 0 0.75rem; line-height:1.5; color:var(--lg-modal-copy, #3a3a4a); }
.modal-v2 .modal__shade > p:last-child { margin-bottom:0; margin-top:1rem }
.modal-v2 .modal__shade > .h2-style {
	display:block;
	font-size:1.05rem;
	font-weight:700;
	color:var(--lg-modal-heading, #1a1a2e);
	margin:1rem 0 0.4rem;
}

/* --- Shared inner styling (apply to both carriers) ---------------------- */

.modal-v2 .modal__top { padding:2.5rem 2.25rem 1.25rem; text-align:center; max-width:480px; margin:0 auto; }

.modal-v2 .modal__shade { background:var(--lg-bg, rgb(252, 250, 246)); padding:0.5rem 2.25rem 2rem; max-width:450px; margin:0 auto; }

.modal-v2 .modal__header { text-align:center; margin-bottom:0.5rem; }

.modal-v2 .modal__title {
	font-size:1.3rem;
	font-weight:800;
	color:var(--lg-modal-heading, #1a1a2e);
	margin:0 0 0.35rem;
	padding:0;
}
.modal-v2 .modal__subtitle {
	font-size:1.05rem;
    line-height:1.5;
	color:var(--lg-text-muted, #6b6b7b);
	margin:0;
	padding:0 0 0.5rem;
}
/* Spacing of the .lg-btn pills in the login / registration / password /
   get_account modals (2026-11-20). Look comes from .lg-btn (lg.core.css). */
.modal-v2 .modal__cta { margin-top:0.5rem; }
.modal-v2 .modal__cta + .modal__cta { margin-top:0.6rem; }
/* The spinner slot (.form-status) is empty until a submit: hide it then, or
   .lg-btn's gap pushes the label off centre. */
.modal-v2 .modal__cta .form-status:empty { display:none; }


/* Google + Apple sign-in buttons.

   One shared rule rather than two: the two buttons sit directly on top of each
   other in .modal__top, and App Store guideline 4.8 requires Sign in with Apple
   to be no less prominent than any other third-party login — identical size,
   weight and shape is the simplest way to keep that true as this rule changes.
   Apple's own guidelines permit the white-with-outline treatment used here, so
   the pair does not need two different looks. */
.modal-v2 .modal__google,
.modal-v2 .modal__apple {
	display:flex;
	align-items:center;
	justify-content:center;
	gap:0.6rem;
	padding:0.7rem 1rem;
	border:1px solid var(--lg-modal-line, #e3e3ea);
	border-radius:10px;
	background:var(--lg-surface, #ffffff);
	color:var(--lg-modal-heading, #1a1a2e);
	text-decoration:none;
	font-size:0.95rem;
	font-weight:bold;
	transition:background 0.15s, border-color 0.15s;
	margin-top:0.25rem;
}
.modal-v2 .modal__google:hover,
.modal-v2 .modal__apple:hover { background:var(--lg-bg, rgb(252, 250, 246)); border-color:var(--lg-border-input, #d6d6dd); }

/* Slightly more air above the Apple button, which always follows the Google
   one — 0.25rem alone reads as a single mis-sized element rather than two. */
.modal-v2 .modal__apple { margin-top:0.6rem; }

.modal-v2 .modal__google-icon { width:18px; height:18px; flex-shrink:0; }

/* 17px, not 18: the Apple glyph fills its 24x24 viewBox top to bottom while the
   Google mark is inset, so matching the box sizes would leave the Apple logo
   visibly the larger of the two. */
.modal-v2 .modal__apple-icon { width:17px; height:17px; flex-shrink:0; }

/* Divider with text */
.modal-v2 .modal__divider {
	display:flex;
	align-items:center;
	gap:0.75rem;
	color:var(--lg-modal-faint, #94949e);
	font-size:0.82rem;
	margin:1rem 0 0.85rem;
	text-transform:uppercase;
	letter-spacing:0.04em;
}
.modal-v2 .modal__divider::before,
.modal-v2 .modal__divider::after { content:""; flex:1; height:1px; background:var(--lg-modal-line, #e3e3ea); }

/* Form fields */
.modal-v2 .modal__field { margin-bottom:0.65rem; }
/* Cloudflare Turnstile in the signup form (js/main2025.js renderTurnstile):
   interaction-only, so no room taken while it checks in the background;
   centred with a little air once Cloudflare asks for a click. */
.modal-v2 .lg-turnstile { display:flex; justify-content:center; }
.modal-v2 .lg-turnstile.is-visible { margin:0.35rem 0 0.75rem; }
.modal-v2 .lg-turnstile.lg-missing { display:block; margin:0.35rem 0 0.75rem; }

.modal-v2 .modal__field .input-text {
	width:100%;
	padding:0.8rem 1rem;
	font-size:0.95rem;
	border:1px solid var(--lg-border-input, #d6d6dd);
	border-radius:8px;
	background:var(--lg-surface, #ffffff);
	outline:none;
	transition:border-color 0.15s, box-shadow 0.15s;
	box-sizing:border-box;
	font-family:inherit;
}

/* "Forgot your password?" link inside login form */
.modal-v2 .modal__forgot {
	display:block;
	text-align:right;
	font-size:0.85rem;
	color:var(--lg-text-muted, #6b6b7b);
	text-decoration:none;
	margin:0.1rem 0 0.85rem;
	cursor:pointer;
}
.modal-v2 .modal__forgot:hover { color:var(--lg-red, #e55853); text-decoration:underline; }

/* Panel-switch line ("Don't have an account? Sign up") */
.modal-v2 .modal__switch {
	text-align:center;
	font-size:0.9rem;
	color:var(--lg-text-muted, #6b6b7b);
	margin:1rem 0 0;
	padding:0;
}
.modal-v2 .modal__switch a,
.modal-v2 .modal__switch .a-style {
	color:var(--lg-red, #e55853);
	text-decoration:none;
	cursor:pointer;
	font-weight:500;
}
.modal-v2 .modal__switch a:hover,
.modal-v2 .modal__switch .a-style:hover { text-decoration:underline; }

/* Checkboxes (terms / newsletter) */
.modal-v2 .modal__checkbox {
	display:flex;
	align-items:flex-start;
    text-align:left;
	gap:0.55rem;
	font-size:0.87rem;
	color:var(--lg-modal-copy, #3a3a4a);
	line-height:1.4;
	margin:0.6rem 0;
	cursor:pointer;
	font-weight:normal;
}
.modal-v2 .modal__checkbox input[type=checkbox] { margin-top:0.2rem; flex-shrink:0; }

/* Terms-of-service note (auto-checked variant for non-DE/NL signup) */
.modal-v2 .modal__terms {
	font-size:0.78rem;
	color:var(--lg-text-muted, #6b6b7b);
	line-height:1.4;
	margin:0.85rem 0 1.25rem 0;
	padding:0;
	text-align:left;
}
.modal-v2 .modal__terms a { color:var(--lg-text-muted, #6b6b7b); text-decoration:underline; }


/* Form error banner (prepended on submission failure) */
.modal-v2 .form-error-message {
	background:var(--lg-modal-error-bg, #fff0ef);
	color:var(--lg-modal-error-text, #d93c36);
	border:1px solid var(--lg-modal-error-border, #f7c4c1);
	border-radius:8px;
	padding:0.6rem 0.8rem;
	font-size:0.85rem;
	margin-bottom:0.8rem;
	line-height:1.35;
    text-align:left;
}

