/* =========================================================
   CV2CU — LOGIN / SIGN-UP / RESET  ·  "Lagoon Dusk"  (4.5.0)
   wp-login.php doesn't load the theme's tokens, so values are hard-coded.
   Theme follows the site's toggle (login_head sets data-theme), falling back to the OS.

   NB: WordPress puts `wp-core-ui` on <body> itself, so the old selector
   `body.login .wp-core-ui .button-primary` never matched — that's why the
   buttons showed WordPress blue. Selectors below use `body.login.wp-core-ui`.
   ========================================================= */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --l-bg: #061D25; --l-card: rgba(12,44,55,0.94); --l-card-solid: #0C2C37;
  --l-text: #EAF8F4; --l-soft: #9DBBB8;
  --l-border: rgba(172,217,204,0.22); --l-border-strong: rgba(172,217,204,0.42);
  --l-input: #0A2731; --l-brand: #5EE0C2; --l-action: #FF9C73; --l-on-brand: #042A25;
  --l-shadow: 0 24px 60px rgba(0,10,14,0.45);
  color-scheme: dark;
}
:root[data-theme="light"] {
  --l-bg: #F3FBF8; --l-card: rgba(255,255,255,0.96); --l-card-solid: #FFFFFF;
  --l-text: #0B3D4A; --l-soft: #4A6470;
  --l-border: rgba(11,61,74,0.16); --l-border-strong: rgba(11,61,74,0.34);
  --l-input: #FFFFFF; --l-brand: #0B7F6E; --l-action: #C4481A; --l-on-brand: #FFFFFF;
  --l-shadow: 0 24px 60px rgba(11,61,74,0.16);
  color-scheme: light;
}

html { background: var(--l-bg) !important; }
body.login {
  background: transparent !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--l-text);
  min-height: 100vh; min-height: 100dvh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
/* Backdrop lives on a fixed layer, so it always covers the whole screen — the old
   `background-attachment: fixed` on <body> stopped part-way down on phones. */
body.login::before {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60% 45% at 12% -8%,  rgba(94,224,194,0.18), transparent 70%),
    radial-gradient(50% 40% at 100% 8%,  rgba(110,198,255,0.14), transparent 70%),
    radial-gradient(55% 45% at 90% 105%, rgba(255,156,115,0.14), transparent 70%),
    var(--l-bg);
}

/* ---- Brand lockup ---- */
body.login #login h1 { margin: 0 0 1.25rem; }
body.login #login h1 a {
  background-image: none !important; width: auto; height: auto; text-indent: 0; margin: 0 auto;
  display: flex; align-items: center; justify-content: center; overflow: visible;
}
body.login .cv2cu-login-logo { display: flex; align-items: center; gap: 10px; }
body.login .cv2cu-login-logo svg { width: 34px; height: 34px; flex: none; }
body.login .cv2cu-login-logo__word { font-family: 'Sora', 'Inter', sans-serif; font-weight: 800; font-size: 1.9rem; letter-spacing: -0.03em; color: var(--l-text); }
body.login .cv2cu-login-logo__word b { color: var(--l-action); font-weight: 800; }
body.login .cv2cu-login-logo__word i { font-style: normal; font-weight: 600; font-size: 0.55em; color: var(--l-soft); margin-left: 1px; }

/* ---- Heading above the form ---- */
body.login .cv2cu-login-head { text-align: center; margin: 0 0 1.25rem; }
body.login #login h1.cv2cu-login-title { margin: 0 0 0.35rem; font-family: 'Sora','Inter',sans-serif; font-size: 1.55rem; font-weight: 700; letter-spacing: -0.02em; color: var(--l-text); }
body.login .cv2cu-login-sub { margin: 0; color: var(--l-soft); font-size: 0.93rem; line-height: 1.5; }

/* ---- Layout ---- */
body.login #login { width: 420px; max-width: 100%; padding: 7vh 0 0; margin: 0 auto; }
@media (max-width: 480px) { body.login #login { width: 100%; padding: 1.5rem 1rem 0; box-sizing: border-box; } }

/* Brand panel on wide screens */
.cv2cu-login-aside { display: none; }
@media (min-width: 1000px) {
  body.login { padding-left: min(46vw, 640px); }
  .cv2cu-login-aside {
    display: flex; position: fixed; inset: 0 auto 0 0; width: min(46vw, 640px); z-index: 1; color: #fff;
    background:
      radial-gradient(70% 50% at 10% 0%, rgba(94,224,194,0.28), transparent 65%),
      radial-gradient(60% 50% at 100% 100%, rgba(255,156,115,0.26), transparent 65%),
      linear-gradient(160deg, #0B3D4A, #072A35);
  }
  .cv2cu-login-aside__inner { margin: auto; padding: 3rem 3.5rem; max-width: 520px; }
  .cv2cu-login-aside__eyebrow { margin: 0 0 1rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: #8FE9D2; }
  .cv2cu-login-aside h2 { margin: 0 0 1.5rem; font-family: 'Sora','Inter',sans-serif; font-size: clamp(2rem, 3vw, 2.7rem); line-height: 1.1; letter-spacing: -0.03em; font-weight: 800; color: #fff; }
  .cv2cu-login-aside ul { list-style: none; margin: 0 0 2.25rem; padding: 0; display: grid; gap: 0.7rem; }
  .cv2cu-login-aside li { display: flex; align-items: center; gap: 0.6rem; font-size: 0.97rem; color: rgba(255,255,255,0.86); }
  .cv2cu-login-aside li svg { width: 18px; height: 18px; flex: none; fill: none; stroke: #5EE0C2; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
}
/* CSS-only CV sketch (generic placeholders, nothing personal) */
.cvm-lite { display: block; width: 210px; aspect-ratio: 210/297; background: #fff; border-radius: 6px; padding: 16px 16px; box-sizing: border-box; transform: rotate(-3deg); box-shadow: 0 30px 70px rgba(0,0,0,0.4); overflow: hidden; }
.cvm-lite i { display: block; height: 5px; margin: 6px 0; border-radius: 3px; background: #D5DDE0; }
.cvm-lite__head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.cvm-lite__head b { width: 28px; height: 28px; border-radius: 50%; background: #0B7F6E; flex: none; }
.cvm-lite__head span { flex: 1; } .cvm-lite__head i:first-child { background: #26363C; width: 70%; height: 7px; } .cvm-lite__head i:last-child { width: 45%; background: #0B7F6E; opacity: .6; }
.cvm-lite__body { display: grid; grid-template-columns: 32% 1fr; gap: 12px; }
.cvm-lite__side { background: #E6F3EF; border-radius: 4px; padding: 6px 7px; }
.cvm-lite__main i:nth-child(3n+1) { width: 45%; background: #0B7F6E; opacity: .85; margin-top: 12px; }

/* ---- Card ---- */
body.login #loginform, body.login #registerform, body.login #lostpasswordform, body.login #resetpassform {
  background: var(--l-card); border: 1px solid var(--l-border); border-radius: 20px;
  padding: 1.75rem 1.6rem 1.5rem; margin-top: 0; box-shadow: var(--l-shadow);
  backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
  position: relative; overflow: hidden;
}
body.login #loginform::before, body.login #registerform::before, body.login #lostpasswordform::before, body.login #resetpassform::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #5EE0C2, #6EC6FF, #FF9C73);
}
body.login label { color: var(--l-soft); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; }
body.login form p { margin-bottom: 1rem; }

/* ---- Fields ---- */
body.login input[type="text"], body.login input[type="password"], body.login input[type="email"], body.login input[type="tel"], body.login input[type="number"] {
  background: var(--l-input); border: 1px solid var(--l-border-strong); border-radius: 12px; color: var(--l-text);
  font: 500 1rem 'Inter', sans-serif; padding: 0 14px; min-height: 48px; margin: 0.35rem 0 0; box-shadow: none;
  transition: border-color .25s, box-shadow .25s;
}
body.login input[type="text"]:focus, body.login input[type="password"]:focus, body.login input[type="email"]:focus {
  border-color: var(--l-brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--l-brand) 28%, transparent); outline: none;
}
/* Browser autofill was painting fields pale blue with black text */
body.login input:-webkit-autofill, body.login input:-webkit-autofill:hover, body.login input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--l-text); caret-color: var(--l-text);
  -webkit-box-shadow: 0 0 0 1000px var(--l-input) inset; box-shadow: 0 0 0 1000px var(--l-input) inset; transition: background-color 9999s;
}
body.login .wp-pwd { position: relative; }
body.login .wp-pwd input[type="password"], body.login .wp-pwd input[type="text"] { padding-right: 48px; }
body.login .wp-hide-pw, body.login.wp-core-ui .button.wp-hide-pw {
  background: transparent !important; border: 0 !important; color: var(--l-soft) !important; box-shadow: none !important;
  min-width: 44px; min-height: 44px; height: 48px; top: 0.35rem; border-radius: 12px; width: auto;
}
body.login .wp-hide-pw:hover { color: var(--l-brand) !important; }
body.login .wp-hide-pw .dashicons { color: inherit; }

/* Remember me — themed checkbox */
body.login .forgetmenot { display: flex; align-items: center; gap: 0.6rem; float: none; margin: 0.25rem 0 1.1rem; }
body.login .forgetmenot label { display: inline; margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.9rem; font-weight: 500; color: var(--l-soft); }
body.login input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; flex: none; margin: 0; width: 22px; height: 22px; border-radius: 7px;
  background: var(--l-input); border: 1.5px solid var(--l-border-strong); box-shadow: none; display: inline-grid; place-content: center; cursor: pointer;
}
body.login input[type="checkbox"]::before { content: ''; width: 12px; height: 12px; transform: scale(0); transition: transform .15s; background: var(--l-on-brand);
  clip-path: polygon(14% 52%, 0 66%, 38% 100%, 100% 22%, 85% 8%, 38% 72%); }
body.login input[type="checkbox"]:checked { background: var(--l-brand); border-color: var(--l-brand); }
body.login input[type="checkbox"]:checked::before { transform: scale(1); }
body.login input[type="checkbox"]:focus-visible { outline: 2px solid var(--l-brand); outline-offset: 2px; }

/* ---- Buttons ---- */
body.login p.submit { float: none; margin: 0; }
body.login.wp-core-ui .button-primary, body.login.wp-core-ui #wp-submit {
  float: none; width: 100%; background: linear-gradient(135deg, #FFB48A, #FF9C73 48%, #FF8A5C); border: 0; color: #2B1206;
  font: 700 1rem 'Inter', sans-serif; border-radius: 999px; min-height: 50px; padding: 0 24px; text-shadow: none; text-transform: none;
  box-shadow: 0 8px 24px rgba(255,156,115,0.32); transition: transform .25s, box-shadow .25s;
}
body.login.wp-core-ui .button-primary:hover, body.login.wp-core-ui .button-primary:focus { color: #2B1206; transform: translateY(-1px); box-shadow: 0 12px 30px rgba(255,156,115,0.45); background: linear-gradient(135deg, #FFB48A, #FF9C73 48%, #FF8A5C); }
body.login.wp-core-ui .button-primary:focus-visible { outline: 2px solid var(--l-brand); outline-offset: 3px; }
/* Secondary actions (e.g. "Send me the login link", language "Change") = quiet outline pills */
body.login.wp-core-ui .cv2cu-alt, body.login.wp-core-ui .language-switcher .button {
  float: none; display: block; width: 100%; background: transparent !important; color: var(--l-brand) !important;
  border: 1.5px solid var(--l-border-strong) !important; border-radius: 999px; min-height: 48px; padding: 0 22px;
  font: 700 0.95rem 'Inter', sans-serif; text-shadow: none; box-shadow: none !important; cursor: pointer; transition: border-color .25s, background .25s;
}
body.login.wp-core-ui .cv2cu-alt:hover, body.login.wp-core-ui .cv2cu-alt:focus, body.login.wp-core-ui .language-switcher .button:hover {
  border-color: var(--l-brand) !important; background: color-mix(in srgb, var(--l-brand) 10%, transparent) !important; color: var(--l-brand) !important; transform: none;
}
body.login.wp-core-ui .cv2cu-alt:focus-visible, body.login.wp-core-ui .language-switcher .button:focus-visible { outline: 2px solid var(--l-brand); outline-offset: 3px; }

/* "or" divider — was a white box with grey text */
body.login .cv2cu-or-wrap { display: flex; align-items: center; gap: 0.9rem; margin: 1.1rem 0; color: var(--l-soft); border: 0 !important; text-align: center; background: none !important; }
body.login .cv2cu-or-wrap::before, body.login .cv2cu-or-wrap::after { content: ''; flex: 1; height: 1px; background: var(--l-border) !important; border: 0 !important; position: static; }
body.login .cv2cu-or {
  background: transparent !important; color: var(--l-soft) !important; padding: 0 !important; margin: 0 !important; border: 0 !important;
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; position: static; width: auto; transform: none;
}
body.login .cv2cu-or-wrap > hr, body.login .cv2cu-or-wrap > div:empty { display: none; }

/* "New here?" / "Already have an account?" */
body.login .cv2cu-login-alt { text-align: center; margin: 1.4rem 0 0; font-size: 0.93rem; color: var(--l-soft); }
body.login .cv2cu-login-alt a { color: var(--l-brand); font-weight: 700; text-decoration: none; margin-left: 0.25rem; }
body.login .cv2cu-login-alt a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Links ---- */
body.login #nav, body.login #backtoblog { text-align: center; margin: 1rem 0 0; padding: 0; font-size: 0.86rem; color: var(--l-soft); }
body.login #nav a, body.login #backtoblog a, body.login .privacy-policy-page-link a, body.login a.privacy-policy-link {
  color: var(--l-soft) !important; font-size: 0.86rem; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--l-border-strong); transition: color .2s;
}
body.login #nav a:hover, body.login #backtoblog a:hover, body.login .privacy-policy-page-link a:hover { color: var(--l-brand) !important; }
body.login .privacy-policy-page-link { text-align: center; margin: 1rem 0 0 !important; width: 100%; }
body.login #backtoblog a { text-decoration: none; }

/* ---- Notices ---- */
body.login #login_error, body.login .message, body.login .success, body.login .notice {
  background: var(--l-card-solid); border: 1px solid var(--l-border); border-left: 4px solid #FF7A8A; border-radius: 12px;
  color: var(--l-text); font-size: 0.9rem; line-height: 1.5; padding: 12px 16px; margin: 0 0 1.1rem; box-shadow: none;
}
body.login .message, body.login .success { border-left-color: var(--l-brand); }
body.login #login_error a, body.login .message a { color: var(--l-brand); }

/* ---- TFA / OTP fields (AIOS owns the security check) ---- */
body.login input[name*=otp i], body.login input[name*=tfa i], body.login input[id*=otp i], body.login input[id*=tfa i] {
  letter-spacing: .28em; text-align: center; font-variant-numeric: tabular-nums;
  font-size: 1.25rem; font-weight: 700; min-height: 54px;
}
body.login input[name*=otp i]:focus, body.login input[name*=tfa i]:focus, body.login input[id*=otp i]:focus, body.login input[id*=tfa i]:focus {
  border-color: var(--l-action); box-shadow: 0 0 0 3px color-mix(in srgb, var(--l-action) 24%, transparent);
}
body.login .cv2cu-tfa-help { margin: .65rem 0 0; color: var(--l-soft); font-size: .84rem; line-height: 1.5; }

/* ---- Password strength (register / reset) ---- */
body.login #pass-strength-result { background: var(--l-input); border: 1px solid var(--l-border); border-radius: 10px; color: var(--l-soft); font-size: 0.82rem; margin: 0.6rem 0 0; padding: 8px 12px; opacity: 1; }
body.login #pass-strength-result.short, body.login #pass-strength-result.bad { background: rgba(255,122,138,0.16); border-color: rgba(255,122,138,0.5); color: var(--l-text); }
body.login #pass-strength-result.good { background: rgba(245,207,134,0.18); border-color: rgba(245,207,134,0.55); color: var(--l-text); }
body.login #pass-strength-result.strong { background: color-mix(in srgb, var(--l-brand) 18%, transparent); border-color: var(--l-brand); color: var(--l-text); }
body.login .indicator-hint, body.login p.description { color: var(--l-soft); font-size: 0.82rem; }

/* ---- Language switcher ---- */
body.login .language-switcher { margin: 1.75rem auto 0; padding: 0 1rem 2rem; max-width: 420px; box-sizing: border-box; }
body.login .language-switcher form { display: grid; gap: 0.7rem; text-align: center; }
body.login .language-switcher label { display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem; color: var(--l-soft); }
body.login .language-switcher label .dashicons { color: var(--l-soft); }
body.login .language-switcher select {
  background: var(--l-input); color: var(--l-text); border: 1px solid var(--l-border-strong); border-radius: 12px; min-height: 46px; padding: 0 12px; font: 500 0.95rem 'Inter', sans-serif; width: 100%;
}
body.login .language-switcher .button { min-height: 44px; }

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

/* =========================================================
   CV2CU 5.22 · AUTH SELECT / CONTROL ELEVATION
   Keep native semantics, give every dropdown the same platform surface.
   ========================================================= */
body.login select,
body.login .language-switcher select {
  appearance:none;
  -webkit-appearance:none;
  width:100%;
  min-height:48px;
  margin:.35rem 0 0;
  padding:0 44px 0 14px;
  border:1px solid var(--l-border-strong);
  border-radius:12px;
  background-color:var(--l-input);
  background-image:
    linear-gradient(45deg, transparent 50%, var(--l-soft) 50%),
    linear-gradient(135deg, var(--l-soft) 50%, transparent 50%);
  background-position:calc(100% - 19px) 21px,calc(100% - 13px) 21px;
  background-size:6px 6px,6px 6px;
  background-repeat:no-repeat;
  color:var(--l-text);
  font:500 .96rem 'Inter',sans-serif;
  box-shadow:inset 0 0 0 2px rgba(94,224,194,.025),0 6px 18px rgba(0,10,14,.06);
  cursor:pointer;
  transition:border-color .2s,box-shadow .2s,background-color .2s;
}
body.login select:hover,
body.login .language-switcher select:hover { border-color:var(--l-brand); }
body.login select:focus,
body.login .language-switcher select:focus {
  outline:none;
  border-color:var(--l-brand);
  box-shadow:0 0 0 3px color-mix(in srgb,var(--l-brand) 24%,transparent),0 8px 24px rgba(0,10,14,.08);
}
body.login select option { background:var(--l-card-solid); color:var(--l-text); }
body.login .language-switcher { width:min(100%,420px); margin:1rem auto 0; }
body.login .language-switcher select { margin:0; }
@media (max-width:480px) {
  body.login select,
  body.login .language-switcher select { min-height:50px; font-size:1rem; }
}
/* CV2CU email-verification notices are rendered on the public verification page. */


/* 5.96.1 — help/tooltip buttons stay small; login link text never orphans its arrow */
body.login .cv2cu-help, body.login.wp-core-ui .button.cv2cu-help {
  float: none; display: inline-grid; place-items: center; width: 34px; height: 34px; min-width: 34px; min-height: 34px; padding: 0 !important;
  border-radius: 50% !important; background: transparent !important; border: 1.5px solid var(--l-border-strong) !important;
  color: var(--l-brand) !important; box-shadow: none !important; font: 700 .9rem 'Inter', sans-serif; line-height: 1; cursor: pointer;
}
body.login .forgetmenot { flex-wrap: wrap; }
body.login .cv2cu-login-alt a { white-space: nowrap; display: inline-block; }
body.login .cv2cu-or-wrap > hr { display: none !important; }
