/* ==========================================================================
   geo-auth.css — Sign In / Sign Up pages. A two-column split: the public GNSS
   stations map (left) and the auth card (right, vertically centred against the
   map). Loads AFTER geo-map.css, whose .geo-map-* classes style the map's
   floating controls/panels/popups; this file only adds the split layout, the
   map-stage sizing (stretchy on desktop, fixed height on mobile) and the auth
   card. Scoped under .geo-auth. Tokens (--geo-*) come from geo-chrome.css.
   ========================================================================== */

.geo-auth .geo-main { padding: 16px 24px 34px; }

/* ---------- split layout ---------- */
.geo-auth-split {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 20px;
	align-items: stretch;
	/* stretch with the viewport: taller screen -> taller map */
	height: clamp(480px, calc(100vh - 210px), 900px);
}

/* the map column: give the .geo-map shell a real height for its stage to fill */
.geo-auth-map { min-height: 0; display: flex; }
/* override geo-map.css's full-bleed 85vh stage — here the stage fills the grid row */
.geo-auth .geo-map-stage {
	height: 100%;
	min-height: 0;
	width: 100%;
	border-radius: 16px;
	border: 1px solid var(--geo-border);
}
.geo-auth .geo-map-stage:fullscreen { border-radius: 0; }
/* round the MapLibre canvas corners with the stage */
.geo-auth .geo-map .maplibregl-canvas { border-radius: 16px; }

/* ---------- form column (card vertically centred against the map) ---------- */
.geo-auth-formcol {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 0;
}
.geo-auth-card {
	width: 100%;
	max-height: 100%;
	overflow-y: auto;
	background: var(--geo-card-bg);
	border: 1px solid var(--geo-border);
	border-radius: 16px;
	box-shadow: 0 2px 10px rgba(16, 24, 40, .06);
	padding: 26px 28px;
	text-align: center;
}
.geo-auth-card-head {
	font-family: var(--geo-font-head);
	font-weight: 700;
	font-size: 21px;
	color: var(--geo-ink);
	margin: 0 0 4px;
}
.geo-auth-card-sub { font-size: 13.5px; color: var(--geo-ink-soft); margin: 0 0 18px; }
.geo-auth-divider { height: 1px; background: var(--geo-border); margin: 18px 0; }

/* form fields (login renders bare widgets; register renders <p>+label via as_p) */
.geo-auth-form { text-align: left; }
.geo-auth-form p { margin: 0 0 12px; }
.geo-auth-form label {
	display: block;
	font-size: 12px;
	font-weight: 700;
	color: var(--geo-ink-faint);
	text-transform: uppercase;
	letter-spacing: .4px;
	margin: 0 0 5px;
}
.geo-auth-form input,
.geo-auth-form select,
.geo-auth-form textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #d4dde6;
	border-radius: 8px;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--geo-ink);
	background: #fff;
}
.geo-auth-form input:focus,
.geo-auth-form select:focus,
.geo-auth-form textarea:focus {
	outline: 2px solid rgba(40, 171, 227, .35);
	border-color: var(--geo-accent);
}
.geo-auth-form input[type="checkbox"],
.geo-auth-form input[type="radio"] { width: auto; }

/* consent row: label text first, checkbox after it, spread to the full form width */
.geo-auth-form p:has(.geo-consent-check) {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	width: 100%;
	margin-top: 4px;
}
.geo-auth-form p:has(.geo-consent-check) label {
	order: 1;
	display: inline;
	margin: 0;
	font-size: 12.5px;
	font-weight: 600;
	text-transform: none;
	letter-spacing: 0;
	color: var(--geo-ink-soft);
	cursor: pointer;
	line-height: 1.3;
}
.geo-auth-form .geo-consent-check {
	order: 2;
	flex: none;
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--geo-accent);
	cursor: pointer;
}
.geo-auth-form p:has(.geo-consent-check) ul.errorlist {
	order: 3;
	flex-basis: 100%;
}

/* Operator-only fields are injected by JS with a redundant <br> after a block
   label, which produced a large empty gap before each field. Labels are already
   display:block, so the line break is unnecessary. */
.geo-register .geo-auth-form br { display: none; }
/* Django field help text + validation errors */
.geo-auth-form .helptext,
.geo-auth-form .form-text { display: block; font-size: 11.5px; color: #98a6b5; margin-top: 4px; }
.geo-auth-form ul.errorlist {
	list-style: none;
	margin: 4px 0 0;
	padding: 0;
	font-size: 12px;
	color: #b42323;
}
.geo-auth-form ul.errorlist li { margin: 0; }

/* login field group (login form has no labels) */
.geo-auth-form .form-group { margin: 0 0 12px; }

/* primary CTA.
   NOTE: these buttons are sometimes <a> (Sign In again, Sign In, Sign Up). The
   global `.geo-main a { color: var(--geo-link) }` rule (geo-interior.css) has
   specificity (0,1,1) and would beat a bare `.geo-auth-btn` (0,1,0), turning the
   label blue-on-blue. Prefixing with `.geo-auth` raises specificity to (0,2,0)
   so these win for both <a> and <button>. */
.geo-auth .geo-auth-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 11px;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-weight: 700;
	font-size: 14px;
	background: var(--geo-accent);
	/* solid near-black text: --geo-accent-ink is a dark navy that reads "blue on blue" here */
	color: #10171d;
	cursor: pointer;
	transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.geo-auth .geo-auth-btn:hover {
	background: var(--geo-accent-hover);
	color: #10171d;
	transform: translateY(-2px);
	box-shadow: 0 10px 22px rgba(40, 171, 227, .4);
	text-decoration: none;
}

/* secondary / alternative action */
.geo-auth .geo-auth-alt {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	padding: 10px;
	border: 1px solid #d4dde6;
	border-radius: 8px;
	font-family: inherit;
	font-weight: 700;
	font-size: 13.5px;
	background: #fff;
	color: var(--geo-ink);
	cursor: pointer;
	transition: border-color .2s ease, color .2s ease;
}
.geo-auth .geo-auth-alt:hover { border-color: var(--geo-accent); color: var(--geo-link); text-decoration: none; }

/* "or" separator */
.geo-auth-or {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 16px 0;
	color: var(--geo-ink-soft);
	font-size: 12.5px;
}
.geo-auth-or::before,
.geo-auth-or::after { content: ""; flex: 1; height: 1px; background: var(--geo-border); }

.geo-auth .geo-auth-forgot {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	color: var(--geo-ink-soft);
	font-style: italic;
}
.geo-auth .geo-auth-forgot:hover { color: var(--geo-link); text-decoration: none; }

/* ---------- single-card layout (auth-flow intermediate pages: password reset,
   logout, account activation — no map, one centred message/form card) ---------- */
.geo-auth-single {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: clamp(360px, calc(100vh - 260px), 640px);
	padding: 10px 0;
}
.geo-auth-single .geo-auth-card {
	max-width: 460px;
	max-height: none;
}
.geo-auth-icon {
	font-size: 44px;
	line-height: 1;
	color: var(--geo-accent);
	margin: 2px 0 14px;
}
.geo-auth-icon.is-ok   { color: #1a9e5f; }
.geo-auth-icon.is-warn { color: #d08b12; }
.geo-auth-icon.is-err  { color: #b42323; }
.geo-auth-msg {
	font-size: 14px;
	color: var(--geo-ink-soft);
	line-height: 1.55;
	margin: 0 0 6px;
}
.geo-auth-msg + .geo-auth-form { margin-top: 16px; }
.geo-auth-msg a { color: var(--geo-link); font-weight: 700; }
.geo-auth-msg a:hover { text-decoration: underline; }

/* ---------- station-list panel (reuses geo-map.css .geo-panel-*) ---------- */
.geo-auth .geo-auth-search {
	position: relative;
	margin-bottom: 4px;
}
.geo-auth .geo-auth-search .bi {
	position: absolute;
	left: 11px;
	top: 50%;
	transform: translateY(-50%);
	color: #98a6b5;
	font-size: 13px;
}
.geo-auth .geo-auth-search input {
	width: 100%;
	padding: 8px 10px 8px 32px;
	border: 1px solid #d4dde6;
	border-radius: 8px;
	font-size: 13px;
	font-family: inherit;
}
.geo-auth .geo-auth-search input:focus { outline: 2px solid rgba(40, 171, 227, .35); border-color: var(--geo-accent); }
.geo-auth .geo-auth-stlist { display: flex; flex-direction: column; }
.geo-auth .geo-auth-strow {
	display: block;
	padding: 8px 10px;
	font-size: 13px;
	font-family: var(--geo-font-mono);
	color: var(--geo-ink);
	border-bottom: 1px solid #f0f3f7;
	cursor: pointer;
}
.geo-auth .geo-auth-strow:hover { background: #f4f9fd; color: var(--geo-link); text-decoration: none; }
.geo-auth .geo-auth-stempty { text-align: center; color: #98a6b5; font-size: 12.5px; padding: 14px; font-style: italic; }

/* ---------- responsive: stack, fixed map height on mobile ---------- */
@media (max-width: 900px) {
	.geo-auth-split {
		grid-template-columns: 1fr;
		height: auto;
		gap: 16px;
	}
	.geo-auth-map { height: 340px; }        /* fixed map height on mobile */
	.geo-auth .geo-map-stage { height: 340px; min-height: 340px; }
	.geo-auth-formcol { align-items: stretch; }
	.geo-auth-card { max-height: none; }
}
