/* =====================================================================
   MathVision Student Registration: 2026 redesign (same look as the Enter Page)
   Loaded AFTER style.css and only overrides it. To roll back the look,
   remove the redesign.css <link> in views/default/header.php.

   Bump ?version= in header.php whenever this file changes.
   ===================================================================== */

/* Lexend (SIL Open Font License, see fonts/lexend/OFL.txt), self-hosted: no Google dependency */
@font-face {
	font-family: 'Lexend'; font-style: normal; font-weight: 400; font-display: swap;
	src: url('../fonts/lexend/lexend-400.woff') format('woff');
}
@font-face {
	font-family: 'Lexend'; font-style: normal; font-weight: 500; font-display: swap;
	src: url('../fonts/lexend/lexend-500.woff') format('woff');
}
@font-face {
	font-family: 'Lexend'; font-style: normal; font-weight: 600; font-display: swap;
	src: url('../fonts/lexend/lexend-600.woff') format('woff');
}
@font-face {
	font-family: 'Lexend'; font-style: normal; font-weight: 700; font-display: swap;
	src: url('../fonts/lexend/lexend-700.woff') format('woff');
}

:root {
	--mv-blue: #244ea1;      /* MathVision brand blue */
	--mv-blue-dark: #1a3c80;
	--mv-navy: #13264f;      /* header bar */
	--mv-blue-tint: #eaf0fb;
	--mv-orange: #f24800;    /* logo orange: small accents only */
	--ink: #1c2745;
	--ink-muted: #5d6b8a;
	--line: #d3dcec;
	--field-line: #8193b8;   /* outline of fields you type into */
	--paper: #f4f7fc;
	--grid: #e2e9f5;
	--ok: #13804f;
	--err: #b8322a;
	--radius-card: 18px;
	--radius-field: 10px;
	--font: 'Lexend', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
}

/* ---------- Page: squared exercise-book paper ---------- */
html body {
	background-color: var(--paper);
	background-image:
		linear-gradient(var(--grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--grid) 1px, transparent 1px);
	background-size: 24px 24px;
	background-position: -1px -1px;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.4;
	color: var(--ink);
}
html body input, html body select, html body textarea, html body button { font-family: var(--font); }

/* ---------- Layout: fixed header; one centred column ---------- */
html body #main { display: block; padding-top: 59px; } /* 56px header + 3px line */
html body #header-for-web {
	position: fixed; top: 0; left: 0; right: 0; z-index: 150;
	background: var(--mv-navy);
	border-bottom: 3px solid var(--mv-orange);
	height: 56px;
}
html body #header { height: 56px; padding: 8px 20px; width: 100%; max-width: 100%; }
/* logo mark only (the sprite's first 31px), as on the Enter Page */
html body #header .my-mv-logo { width: 31px; height: 40px; }
html body #container {
	display: block; float: none;
	width: 640px; max-width: calc(100% - 24px); margin: 0 auto;
	text-align: left;
}
/* help text first, then the form */
html body #content {
	display: flex; flex-direction: column;
	width: 100%; max-width: 100%; padding: 18px 0 48px; line-height: 1.4;
}
html body #sideintro { order: -1; }

/* The old site's menu bar along the bottom (links to the old mathvision.com.sg pages): hidden */
html body #footer { display: none; }

/* ---------- Help box: already registered? problems? ---------- */
html body #sideintro {
	float: none; width: 100%;
	margin: 0 0 16px;
	padding: 14px 18px;
	background: var(--mv-blue-tint);
	border-radius: 14px;
	color: #2b3f6b; font-size: 14px; line-height: 1.5; text-align: left;
}
html body #sideintro p { padding: 2px 0; margin: 0; }
html body #sideintro p:first-child { display: none; } /* logo image: the header already shows the logo */
html body #sideintro a { color: var(--mv-blue); font-weight: 600; text-decoration: underline; }

/* ---------- The form card ---------- */
html body #sidebar {
	float: none; width: 100%; max-width: 100%; margin: 0;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-card);
	padding: 22px 26px 26px;
	line-height: 1.4;
	box-shadow: 0 22px 44px -30px rgba(28, 39, 69, 0.45);
}
html body .sidebar_web {
	height: auto; padding: 0 0 12px; margin: 0;
	color: var(--ink); font-size: 24px; font-weight: 700; line-height: 1.25;
}
/* "fill this form once per child" note */
html body #register-box .desc {
	box-sizing: border-box;
	background: var(--mv-blue-tint);
	color: #2b3f6b;
	border-radius: 12px;
	padding: 12px 14px;
	font-size: 13.5px; line-height: 1.5;
}
html body #register-box .desc a { color: var(--mv-blue); font-weight: 600; text-decoration: underline; }

/* section headings: Student's Name, Student's Info, Parent's Email... */
html body .register-field-header {
	color: var(--ink); font-size: 17px; font-weight: 700;
	padding: 20px 0 2px; margin-top: 18px;
	border-top: 1px solid var(--line);
}
html body .register-field-header:first-of-type { border-top: none; margin-top: 4px; }
html body .clip-note, html body .extra-clip-note {
	color: var(--ink-muted); font-size: 13px; line-height: 1.45; padding: 0 0 6px;
}
html body .extra-clip-note { padding: 6px 0 0; }
html body .extra-clip-note b { color: var(--ink); }

/* ---------- Fields ---------- */
html body .idesc {
	padding: 14px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink-muted); line-height: 18px;
}
html body .idesc i { color: #8d97ad; font-weight: 400; font-style: normal; margin-left: 4px; }
html body .idesc i::before { content: "("; }
html body .idesc i::after { content: ")"; }
html body .irequired { color: var(--mv-orange); }
html body .register-field { width: 50%; padding: 0 8px 0 0; }
html body .register-field + .register-field { padding: 0 0 0 8px; }
html body .register-field-full { width: 100%; padding: 0; margin-bottom: 0; }

html body input[type="text"], html body input[type="password"], html body select, html body textarea {
	width: 100%; height: 46px; margin: 0;
	padding: 0 14px;
	border: 2px solid var(--field-line);
	border-radius: var(--radius-field);
	background: #fff;
	color: var(--ink);
	font-size: 16px;
	box-sizing: border-box;
	transition: border-color 120ms, box-shadow 120ms;
}
html body select {
	-webkit-appearance: none; -moz-appearance: none; appearance: none;
	padding-right: 34px; text-overflow: ellipsis;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23244ea1' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 12px center;
}
html body textarea { height: 120px; min-height: 0; padding: 10px 14px; line-height: 1.45; resize: vertical; margin-top: 8px; }
html body input[type="text"]:hover, html body select:hover, html body textarea:hover { border-color: #5f74a3; }
html body input:focus, html body select:focus, html body textarea:focus {
	outline: none; border-color: var(--mv-blue); box-shadow: 0 0 0 3px rgba(36, 78, 161, 0.18);
}
html body input::placeholder { color: #a7b1c6; }
html body .itextbox-error { border-color: var(--err); }
html body .itextbox-valid { border-color: #2e9e62; }
html body .ierror { color: var(--err); font-size: 13px; padding: 4px 0 0; }

/* Global school: country + school name under the School list */
html body #school_countries_box, html body #school_others_box { height: auto; padding-top: 8px; }

/* Birthday: day / month / year side by side */
html body .register-field-bday-2, html body .register-field-bday-4 { margin: 0; }
html body .register-field-bday-2 { width: 28%; margin-right: 3%; }
html body .register-field-bday-4 { width: 38%; }
html body .register-field-bday-2 select, html body .register-field-bday-4 select { width: 100%; padding: 0 28px 0 10px; background-position: right 10px center; }

/* ---------- Register button and messages ---------- */
html body #user_register {
	width: 100%; max-width: 100%; height: 54px; margin-top: 22px; padding: 0;
	line-height: 54px; text-align: center;
	background: var(--mv-blue); color: #fff;
	border-radius: 12px;
	font-size: 17px; font-weight: 600; cursor: pointer;
	box-shadow: 0 3px 0 var(--mv-blue-dark);
}
html body #user_register:hover { background: var(--mv-blue-dark); color: #fff; }
html body #user_register:active { box-shadow: none; transform: translateY(2px); }
html body a:focus-visible { outline: 3px solid var(--mv-orange); outline-offset: 2px; }
html body #user_register_ajax { padding-top: 18px; }

html body .register-error-message {
	margin: 12px 0 0; padding: 10px 14px;
	background: #fdeeec; color: var(--err); border: 1px solid #f2c0ba; border-radius: 10px;
	font-size: 14px; text-align: center;
}

/* after a successful registration the form is replaced by this message */
html body .register-ajax-box {
	padding: 4px 0 0;
	font-size: 15.5px; line-height: 1.55; color: var(--ink);
}
html body .register-ajax-box p { padding: 0; text-align: left; }
html body .register-ajax-box p::before {
	content: "\2713  Request received";
	display: block; margin: 0 0 12px; padding: 12px 16px;
	background: var(--ok); color: #fff; border-radius: 12px;
	font-size: 18px; font-weight: 600;
}
html body .register-ajax-box a { color: var(--mv-blue); font-weight: 600; text-decoration: underline; }

/* ---------- Phones ---------- */
@media only screen and (max-width: 640px) {
	html body #content { padding-top: 12px; }
	html body #sidebar { padding: 18px 16px 20px; border-radius: 14px; }
	html body .sidebar_web { font-size: 21px; }
	html body .register-field, html body .register-field + .register-field { float: none; width: 100%; padding: 0; }
	html body .register-field-bday-2, html body .register-field-bday-4 { float: left; }
}

@media (prefers-reduced-motion: reduce) {
	html body * { transition: none !important; }
}
