/**
 * My Account login / register — "Welcome back, adventurer".
 *
 * Design: claude.ai/design project 3107379d, "Account Login".
 * Template: woocommerce/myaccount/form-login.php
 *
 * Same palette as the trip pages (cream / pine / copper) so the login reads as
 * part of the site rather than a WooCommerce default.
 */

.tsa-login {
  --tsa-lg-cream: #f2ede2;
  --tsa-lg-card: #fff;
  --tsa-lg-pine: #123c3b;
  --tsa-lg-ink: #20302d;
  --tsa-lg-copper: #c77e22;
  --tsa-lg-amber: #e39a3b;
  --tsa-lg-gold: #e9b96a;
  --tsa-lg-line: rgba(18, 60, 59, 0.3);

  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: min(860px, calc(100vh - 120px));
  background: var(--tsa-lg-cream);
  color: var(--tsa-lg-ink);
  font-family: var(--tsa-font-body, "Figtree", sans-serif);
  text-align: left;
}

/* WooCommerce's block-theme stylesheet caps `.woocommerce-account main
   .woocommerce` at 1000px, left-aligned. Widening that wrapper is what makes
   the split full-bleed — a negative-margin breakout assumes a centred parent
   and threw the panel 220px off-screen. The body-scoped selector is one step
   more specific than Woo's, so it wins without !important. */
body.tsa-login-screen main .woocommerce,
body.tsa-login-screen .woocommerce {
  max-width: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

/* The design puts the login on one continuous cream surface, header included
   (with a hairline rule under it). Doing the same also absorbs the theme's
   header-height offset, which is a little taller than the header on mobile. */
body.tsa-login-page {
  background: #f2ede2;
}

body.tsa-login-page .tsa-chrome-root {
  background: #f2ede2;
  border-bottom: 1.5px solid rgba(18, 60, 59, 0.12);
}

/* The content wrapper's 32px top padding left a pale band between the header
   and the cream panel. Its margin-top stays — that is what clears the
   absolutely-positioned header. */
body.tsa-login-screen .entry-content.wp-block-post-content {
  padding-top: 0;
}

/* WooCommerce draws a card border around .login / .register forms. */
.tsa-login form.login,
.tsa-login form.register {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0;
  background: none;
}

/* Anything hooked into the login form (the site's reCAPTCHA widget) gets room
   without inheriting the field styling. */
.tsa-login .grecaptcha-badge,
.tsa-login .g-recaptcha {
  margin: 2px 0;
}

.tsa-login .g-recaptcha > div {
  max-width: 100%;
}

.tsa-login__pane {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 8vw;
  box-sizing: border-box;
}

.tsa-login__inner {
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
}

/* Panels ------------------------------------------------------------------ */

/* Without JS both panels show, so the register form is never unreachable.
   account-login.js sets data-tsa-ready and takes over from there. */
.tsa-login[data-tsa-ready] .tsa-login__panel--register,
.tsa-login[data-tsa-ready].is-registering .tsa-login__panel--signin {
  display: none;
}

.tsa-login[data-tsa-ready].is-registering .tsa-login__panel--register {
  display: block;
}

.tsa-login__panel + .tsa-login__panel {
  margin-top: 48px;
}

.tsa-login__eyebrow {
  display: block;
  font-family: var(--tsa-font-display, "Bricolage Grotesque", sans-serif);
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--tsa-lg-copper);
}

.tsa-login .tsa-login__title {
  font-family: var(--tsa-font-display, "Bricolage Grotesque", sans-serif);
  font-weight: 700;
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.04;
  margin: 14px 0 10px;
  color: var(--tsa-lg-pine);
}

.tsa-login__lede {
  font-size: 16px;
  line-height: 1.65;
  color: rgba(32, 48, 45, 0.75);
  margin: 0 0 32px;
}

/* Form -------------------------------------------------------------------- */

.tsa-login__form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tsa-login__field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 0;
}

.tsa-login__field label,
.tsa-login__labelrow label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--tsa-lg-pine);
  margin: 0;
}

.tsa-login__labelrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
}

.tsa-login__forgot {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--tsa-lg-copper);
  text-decoration: none;
}

.tsa-login__forgot:hover {
  color: var(--tsa-lg-pine);
  text-decoration: underline;
}

.tsa-login .input-text,
.tsa-login input[type="text"],
.tsa-login input[type="email"],
.tsa-login input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid var(--tsa-lg-line);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15.5px;
  font-family: inherit;
  background: var(--tsa-lg-card);
  color: var(--tsa-lg-ink);
  outline: none;
  transition: border-color 0.15s ease-out;
}

.tsa-login .input-text:focus,
.tsa-login input[type="text"]:focus,
.tsa-login input[type="email"]:focus,
.tsa-login input[type="password"]:focus {
  border-color: var(--tsa-lg-pine);
}

.tsa-login ::placeholder {
  color: rgba(32, 48, 45, 0.45);
}

.tsa-login__inputwrap {
  position: relative;
  display: block;
}

.tsa-login__inputwrap input {
  /* Room for our SHOW/HIDE plus Chrome's own reveal icon, which sits at the
     very edge and can't be hidden from CSS. */
  padding-right: 96px;
}

/* We supply our own SHOW/HIDE, so suppress the browser's built-in reveal where
   it can be suppressed — otherwise the two sit on top of each other. */
.tsa-login input[type="password"]::-ms-reveal,
.tsa-login input[type="password"]::-ms-clear,
.tsa-login input[type="password"]::-webkit-credentials-auto-fill-button {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

.tsa-login__reveal {
  position: absolute;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--tsa-lg-pine);
  font-family: inherit;
  padding: 8px;
}

.tsa-login__reveal:hover {
  color: var(--tsa-lg-copper);
}

.tsa-login__remember {
  margin: 0;
}

.tsa-login__remember label {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 14.5px;
  color: rgba(32, 48, 45, 0.8);
  cursor: pointer;
  margin: 0;
}

.tsa-login__remember input[type="checkbox"] {
  accent-color: var(--tsa-lg-pine);
  width: 16px;
  height: 16px;
  margin: 0;
}

.tsa-login__submitrow {
  margin: 4px 0 0;
}

.tsa-login .tsa-login__submit {
  width: 100%;
  background: var(--tsa-lg-pine);
  color: var(--tsa-lg-cream);
  border: none;
  border-radius: 999px;
  padding: 16px;
  font-family: var(--tsa-font-display, "Bricolage Grotesque", sans-serif);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.15s ease-out, color 0.15s ease-out;
}

.tsa-login .tsa-login__submit:hover {
  background: var(--tsa-lg-amber);
  color: var(--tsa-lg-pine);
}

.tsa-login__note {
  font-size: 14.5px;
  line-height: 1.6;
  color: rgba(32, 48, 45, 0.75);
  margin: 0;
}

.tsa-login__swap {
  text-align: center;
  font-size: 15px;
  color: rgba(32, 48, 45, 0.75);
  margin: 30px 0 0;
}

.tsa-login__swaplink {
  background: none;
  border: 0;
  padding: 0;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: var(--tsa-lg-copper);
  cursor: pointer;
  text-decoration: none;
}

.tsa-login__swaplink:hover {
  color: var(--tsa-lg-pine);
  text-decoration: underline;
}

/* WooCommerce notices ------------------------------------------------------ */

.tsa-login .woocommerce-notices-wrapper {
  margin-bottom: 18px;
}

/* WooCommerce 9+ renders account notices as block "notice banners"; the classic
   markup is still emitted by some extensions, so both are styled. */
.tsa-login .wc-block-components-notice-banner,
.tsa-login .woocommerce-error,
.tsa-login .woocommerce-message,
.tsa-login .woocommerce-info {
  list-style: none;
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
  background: rgba(199, 126, 34, 0.12);
  border: 1.5px solid rgba(199, 126, 34, 0.5);
  color: var(--tsa-lg-copper);
}

.tsa-login .wc-block-components-notice-banner.is-success,
.tsa-login .wc-block-components-notice-banner.is-info,
.tsa-login .woocommerce-message,
.tsa-login .woocommerce-info {
  background: rgba(18, 60, 59, 0.08);
  border-color: rgba(18, 60, 59, 0.35);
  color: var(--tsa-lg-pine);
}

/* The banner ships its own icon and flex layout — the design is text only. */
.tsa-login .wc-block-components-notice-banner > svg {
  display: none;
}

.tsa-login .wc-block-components-notice-banner__content {
  margin: 0;
  padding: 0;
  font-size: 14px;
  font-weight: 600;
}

.tsa-login .wc-block-components-notice-banner__content a {
  color: inherit;
  text-decoration: underline;
}

.tsa-login .woocommerce-error li,
.tsa-login .woocommerce-message li,
.tsa-login .woocommerce-info li {
  margin: 0;
}

.tsa-login .woocommerce-error a,
.tsa-login .woocommerce-message a,
.tsa-login .woocommerce-info a {
  color: inherit;
  text-decoration: underline;
}

/* Photo ------------------------------------------------------------------- */

.tsa-login__photo {
  position: relative;
  overflow: hidden;
}

.tsa-login__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tsa-login__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(200deg, rgba(18, 60, 59, 0) 40%, rgba(18, 60, 59, 0.75) 100%);
}

.tsa-login__quote {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: 40px;
  margin: 0;
  color: var(--tsa-lg-cream);
}

.tsa-login__quote blockquote {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  font-family: var(--tsa-font-display, "Bricolage Grotesque", sans-serif);
  font-weight: 700;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1.15;
}

.tsa-login__quote figcaption {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--tsa-lg-gold);
}

/* Lost password / set password — same surface and controls as the login, in a
   single centred column. ------------------------------------------------- */

body.tsa-login-page .woocommerce-ResetPassword,
body.tsa-login-page .lost_reset_password {
  max-width: 440px;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
  padding: 48px 24px 80px;
  border: 0;
  color: #20302d;
}

body.tsa-login-page .woocommerce-ResetPassword p {
  font-size: 16px;
  line-height: 1.65;
  width: 100%;
}

body.tsa-login-page .woocommerce-ResetPassword label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #123c3b;
  margin-bottom: 7px;
}

body.tsa-login-page .woocommerce-ResetPassword input.input-text {
  width: 100%;
  box-sizing: border-box;
  border: 1.5px solid rgba(18, 60, 59, 0.3);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 15.5px;
  font-family: inherit;
  background: #fff;
  outline: none;
}

body.tsa-login-page .woocommerce-ResetPassword input.input-text:focus {
  border-color: #123c3b;
}

body.tsa-login-page .woocommerce-ResetPassword button {
  width: 100%;
  border: 0;
  border-radius: 999px;
  padding: 16px;
  background: #123c3b;
  color: #f2ede2;
  font-family: var(--tsa-font-display, "Bricolage Grotesque", sans-serif);
  font-weight: 800;
  font-size: 17px;
  cursor: pointer;
}

body.tsa-login-page .woocommerce-ResetPassword button:hover {
  background: #e39a3b;
  color: #123c3b;
}

@media (max-width: 860px) {
  .tsa-login {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .tsa-login__photo {
    display: none;
  }

  .tsa-login__pane {
    padding: 40px 24px 60px;
  }
}
