/**
 * Login / Join page styles — scoped entirely under .cob-login-page so
 * nothing here can leak into (or be leaked into by) the rest of the site.
 *
 * Markup: shortcodes/login_page.php  ([login_page])
 * Data:   includes/functions-login_page.php
 *
 * The registration/login <form> markup itself comes from the untouched
 * WooCommerce shortcodes ([wc-registration] / [wc-login]) — most of this
 * file re-styles their default classes (.woocommerce-form-row, .input-text,
 * etc.) rather than introducing new markup for them.
 */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700;800&display=swap');

/* ---------------------------------------------------------------------------
 * Design tokens (scoped)
 * ------------------------------------------------------------------------ */

.cob-login-page {
    margin-top: -2em !important;
	--clp-navy: #1F3864;
	--clp-navy-deep: #0f1e3d;
	--clp-teal: #0E7C7B;
	--clp-teal-bright: #00c9a7;
	--clp-pink: #E91E63;
	--clp-pink-light: #F06292;
	--clp-blue: #2196F3;
	--clp-paper: #F6F7FA;
	--clp-card: #ffffff;
	--clp-ink: #1a1f2e;
	--clp-muted: #6b7280;
	--clp-line: #e6e8ee;
	--clp-radius: 16px;
	--clp-shadow: 0 20px 50px -20px rgba(15, 30, 61, .25);

	all: initial;
	display: block;
	direction: rtl;
	text-align: right;
	font-family: 'Rubik', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
	background: var(--clp-paper);
	color: var(--clp-ink);
	font-size: 16px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.cob-login-page * {
	box-sizing: border-box;
	direction: inherit;
	font-family: inherit;
}

.cob-login-page a {
	color: inherit;
}

.cob-login-page button {
	font-family: inherit;
}

/* ---------------------------------------------------------------------------
 * Page shell (mobile-first: single column; two-column from 960px)
 *
 * No topbar of our own here — the page already sits inside the site's real
 * header/menu, so height is just "however tall the content needs to be"
 * (min-height gives the two-column desktop layout some breathing room
 * without assuming the real header's height).
 * ------------------------------------------------------------------------ */

.cob-login-page .clp-shell {
	display: flex;
	min-height: 70vh;
}

.cob-login-page .clp-visual {
	display: none;
}

.cob-login-page .clp-form-panel {
	flex: 1;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 8px 20px 60px;
}

@media (min-width: 960px) {
	.cob-login-page .clp-shell {
		min-height: 640px;
	}

	.cob-login-page .clp-visual {
		display: flex;
		flex: 1.35;
		order: 1;
		background: radial-gradient(120% 120% at 20% 10%, #24406f 0%, var(--clp-navy-deep) 60%);
		color: #fff;
		padding: 48px 56px 40px;
		position: relative;
		overflow: hidden;
		flex-direction: column;
		/* Anchor the copy near the top instead of vertically centering it, so
		   there isn't a tall block of empty blue background above it. */
		justify-content: flex-start;
	}

	.cob-login-page .clp-form-panel {
		order: 2;
		flex: 0.9;
		align-items: center;
		padding: 28px 48px 32px;
	}
}

/* ---------------------------------------------------------------------------
 * Visual panel (desktop only) — "Career GPS" route illustration
 * ------------------------------------------------------------------------ */

.cob-login-page .clp-visual-inner {
	max-width: 600px;
}

.cob-login-page .clp-eyebrow {
	font-size: 15px;
	font-weight: 600;
	letter-spacing: .04em;
	color: var(--clp-teal-bright);
	margin-bottom: 14px;
}

/* `color` is set explicitly rather than inherited from .clp-visual because the
   parent theme colours all <h2> headings, which outranks that inheritance. */
.cob-login-page .clp-visual-title {
	font-size: 40px;
	line-height: 1.25;
	font-weight: 700;
	color: #fff;
	margin: 0 0 16px;
}

.cob-login-page .clp-visual-sub {
	font-size: 18px;
	line-height: 1.65;
	color: #c7d0e6;
	margin: 0 0 34px;
}

.cob-login-page .clp-route {
	position: relative;
}

/* `right` keeps the dashed line centred under the dots — half the dot width
   minus half the line width. */
.cob-login-page .clp-route-line {
	position: absolute;
	right: 14px;
	top: 13px;
	bottom: 13px;
	width: 2px;
	background: repeating-linear-gradient(to bottom, rgba(0, 201, 167, .55) 0 6px, transparent 6px 12px);
}

.cob-login-page .clp-route-step {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 18px;
	padding-bottom: 28px;
}

.cob-login-page .clp-route-step:last-child {
	padding-bottom: 0;
}

.cob-login-page .clp-route-dot {
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: var(--clp-navy-deep);
	border: 2px solid var(--clp-teal-bright);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	z-index: 1;
}

.cob-login-page .clp-route-step.is-done .clp-route-dot {
	background: var(--clp-teal-bright);
}

.cob-login-page .clp-route-step.is-active .clp-route-dot {
	border-color: var(--clp-pink-light);
	background: var(--clp-navy-deep);
	box-shadow: 0 0 0 5px rgba(240, 98, 146, .22);
}

.cob-login-page .clp-route-step.is-active .clp-route-label b {
	color: var(--clp-pink-light);
}

.cob-login-page .clp-route-dot svg {
	width: 14px;
	height: 14px;
}

.cob-login-page .clp-route-label {
	padding-top: 3px;
	display: block;
}

.cob-login-page .clp-route-label b {
	display: block;
	font-size: 18px;
	font-weight: 600;
	line-height: 1.4;
}

.cob-login-page .clp-route-label span {
	font-size: 15px;
	line-height: 1.5;
	color: #a9b4cf;
}

/* ---------------------------------------------------------------------------
 * Card
 * ------------------------------------------------------------------------ */

.cob-login-page .clp-card {
	width: 100%;
	max-width: 380px;
	background: var(--clp-card);
	border-radius: var(--clp-radius);
	box-shadow: var(--clp-shadow);
	padding: 20px 22px 20px;
}

@media (max-width: 520px) {
	.cob-login-page .clp-card {
		box-shadow: none;
		padding: 26px 20px 26px;
		max-width: 440px;
	}

	/* Extra top padding clears the site's fixed/sticky mobile header, which
	   would otherwise overlap the top of the card (tabs get cut off). */
	.cob-login-page .clp-form-panel {
		padding-top: 76px;
	}
}

.cob-login-page .clp-notices:empty {
	display: none;
}

.cob-login-page .clp-notices .woocommerce-error,
.cob-login-page .clp-notices .woocommerce-message,
.cob-login-page .clp-notices .woocommerce-info {
	list-style: none;
	margin: 0 0 16px;
	padding: 12px 16px;
	border-radius: 10px;
	font-size: 13.5px;
	line-height: 1.6;
}

.cob-login-page .clp-notices .woocommerce-error {
	background: #fdeef1;
	color: #b1084c;
}

.cob-login-page .clp-notices .woocommerce-message,
.cob-login-page .clp-notices .woocommerce-info {
	background: #e6f7f5;
	color: #0a6b63;
}

.cob-login-page .clp-notices .woocommerce-error li,
.cob-login-page .clp-notices .woocommerce-message li,
.cob-login-page .clp-notices .woocommerce-info li {
	margin: 0;
}

.cob-login-page .clp-notices .woocommerce-error a,
.cob-login-page .clp-notices .woocommerce-message a {
	color: var(--clp-blue);
	font-weight: 600;
	text-decoration: underline;
}

/* ---------------------------------------------------------------------------
 * Segmented tabs
 * ------------------------------------------------------------------------ */

.cob-login-page .clp-tabs {
	display: flex;
	background: var(--clp-paper);
	border-radius: 12px;
	padding: 4px;
	margin-bottom: 16px;
	position: relative;
}

.cob-login-page .clp-tab {
	flex: 1;
	text-align: center;
	padding: 8px 0;
	border: none;
	background: transparent;
	font-size: 14px;
	font-weight: 600;
	color: var(--clp-muted);
	border-radius: 9px;
	cursor: pointer;
	position: relative;
	z-index: 1;
	transition: color .25s;
}

.cob-login-page .clp-tab.is-active {
	color: #fff;
}

.cob-login-page .clp-tab-indicator {
	position: absolute;
	top: 4px;
	bottom: 4px;
	width: calc(50% - 4px);
	background: #0f3d6c;
	border-radius: 9px;
	box-shadow: 0 3px 10px -3px rgba(15, 30, 61, .25);
	transition: transform .28s cubic-bezier(.4, 0, .2, 1);
}

.cob-login-page .clp-tabs[data-active="register"] .clp-tab-indicator {
	transform: translateX(0);
}

.cob-login-page .clp-tabs[data-active="login"] .clp-tab-indicator {
	transform: translateX(-100%);
}

/* ---------------------------------------------------------------------------
 * Panels
 * ------------------------------------------------------------------------ */

.cob-login-page .clp-panel[hidden] {
	display: none;
}

.cob-login-page .clp-title {
	font-size: 19px;
	margin: 0 0 4px;
	font-weight: 700;
	color: var(--clp-navy);
}

.cob-login-page .clp-sub {
	font-size: 14.5px;
	color: var(--clp-muted);
	margin: 0 0 14px;
	line-height: 1.6;
}

.cob-login-page .clp-divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 12px 0;
	font-size: 12.5px;
	color: var(--clp-muted);
}

.cob-login-page .clp-divider::before,
.cob-login-page .clp-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--clp-line);
}

/* ---------------------------------------------------------------------------
 * Google button — rendered by the untouched [google-login] shortcode.
 * Its exact markup comes from a third-party plugin, so styling stays broad
 * (button-ish elements + anchors) rather than targeting specific classes.
 * ------------------------------------------------------------------------ */

.cob-login-page .clp-google {
	margin-bottom: 4px;
}

.cob-login-page .clp-google a,
.cob-login-page .clp-google button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	padding: 9px 14px;
	border-radius: 9px;
	border: 1.5px solid var(--clp-line);
	background: #fff;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--clp-ink);
	text-decoration: none;
	cursor: pointer;
	transition: border-color .2s, background .2s;
}

.cob-login-page .clp-google a:hover,
.cob-login-page .clp-google button:hover {
	border-color: #c7cede;
	background: #fafbfc;
}

/* ---------------------------------------------------------------------------
 * WooCommerce forms — re-styled to match the new design without touching
 * the PHP templates that render them.
 * ------------------------------------------------------------------------ */

.cob-login-page .woocommerce-form-register,
.cob-login-page .woocommerce-form-login {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Label sits beside the field (fixed-width column) instead of above it;
   !important is required to outrank the narrow LTR layout set inline by
   wc-registration.php's own <style> block, without editing that file. */
.cob-login-page .woocommerce-form-register label:not(.cob-lp-terms),
.cob-login-page .woocommerce-form-login label:not(.woocommerce-form-login__rememberme) {
	flex: 0 0 88px !important;
	min-width: 88px !important;
	max-width: 88px !important;
	width: 88px;
	text-align: right !important;
	direction: rtl !important;
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: var(--clp-navy);
	margin-bottom: 0;
	line-height: 1.3;
}

.cob-login-page .woocommerce-form-register .form-row,
.cob-login-page .woocommerce-form-register .woocommerce-form-row,
.cob-login-page .woocommerce-form-login .form-row,
.cob-login-page .woocommerce-form-login .woocommerce-form-row {
	/* Row layout: label in a fixed-width column, field taking the rest of the
	   line. flex-wrap is what lets the password meter/hint (added below,
	   each forced to 100% width) fall onto their own line instead of being
	   squeezed beside the field. */
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	column-gap: 10px;
	row-gap: 4px;
	margin: 0;
	padding: 0;
	position: relative;
}

.cob-login-page .required {
	color: var(--clp-pink);
}

/* Fields built via woocommerce_form_field() (display_name, mobile) wrap the
   <input> inside <span class="woocommerce-input-wrapper">, unlike the
   hand-written email/password rows in wc-registration.php where the <input>
   is a direct child of the row. display:contents makes that wrapper
   layout-transparent so the <input> becomes the row's actual flex child and
   picks up the same flex:1 sizing below — keeping it on the same line as
   its label instead of wrapping underneath. */
.cob-login-page .woocommerce-form-register .woocommerce-input-wrapper,
.cob-login-page .woocommerce-form-login .woocommerce-input-wrapper {
	display: contents;
}

.cob-login-page .woocommerce-Input,
.cob-login-page .input-text {
	flex: 1 1 0%;
	min-width: 0;
	width: 100%;
	padding: 8px 5px;
	border-radius: 8px;
	border: 1.5px solid var(--clp-line);
	font-size: 14px;
	background: #fcfcfd;
	transition: border-color .2s, background .2s;
}

.cob-login-page .woocommerce-Input:focus,
.cob-login-page .input-text:focus {
	outline: none;
	border-color: var(--clp-teal);
	background: #fff;
}

.cob-login-page .woocommerce-Input.clp-invalid,
.cob-login-page .input-text.clp-invalid {
	border-color: #e33e3e;
}

.cob-login-page .clp-error {
	flex: 0 0 100%;
	width: 100%;
	color: #e33e3e;
	font-size: 12px;
}

.cob-login-page .clp-error:empty {
	display: none;
}

/* Register field order (name → email → mobile → password), independent of
   the actual DOM order the PHP template outputs. */
.cob-login-page .woocommerce-form-register .form-row:has(#display_name) {
	order: 1;
}

.cob-login-page .woocommerce-form-register .form-row:has(#reg_email) {
	order: 2;
}

.cob-login-page .woocommerce-form-register .form-row:has(#mobile) {
	order: 3;
}

.cob-login-page .woocommerce-form-register .form-row:has(#reg_password) {
	order: 4;
}

.cob-login-page .woocommerce-form-register .cob-lp-terms {
	order: 5;
}

.cob-login-page .woocommerce-form-register p.form-row:last-of-type {
	order: 6;
}

/* Password fields (register + login) */
.cob-login-page .clp-pw-wrap {
	position: relative;
	display: block;
	flex: 1 1 0%;
	min-width: 0;
}

.cob-login-page .clp-pw-wrap .woocommerce-Input {
	padding-inline-end: 34px;
}

.cob-login-page .clp-pw-toggle {
	position: absolute;
	left: 8px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--clp-muted);
	padding: 2px;
	line-height: 0;
}

.cob-login-page .clp-pw-meter {
	flex: 0 0 100%;
	width: 100%;
	height: 4px;
	border-radius: 2px;
	background: var(--clp-line);
	margin-top: 10px;
	overflow: hidden;
}

.cob-login-page .clp-pw-meter-fill {
	height: 100%;
	width: 0%;
	background: var(--clp-line);
	transition: width .25s, background .25s;
}

.cob-login-page .clp-pw-meter-fill[data-score="1"] {
	background: var(--clp-pink-light);
}

.cob-login-page .clp-pw-meter-fill[data-score="2"] {
	background: #FBBC05;
}

.cob-login-page .clp-pw-meter-fill[data-score="3"] {
	background: var(--clp-teal);
}

.cob-login-page .clp-pw-meter-fill[data-score="4"] {
	background: var(--clp-teal-bright);
}

.cob-login-page .clp-pw-hint {
	flex: 0 0 100%;
	width: 100%;
	font-size: 11.5px;
	color: var(--clp-muted);
	margin: 6px 0 0;
}

/* Terms checkbox (ours, added via woocommerce_register_form). It's a <label>
   inside .woocommerce-form-register, so it also gets caught by the narrow
   LTR label styling set inline by wc-registration.php's own <style> block
   (same !important-heavy rule the :not(.cob-lp-terms) selector above dodges
   for the other labels) — override it back here instead. */
.cob-login-page .cob-lp-terms {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: flex-start;
	min-width: 0 !important;
	max-width: none !important;
	width: 100%;
	text-align: right !important;
	direction: rtl !important;
	font-size: 12.5px;
	color: var(--clp-muted);
	line-height: 1.6;
	margin: 4px 0 0;
	cursor: pointer;
}

.cob-login-page .cob-lp-terms input {
	margin-top: 3px;
	accent-color: var(--clp-teal);
	flex-shrink: 0;
}

/* flex-basis: 0 (not auto) so the line-breaking step treats this item's
   hypothetical size as 0 instead of its full unwrapped sentence width —
   otherwise, since it doesn't fit next to the checkbox, flex-wrap on the
   parent pushes it onto its own line instead of just wrapping its text. */
.cob-login-page .cob-lp-terms span {
	flex: 1 1 0%;
	min-width: 0;
}

.cob-login-page .cob-lp-terms a {
	color: var(--clp-blue);
	text-decoration: none;
}

.cob-login-page .cob-lp-terms a:hover {
	text-decoration: underline;
}

/* Submit buttons */
.cob-login-page .woocommerce-form-register button[type="submit"],
.cob-login-page .woocommerce-form-login button[type="submit"],
.cob-login-page .woocommerce-form-register input[type="submit"],
.cob-login-page .woocommerce-form-login input[type="submit"] {
	min-width: 0 !important;
	max-width: 100% !important;
	width: 100%;
	padding: 10px 16px;
	border: none;
	border-radius: 9px;
	background: linear-gradient(135deg, var(--clp-pink) 0%, var(--clp-pink-light) 100%);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 24px -10px rgba(233, 30, 99, .55);
	transition: transform .15s, box-shadow .15s;
}

.cob-login-page .woocommerce-form-register button[type="submit"]:hover,
.cob-login-page .woocommerce-form-login button[type="submit"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px -10px rgba(233, 30, 99, .6);
}

/* Login: "remember me" row (checkbox + moved "lost password" link) */
.cob-login-page .woocommerce-form-login .clp-login-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	font-size: 13px;
}

/* The checkbox is the label's first child, so RTL is what puts it to the right
   of "זכור אותי". !important (and the width reset) is required to outrank the
   100px-wide LTR label styling that wc-registration.php's own <style> block
   applies to every .woocommerce-form-login label. */
.cob-login-page .woocommerce-form-login .clp-login-row label.woocommerce-form-login__rememberme {
	display: flex;
	align-items: center;
	gap: 8px;
	width: auto;
	min-width: 0 !important;
	max-width: none !important;
	direction: rtl !important;
	text-align: right !important;
	margin: 0;
	color: var(--clp-ink);
	font-weight: 400;
	font-size: 13px;
	cursor: pointer;
}

.cob-login-page .woocommerce-form-login .clp-login-row input[type="checkbox"] {
	width: 16px;
	height: 16px;
	accent-color: var(--clp-teal);
	margin: 0;
}

/* "שכחתם סיסמה?" — global/form-login.php marks it up as .lost_password, the
   my-account template as .woocommerce-LostPassword; match either. The
   inline-start auto margin absorbs the free space between it and the checkbox,
   so it lands on the far end of the row (its left edge, in RTL). */
.cob-login-page .woocommerce-form-login .lost_password,
.cob-login-page .woocommerce-form-login .woocommerce-LostPassword {
	margin: 0;
	margin-inline-start: auto;
	font-size: 13px;
}

.cob-login-page .woocommerce-form-login .lost_password a,
.cob-login-page .woocommerce-form-login .woocommerce-LostPassword a {
	color: var(--clp-blue);
	text-decoration: none;
	font-weight: 500;
}

.cob-login-page .woocommerce-form-login .lost_password a:hover,
.cob-login-page .woocommerce-form-login .woocommerce-LostPassword a:hover {
	text-decoration: underline;
}

.cob-login-page .woocommerce-form-login .clp-login-row button[type="submit"] {
	flex-basis: 100%;
	margin-top: 6px;
}

/* "עוד אין לכם חשבון? הרשמה" under the login button — the mirror image of the
   .already-registered-text line that wc-registration.php prints under its own
   form, styled to match it. */
.cob-login-page .clp-switch {
	margin: 20px 0 0;
	text-align: center;
	font-size: 13.5px;
	color: var(--clp-muted);
}

.cob-login-page .clp-switch a {
	color: var(--clp-pink);
	font-weight: 700;
	text-decoration: none;
}

.cob-login-page .clp-switch a:hover {
	text-decoration: underline;
}

/* "כבר רשום/ה? כניסה" text link rendered by wc-registration.php itself */
.cob-login-page .already-registered-text {
	text-align: center !important;
	font-size: 13.5px !important;
	font-weight: 400 !important;
	margin: 20px 0 0 !important;
	color: var(--clp-muted);
}

@media (max-width: 768px) {
    .cob-login-page .already-registered-text {
        margin-top: -30px !important;
    }
}

.cob-login-page .already-registered-text a {
	color: var(--clp-pink) !important;
	font-weight: 700 !important;
	text-decoration: none !important;
}

.cob-login-page .already-registered-text a:hover {
	text-decoration: underline !important;
}
