/**
 * Khalis SSO auth screens (login / register).
 *
 * Scoped to body.khalis-auth so nothing here touches the rest of the site.
 * Tokens follow the Sundar Gutka app, in both light and dark.
 *
 * The typeface is declared site-wide in the child style.css, which this
 * stylesheet depends on, so the faces are always already loaded here.
 *
 * Layout is a 50/50 split: a flat navy panel beside the form panel on
 * desktop, stacking to a single column below 900px.
 */

/* ------------------------------------------------------------ tokens */

body.khalis-auth {
	--khalis-ground: #edf1f7;
	--khalis-card: #ffffff;
	--khalis-aside: #0f3162;
	--khalis-aside-fg: #ffffff;
	--khalis-aside-muted: #8daad0;
	--khalis-aside-lede: #a8c4e2;
	--khalis-aside-chip: #2a5387;
	--khalis-aside-chip-fg: #c6daf2;
	--khalis-aside-faint: #7495bf;
	--khalis-accent: #123a6d;
	--khalis-accent-hover: #0b2e5e;
	--khalis-on-accent: #ffffff;
	--khalis-text: #1e3f66;
	--khalis-label: #3d6089;
	--khalis-muted: #6c88a8;
	--khalis-faint: #93a9c2;
	--khalis-border: #dce4ee;
	--khalis-rule: #e3e9f2;
	--khalis-field: #f4f7fa;
	--khalis-link: #2e6fb8;
	--khalis-link-hover: #1b4f8c;
	--khalis-danger: #a33a34;
	--khalis-danger-bg: #fdf1f0;
	--khalis-success: #2f7d5b;
	--khalis-success-bg: #eef7f2;
	--khalis-info: #2c5c8f;
	--khalis-info-bg: #eef3fa;
	--khalis-card-shadow: 0 2px 24px rgba(18, 58, 109, 0.08);
	--khalis-card-border: transparent;
	--khalis-focus: rgba(18, 58, 109, 0.18);

	/* Fixed light: the form panel must not be repainted by the OS theme. */
	color-scheme: light;

	background: var(--khalis-ground);
	color: var(--khalis-text);
	font-family: "Baloo Paaji 2", "Nirmala UI", "Gurmukhi MN", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* Dark is opt-in, not OS-driven: the split is a fixed navy/light design,
   so prefers-color-scheme must not repaint the form side. ?theme=dark
   stamps the attribute this hangs on. */
html[data-khalis-theme="dark"] body.khalis-auth {
	color-scheme: dark;
	--khalis-ground: #061529;
	--khalis-card: #0d2340;
	--khalis-aside: #08203c;
	--khalis-aside-fg: #e9eff7;
	--khalis-aside-muted: #7c99ba;
	--khalis-aside-lede: #9db8d8;
	--khalis-aside-chip: #23456e;
	--khalis-aside-chip-fg: #b6cde8;
	--khalis-aside-faint: #63809f;
	--khalis-accent: #1e62c9;
	--khalis-accent-hover: #2b72dc;
	--khalis-on-accent: #ffffff;
	--khalis-text: #e9eff7;
	--khalis-label: #a8c0dc;
	--khalis-muted: #8ca7c5;
	--khalis-faint: #6d89ab;
	--khalis-border: #22456f;
	--khalis-rule: #1c3a5e;
	--khalis-field: #102b4c;
	--khalis-link: #4a9eff;
	--khalis-link-hover: #7cb8ff;
	--khalis-danger: #ff9b93;
	--khalis-danger-bg: #2a1417;
	--khalis-success: #5fbf91;
	--khalis-success-bg: #102a20;
	--khalis-info: #8fbdf0;
	--khalis-info-bg: #0f2740;
	--khalis-card-shadow: none;
	--khalis-card-border: #1c3a5e;
	--khalis-focus: rgba(74, 158, 255, 0.28);
}

/* ------------------------------------------------------------- shell
 *
 * The parent theme floats .entry-header left at 36% and .entry-content
 * right at 58% inside a media query, and the child theme paints the
 * content area white at a higher specificity than a plain reset. Both
 * have to be beaten with !important to hold at every breakpoint.
 */

body.khalis-auth .site-content-contain {
	background: var(--khalis-ground);
}

body.khalis-auth .site-content-contain::after {
	content: none;
}

body.khalis-auth #primary .entry-header,
body.khalis-auth .entry-title,
body.khalis-auth .entry-footer,
body.khalis-auth .site-footer,
body.khalis-auth #masthead {
	display: none !important;
}

body.khalis-auth .site-content,
body.khalis-auth #content,
body.khalis-auth .wrap,
body.khalis-auth #primary,
body.khalis-auth .content-area,
body.khalis-auth .site-main,
body.khalis-auth article {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;
}

/* -------------------------------------------------------- the split */

body.khalis-auth #primary .entry-content {
	float: none !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
	background: none !important;

	display: flex;
	align-items: stretch;
	min-height: 100vh;
}

body.khalis-auth .khalis-auth-aside {
	flex: 1 1 50%;
	box-sizing: border-box;
	background: var(--khalis-aside);
	color: var(--khalis-aside-fg);
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 40px;
	padding: 76px 68px;
}

body.khalis-auth.khalis-auth-single #primary .entry-content {
	justify-content: center;
}

body.khalis-auth.khalis-auth-single .khalis-auth-main {
	flex: 1 1 100%;
	flex-direction: column;
	gap: 26px;
	padding: 56px 20px;
}

body.khalis-auth.khalis-auth-single .khalis-auth-brand {
	align-items: center;
}

body.khalis-auth.khalis-auth-single .khalis-auth-logo {
	width: 170px;
	filter: none;
}

body.khalis-auth.khalis-auth-single .khalis-auth-copyright {
	color: var(--khalis-muted);
	text-align: center;
}

body.khalis-auth .khalis-auth-main {
	flex: 1 1 50%;
	box-sizing: border-box;
	background: var(--khalis-ground);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 32px;
}

/* ------------------------------------------------------------ brand */

body.khalis-auth .khalis-auth-brand {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
}

/* Headline block takes the slack so it sits centred between the brand
   at the top and the seva line at the bottom. */
body.khalis-auth .khalis-auth-intro {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 22px;
}

body.khalis-auth .khalis-auth-headline {
	margin: 0;
	max-width: 460px;
	font-size: 44px;
	line-height: 52px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--khalis-aside-fg);
	text-wrap: pretty;
}

body.khalis-auth .khalis-auth-lede {
	margin: 0;
	max-width: 430px;
	font-size: 17px;
	line-height: 27px;
	color: var(--khalis-aside-lede);
	text-wrap: pretty;
}

body.khalis-auth ul.khalis-auth-apps {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 0;
	padding: 8px 0 0;
}

body.khalis-auth .khalis-auth-apps li {
	margin: 0;
	padding: 0;
	height: 36px;
	display: flex;
	align-items: center;
	padding: 0 16px;
	border: 1px solid var(--khalis-aside-chip);
	border-radius: 18px;
	font-size: 14px;
	font-weight: 600;
	color: var(--khalis-aside-chip-fg);
}

body.khalis-auth .khalis-auth-seva {
	margin: 0;
	font-size: 13px;
	color: var(--khalis-aside-faint);
}

/* The only wordmark in uploads is black with an orange swash, so on the
   navy panel it is knocked out to white. That loses the orange -- drop a
   reversed asset in via the khalis_auth_logo_url filter to keep it. */
body.khalis-auth .khalis-auth-logo {
	width: 210px;
	max-width: 100%;
	height: auto;
	display: block;
	filter: brightness(0) invert(1);
}

/* Real reversed artwork -- leave its colour alone. */
body.khalis-auth .khalis-auth-logo--light,
body.khalis-auth picture .khalis-auth-logo {
	filter: none;
}

body.khalis-auth .khalis-auth-brand picture {
	display: block;
}

body.khalis-auth .khalis-auth-foot {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

body.khalis-auth .khalis-auth-copyright {
	margin: 0;
	font-size: 13px;
	color: var(--khalis-aside-faint);
}

/* ------------------------------------------------------------ links
 *
 * twentyseventeen draws its link underline as
 * `.entry-content a { box-shadow: inset 0 -1px 0 rgba(15,15,15,1) }`,
 * thickened on hover -- a hard black bar, not text-decoration. It lands
 * on every anchor here, tab buttons included. Cleared once for the whole
 * auth area; the active tab re-asserts its own indicator below.
 */

body.khalis-auth .entry-content a,
body.khalis-auth .entry-content a:link,
body.khalis-auth .entry-content a:visited,
body.khalis-auth .entry-content a:hover,
body.khalis-auth .entry-content a:focus,
body.khalis-auth .entry-content a:active {
	box-shadow: none;
	text-decoration: none;
}

/* ------------------------------------------------------------- card */

body.khalis-auth .tml {
	width: 100%;
	max-width: 420px;
	box-sizing: border-box;
	background: var(--khalis-card);
	border: 1px solid var(--khalis-card-border);
	border-radius: 26px;
	box-shadow: var(--khalis-card-shadow);
	overflow: hidden;
}

body.khalis-auth .tml form {
	padding: 26px 28px 24px;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: start;
}

/* Every field spans the full width; the two exceptions below share a row. */
body.khalis-auth .tml form > * {
	grid-column: 1 / -1;
	min-width: 0;
}

body.khalis-auth .tml form > input[type="hidden"] {
	display: none;
}

body.khalis-auth .tml-rememberme-wrap {
	grid-column: 1;
	align-self: center;
}

body.khalis-auth .tml-khalis_forgot-wrap {
	grid-column: 2;
	justify-self: end;
	align-self: center;
	margin-top: 6px;
	font-size: 14px;
}

/* The heading line under the tabs. */
body.khalis-auth .khalis-auth-context {
	margin: 0;
	padding: 24px 28px 0;
	font-size: 15px;
	line-height: 21px;
	color: var(--khalis-muted);
}

body.khalis-auth .khalis-auth-context ~ form {
	padding-top: 20px;
}

/* Card heading on the password screens. */
body.khalis-auth .khalis-auth-head {
	padding: 30px 28px 0;
	display: flex;
	flex-direction: column;
	gap: 7px;
}

body.khalis-auth .khalis-auth-title {
	margin: 0;
	font-size: 26px;
	line-height: 32px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--khalis-text);
}

body.khalis-auth .khalis-auth-sub {
	margin: 0;
	font-size: 15px;
	line-height: 22px;
	color: var(--khalis-muted);
}

body.khalis-auth .khalis-auth-head ~ form {
	padding-top: 22px;
}

/* "Back to sign in" -- a secondary button, not a text link. */
body.khalis-auth a.khalis-auth-secondary {
	box-sizing: border-box;
	width: calc(100% - 56px);
	height: 52px;
	margin: 0 28px 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--khalis-border);
	border-radius: 26px;
	background: var(--khalis-card);
	color: var(--khalis-text);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

body.khalis-auth a.khalis-auth-secondary:hover,
body.khalis-auth a.khalis-auth-secondary:focus {
	border-color: var(--khalis-muted);
	background: var(--khalis-field);
	color: var(--khalis-text);
	text-decoration: none;
}

body.khalis-auth .tml-alerts:not(:empty) {
	padding: 0 28px;
}

body.khalis-auth .tml-alerts:empty {
	display: none;
}

body.khalis-auth .tml-alerts:not(:empty) + form {
	padding-top: 18px;
}

/* --------------------------------------------------------- dashboard
 *
 * The signed-in landing screen: same shortcode, `dashboard` action, its
 * own wrapper class rather than .tml. Rendered as the same card.
 */

body.khalis-auth .tml-dashboard {
	width: 100%;
	max-width: 420px;
	box-sizing: border-box;
	background: var(--khalis-card);
	border: 1px solid var(--khalis-card-border);
	border-radius: 26px;
	box-shadow: var(--khalis-card-shadow);
	padding: 34px 28px 28px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

body.khalis-auth .tml-dashboard-avatar {
	line-height: 0;
}

body.khalis-auth .tml-dashboard-avatar img {
	width: 76px;
	height: 76px;
	display: block;
	border-radius: 50%;
	background: var(--khalis-field);
}

body.khalis-auth .tml-dashboard-greeting {
	margin: 0;
	font-size: 22px;
	line-height: 28px;
	font-weight: 700;
	color: var(--khalis-text);
	text-align: center;
	text-wrap: pretty;
}

body.khalis-auth ul.tml-dashboard-links {
	list-style: none;
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
}

body.khalis-auth .tml-dashboard-links li {
	margin: 0;
	padding: 0;
}

body.khalis-auth .tml-dashboard-links a {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--khalis-border);
	border-radius: 26px;
	background: var(--khalis-card);
	color: var(--khalis-text);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

body.khalis-auth .tml-dashboard-links a:hover,
body.khalis-auth .tml-dashboard-links a:focus {
	border-color: var(--khalis-muted);
	background: var(--khalis-field);
	color: var(--khalis-text);
}

/* Log Out is always last, and is the one destructive-ish action here, so
   it is set apart rather than sitting in a row of identical buttons. */
body.khalis-auth .tml-dashboard-links li:last-child {
	margin-top: 6px;
	padding-top: 18px;
	border-top: 1px solid var(--khalis-rule);
}

body.khalis-auth .tml-dashboard-links li:last-child a {
	border-color: transparent;
	background: none;
	color: var(--khalis-link);
}

body.khalis-auth .tml-dashboard-links li:last-child a:hover,
body.khalis-auth .tml-dashboard-links li:last-child a:focus {
	background: var(--khalis-field);
	color: var(--khalis-link-hover);
}

/* ------------------------------------------------------------- tabs */

body.khalis-auth .khalis-auth-tabs {
	display: flex;
	border-bottom: 1px solid var(--khalis-rule);
}

body.khalis-auth .khalis-auth-tab {
	flex-grow: 1;
	min-height: 54px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 600;
	color: var(--khalis-faint);
	text-decoration: none;
	transition: color 0.15s ease;
}

body.khalis-auth .khalis-auth-tab:hover,
body.khalis-auth .khalis-auth-tab:focus {
	color: var(--khalis-muted);
}

body.khalis-auth .khalis-auth-tabs .khalis-auth-tab.is-active,
body.khalis-auth .khalis-auth-tabs .khalis-auth-tab.is-active:hover,
body.khalis-auth .khalis-auth-tabs .khalis-auth-tab.is-active:focus {
	font-weight: 700;
	color: var(--khalis-text);
	box-shadow: inset 0 -3px 0 var(--khalis-accent);
}

/* ----------------------------------------------------------- fields */

body.khalis-auth .tml-field-wrap {
	display: flex;
	flex-direction: column;
	gap: 7px;
	margin: 0;
}

body.khalis-auth .tml-social_providers-wrap {
	gap: 20px;
}

body.khalis-auth .tml-user_login-wrap,
body.khalis-auth .tml-rememberme-wrap {
	margin-top: 6px;
}

body.khalis-auth .tml-label {
	font-size: 13px;
	font-weight: 700;
	color: var(--khalis-label);
}

body.khalis-auth input[type="text"],
body.khalis-auth input[type="email"],
body.khalis-auth input[type="password"] {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 1px solid var(--khalis-border);
	border-radius: 14px;
	background: var(--khalis-field);
	color: var(--khalis-text);
	font-family: inherit;
	font-size: 15px;
	font-weight: 400;
	line-height: normal;
	letter-spacing: 0;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

body.khalis-auth input[type="text"]:focus,
body.khalis-auth input[type="email"]:focus,
body.khalis-auth input[type="password"]:focus {
	outline: none;
	border-color: var(--khalis-accent);
	box-shadow: 0 0 0 3px var(--khalis-focus);
}

body.khalis-auth input::placeholder {
	color: var(--khalis-faint);
	opacity: 1;
}

body.khalis-auth .tml-description {
	display: block;
	font-size: 13px;
	line-height: 19px;
	color: var(--khalis-muted);
}

body.khalis-auth .tml-rememberme-wrap {
	flex-direction: row;
	align-items: center;
	gap: 9px;
}

body.khalis-auth .tml-rememberme-wrap .tml-label {
	font-size: 14px;
	font-weight: 400;
	color: var(--khalis-muted);
}

body.khalis-auth input[type="checkbox"] {
	width: 19px;
	height: 19px;
	margin: 0;
	border: 1.5px solid var(--khalis-border);
	border-radius: 6px;
	background: var(--khalis-card);
	appearance: none;
	-webkit-appearance: none;
	cursor: pointer;
}

body.khalis-auth input[type="checkbox"]:checked {
	border-color: var(--khalis-accent);
	background-color: var(--khalis-accent);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 12.5 5 5 11-11'/%3E%3C/svg%3E");
	background-size: 13px 13px;
	background-position: center;
	background-repeat: no-repeat;
}

/* --------------------------------------------- password strength
 *
 * TML renders `<div id="pass-strength-result" class="hide-if-no-js">` with
 * the placeholder text "Strength indicator", styled by wp-admin CSS that
 * never loads on the front end -- so it sat there as a blank grid row.
 * `display: contents` on the wrapper means hiding the div removes the row
 * outright rather than leaving the gap.
 */

body.khalis-auth .tml-indicator-wrap {
	display: contents;
}

body.khalis-auth #pass-strength-result {
	grid-column: 1 / -1;
	display: none;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	opacity: 1;
	font-size: 12px;
	font-weight: 700;
	line-height: normal;
	text-align: right;
}

/* The track, filled proportionally by the class WordPress sets. */
body.khalis-auth #pass-strength-result::before {
	content: "";
	flex: 1 1 auto;
	height: 5px;
	border-radius: 3px;
	background: var(--khalis-rule);
}

/* WordPress swaps the class as you type; anything but these is noise. */
body.khalis-auth #pass-strength-result.short,
body.khalis-auth #pass-strength-result.bad,
body.khalis-auth #pass-strength-result.good,
body.khalis-auth #pass-strength-result.strong {
	display: flex;
}

body.khalis-auth #pass-strength-result.short::before {
	background: linear-gradient(to right, currentColor 25%, var(--khalis-rule) 25%);
}

body.khalis-auth #pass-strength-result.bad::before {
	background: linear-gradient(to right, currentColor 50%, var(--khalis-rule) 50%);
}

body.khalis-auth #pass-strength-result.good::before {
	background: linear-gradient(to right, currentColor 75%, var(--khalis-rule) 75%);
}

body.khalis-auth #pass-strength-result.strong::before {
	background: currentColor;
}

body.khalis-auth #pass-strength-result.short {
	color: var(--khalis-danger);
}

body.khalis-auth #pass-strength-result.bad {
	color: #8a5a12;
}

body.khalis-auth #pass-strength-result.good {
	color: var(--khalis-link);
}

body.khalis-auth #pass-strength-result.strong {
	color: #2f7d5b;
}

/* The password hint inherits entry-content body copy at 17px otherwise. */
body.khalis-auth .indicator-hint,
body.khalis-auth p.description,
body.khalis-auth #reg_passmail {
	margin: 0;
	font-size: 13px;
	line-height: 19px;
	color: var(--khalis-muted);
}

/* reCAPTCHA is a fixed 304px iframe; keep it from being stretched. */
body.khalis-auth .g-recaptcha,
body.khalis-auth .g-recaptcha > div {
	max-width: 100%;
}

body.khalis-auth .g-recaptcha iframe {
	max-width: 100%;
}

/* Requirements list on the reset screen. Neutral markers, not ticks: the
   strength script does not report per-rule state, so a tick would be a
   claim the page cannot actually make. */

body.khalis-auth ul.khalis-auth-rules {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 9px;
	margin: 0;
	padding: 0;
}

body.khalis-auth .khalis-auth-rules li {
	display: flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	font-size: 13px;
	line-height: 18px;
	color: var(--khalis-muted);
}

body.khalis-auth .khalis-auth-rules li::before {
	content: "";
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	border: 1.5px solid var(--khalis-border);
	border-radius: 50%;
}

/* Reveal toggle, wrapped around the input by assets/js/auth.js. */

body.khalis-auth .khalis-auth-password {
	position: relative;
	display: flex;
	align-items: center;
}

body.khalis-auth .khalis-auth-password input[type="password"],
body.khalis-auth .khalis-auth-password input[type="text"] {
	padding-right: 52px;
}

/* Theme My Login 7.3+ adds its own eye button (.tml-toggle-pwd), and Edge
   draws one inside password fields. Ours (assets/js/auth.js) replaces both;
   the script removes TML's button, and this is the fallback. !important
   because TML's stylesheet sets display: block !important on it. */
body.khalis-auth .khalis-auth-password ~ .tml-toggle-pwd,
body.khalis-auth .tml-pwd:has(.khalis-auth-password) .tml-toggle-pwd {
	display: none !important;
}

body.khalis-auth .khalis-auth-password input::-ms-reveal,
body.khalis-auth .khalis-auth-password input::-ms-clear {
	display: none;
}

body.khalis-auth button.khalis-auth-reveal {
	position: absolute;
	right: 6px;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: none;
	color: var(--khalis-faint);
	cursor: pointer;
}

body.khalis-auth button.khalis-auth-reveal:hover,
body.khalis-auth button.khalis-auth-reveal:focus {
	background: none;
	color: var(--khalis-muted);
}

body.khalis-auth .khalis-auth-note {
	margin: 0;
	font-size: 13px;
	line-height: 19px;
	color: var(--khalis-muted);
	text-align: center;
}

/* ---------------------------------------------------------- buttons */

body.khalis-auth .tml button[type="submit"],
body.khalis-auth .tml input[type="submit"] {
	width: 100%;
	height: 52px;
	margin-top: 6px;
	padding: 0 24px;
	border: 0;
	border-radius: 26px;
	background: var(--khalis-accent);
	color: var(--khalis-on-accent);
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

body.khalis-auth .tml button[type="submit"]:hover,
body.khalis-auth .tml button[type="submit"]:focus,
body.khalis-auth .tml input[type="submit"]:hover,
body.khalis-auth .tml input[type="submit"]:focus {
	background: var(--khalis-accent-hover);
	color: var(--khalis-on-accent);
}

/* --------------------------------------------------- social buttons
 *
 * tml-social styles its button as
 * `.tml-social-providers a.tml-social-provider:link` -- the pseudo-class
 * counts as a class, so it scores (0,3,1) and its display:block with
 * table-cell children wins over a plainer selector. Matched here at
 * (0,4,2). It also caps the form wrapper at 320px.
 */

/* The plugin caps .tml-login/.tml-register at 320px; the card rule above
   already outscores that, so only the provider list needs releasing.
   Listing the wrappers here too would cancel the card's own max-width. */
body.khalis-auth .tml-social-providers {
	max-width: none;
}

body.khalis-auth .tml-social-providers {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin: 0;
	padding: 0;
}

body.khalis-auth ul.tml-social-providers li {
	margin: 0;
	padding: 0;
}

body.khalis-auth .tml-social-providers a.tml-social-provider:link,
body.khalis-auth .tml-social-providers a.tml-social-provider:visited {
	box-sizing: border-box;
	width: 100%;
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 0 20px;
	border: 1px solid var(--khalis-border);
	border-radius: 26px;
	background: var(--khalis-card);
	color: var(--khalis-text);
	font-size: 15px;
	font-weight: 600;
	line-height: normal;
	text-align: center;
	text-decoration: none;
	box-shadow: none;
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

body.khalis-auth .tml-social-providers a.tml-social-provider:hover,
body.khalis-auth .tml-social-providers a.tml-social-provider:focus {
	border-color: var(--khalis-muted);
	background: var(--khalis-field);
}

body.khalis-auth .tml-social-provider .tml-social-provider-icon {
	display: flex;
	align-items: center;
	width: auto;
	border-right: 0;
	text-align: inherit;
	vertical-align: baseline;
}

body.khalis-auth .tml-social-provider .tml-social-provider-icon img {
	width: 20px;
	height: 20px;
	display: block;
}

body.khalis-auth .tml-social-provider .tml-social-provider-text {
	display: block;
	padding-left: 0;
	line-height: normal;
}

body.khalis-auth .tml-social-provider::after {
	content: none;
}

body.khalis-auth p.tml-social-providers-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--khalis-faint);
}

/* The plugin draws this as one absolutely-positioned full-width rule
   behind a 2em circular badge. Both halves have to be undone: the
   pseudo-element returned to the flow so it can be a flex item, and the
   badge flattened back to plain text. */
body.khalis-auth p.tml-social-providers-divider::before,
body.khalis-auth p.tml-social-providers-divider::after {
	content: "";
	position: static;
	top: auto;
	left: auto;
	right: auto;
	flex: 1 1 0;
	width: auto;
	min-width: 20px;
	height: 1px;
	background: var(--khalis-rule);
}

body.khalis-auth p.tml-social-providers-divider span {
	position: static;
	display: inline;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	line-height: normal;
	text-align: inherit;
}

/* ------------------------------------------------------------ links */

body.khalis-auth .tml-links {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px 18px;
	margin: 0;
	padding: 18px 28px 24px;
	border-top: 1px solid var(--khalis-rule);
}

body.khalis-auth .tml-links:empty {
	display: none;
}

body.khalis-auth .tml-links li {
	margin: 0;
	font-size: 14px;
}

body.khalis-auth .tml a,
body.khalis-auth .tml-links a {
	color: var(--khalis-link);
	font-weight: 600;
	text-decoration: none;
}

body.khalis-auth .tml a:hover,
body.khalis-auth .tml a:focus,
body.khalis-auth .tml-links a:hover,
body.khalis-auth .tml-links a:focus {
	color: var(--khalis-link-hover);
	text-decoration: none;
}

/* The tabs switch login <-> register and the password link now sits beside
   Remember me, so the whole link row is redundant on those two screens.
   On the password screens it is replaced by the secondary button. */
body.khalis-auth .tml-login .tml-links,
body.khalis-auth .tml-register .tml-links,
body.khalis-auth .tml-lostpassword .tml-links,
body.khalis-auth .tml-resetpass .tml-links {
	display: none;
}

/* ----------------------------------------------------------- alerts */

/* The plugin draws every alert as `border-left: 4px solid #00a0d2` plus a
   box-shadow, at `.tml .tml-message` (0,2,0). Matched at (0,3,1) and
   replaced with a tinted block, which is the card's own vocabulary. The
   list is the container; each item is its own alert. */

body.khalis-auth .tml .tml-errors,
body.khalis-auth .tml .tml-messages {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 22px 0 0;
	padding: 0;
	background: none;
}

body.khalis-auth .tml li.tml-error,
body.khalis-auth .tml li.tml-message,
body.khalis-auth .tml li.tml-success {
	display: block;
	margin: 0;
	padding: 13px 16px;
	border: 0;
	border-radius: 14px;
	box-shadow: none;
	font-size: 14px;
	line-height: 20px;
	font-weight: 600;
	background: var(--khalis-info-bg);
	color: var(--khalis-info);
}

body.khalis-auth .tml li.tml-error {
	background: var(--khalis-danger-bg);
	color: var(--khalis-danger);
}

body.khalis-auth .tml li.tml-success {
	background: var(--khalis-success-bg);
	color: var(--khalis-success);
}

body.khalis-auth .tml li.tml-error strong,
body.khalis-auth .tml li.tml-message strong {
	font-weight: 700;
}

/* The same class is reused as an inline field error, which is not a block. */
body.khalis-auth .tml span.tml-error {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
	font-size: 13px;
	font-weight: 600;
	color: var(--khalis-danger);
}

/* ------------------------------------------------------- responsive
 *
 * Below 900px the navy panel stops being a column and becomes a short
 * brand band above the card, which is the phone layout.
 */

/* On the split, the panel is fixed and the form side takes the scroll --
   register is tall enough to overflow, and the panel scrolling away with
   it looks broken. `margin: auto` on the card rather than align-items,
   because centring a flex item taller than its container clips the top
   out of reach; auto margins collapse to zero instead. */
@media (min-width: 901px) {
	body.khalis-auth.khalis-auth-split {
		overflow: hidden;
	}

	body.khalis-auth.khalis-auth-split #primary .entry-content {
		height: 100vh;
		overflow: hidden;
	}

	body.khalis-auth.khalis-auth-split .khalis-auth-aside {
		overflow: hidden;
	}

	body.khalis-auth.khalis-auth-split .khalis-auth-main {
		align-items: flex-start;
		overflow-y: auto;
		overscroll-behavior: contain;
	}

	body.khalis-auth.khalis-auth-split .khalis-auth-main > * {
		margin: auto;
	}
}

@media (max-width: 900px) {
	body.khalis-auth #primary .entry-content {
		flex-direction: column;
		min-height: 100vh;
	}

	body.khalis-auth .khalis-auth-aside {
		flex: 0 0 auto;
		align-items: center;
		gap: 0;
		background: var(--khalis-ground);
		padding: 48px 20px 4px;
	}

	body.khalis-auth .khalis-auth-brand {
		align-items: center;
	}

	/* The panel copy belongs to the desktop split; stacked, it would
	   push the form below the fold. */
	body.khalis-auth .khalis-auth-intro,
	body.khalis-auth .khalis-auth-foot {
		display: none;
	}

	/* Intro copy written into the WordPress page alongside the shortcode.
	   On a phone it pushes the form down before anything useful is
	   visible, so it is desktop-only. Both placements are covered because
	   the paragraph can sit inside the wrapper or outside it, depending on
	   where it falls in the page content. The theme's own paragraphs are
	   excluded by class. */
	body.khalis-auth #primary .entry-content > p,
	body.khalis-auth .khalis-auth-main > p:not(.khalis-auth-note):not(.khalis-auth-copyright) {
		display: none;
	}

	body.khalis-auth .khalis-auth-logo,
	body.khalis-auth .khalis-auth-logo--light {
		width: 160px;
		filter: none;
	}

	body.khalis-auth .khalis-auth-main {
		flex: 1 1 auto;
		align-items: flex-start;
		padding: 24px 20px 48px;
	}
}

@media (max-width: 420px) {
	body.khalis-auth .tml {
		border-radius: 22px;
	}

	body.khalis-auth .tml form {
		padding: 24px 20px 22px;
	}

	body.khalis-auth .tml-alerts:not(:empty),
	body.khalis-auth .tml-links {
		padding-left: 20px;
		padding-right: 20px;
	}
}
