/* =========================================================================
   BRITTLE ACCOUNT PAGES  —  Log in · Register · Lost password · Reset password
   Brittle palette and type scale. Many rules use !important on purpose: the
   Elementor kit and the theme style every input and button on the site with
   stronger selectors, and these forms must keep the Brittle look.
   ========================================================================= */

.ba {
  --ba-plum: #3B203D;
  --ba-coral: #E99A8A;
  --ba-coral-dark: #B4533F;
  --ba-cream: #F7F2E8;
  --ba-paper: #FFFDF9;
  --ba-muted: #756B73;
  --ba-line: rgba(59, 32, 61, 0.12);
  --ba-field-line: rgba(59, 32, 61, 0.2);
  --ba-coral-tint: #FBEAE6;
  --ba-error-bg: #FDECEA;
  --ba-error: #8A1C14;
  --ba-ok-bg: #EAF4EC;
  --ba-ok: #1F5130;

  max-width: 1000px;
  margin: 8px auto 48px;
  color: var(--ba-plum);
}

.ba *,
.ba *::before,
.ba *::after {
  box-sizing: border-box;
}


/* =========================================================================
   LAYOUT
   ========================================================================= */

/* two cards side by side */
.ba--two #customer_login {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
  margin: 0;
}

/* WooCommerce floats these at 48% width */
.ba #customer_login .u-column1,
.ba #customer_login .u-column2 {
  float: none !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
}

.ba #customer_login::before,
.ba #customer_login::after {
  display: none !important;
}

/* the cards */
.ba--two .u-column1,
.ba--two .u-column2,
.ba--one {
  padding: 32px 32px 28px !important;
  border: 1px solid var(--ba-line);
  border-radius: 24px;
  background: var(--ba-paper);
  box-shadow: 0 24px 48px -32px rgba(59, 32, 61, 0.28);
}

/* register card gets a soft coral wash so the two read as different choices */
.ba--two .u-column2 {
  background: linear-gradient(180deg, var(--ba-coral-tint) 0%, var(--ba-paper) 140px);
}

/* one card on its own (registration off, lost/reset password) */
.ba--one {
  max-width: 480px;
}

.ba form.login,
.ba form.register,
.ba form.lost_reset_password {
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}


/* =========================================================================
   TEXT
   ========================================================================= */

.ba h2 {
  margin: 0 0 4px !important;
  padding: 0 !important;
  color: var(--ba-plum) !important;
  font-family: inherit !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  line-height: 1.25 !important;
  letter-spacing: -0.01em;
  text-transform: none !important;
}

.ba .ba-sub {
  margin: 0 0 22px !important;
  color: var(--ba-muted);
  font-size: 14px;
  line-height: 1.5;
}

/* "A link to set a new password…", lost-password intro, privacy text */
.ba form > p:not(.form-row):not(.ba-sub):not(.woocommerce-LostPassword),
.ba .woocommerce-privacy-policy-text p {
  margin: 0 0 16px !important;
  color: var(--ba-muted) !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.ba .woocommerce-privacy-policy-text a,
.ba form > p a {
  color: var(--ba-plum) !important;
  text-decoration: underline !important;
  text-underline-offset: 2px;
}


/* =========================================================================
   FIELDS
   ========================================================================= */

.ba .form-row {
  display: block;
  float: none !important;
  width: 100% !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
}

.ba label {
  display: block;
  margin: 0 0 6px !important;
  color: var(--ba-plum) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
}

.ba label .required {
  color: var(--ba-coral-dark) !important;
  text-decoration: none !important;
  border: 0 !important;
}

.ba input.input-text,
.ba input[type="text"],
.ba input[type="email"],
.ba input[type="password"] {
  display: block;
  width: 100% !important;
  height: 50px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 16px !important;
  border: 1px solid var(--ba-field-line) !important;
  border-radius: 12px !important;
  background: #ffffff !important;
  box-shadow: none !important;
  color: var(--ba-plum) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  line-height: 1.2 !important;
  outline: none !important;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ba input.input-text:hover,
.ba input[type="email"]:hover,
.ba input[type="password"]:hover {
  border-color: rgba(59, 32, 61, 0.35) !important;
}

.ba input.input-text:focus,
.ba input[type="text"]:focus,
.ba input[type="email"]:focus,
.ba input[type="password"]:focus {
  border-color: var(--ba-plum) !important;
  box-shadow: 0 0 0 3px rgba(233, 154, 138, 0.4) !important;
}

/* password box with the eye button */
.ba .password-input {
  position: relative;
  display: block !important;
  width: 100%;
}

.ba .password-input input {
  padding-right: 52px !important;
}

.ba .show-password-input {
  position: absolute !important;
  top: 50% !important;
  right: 6px !important;
  width: 40px !important;
  height: 40px !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ba-muted) !important;
  transform: translateY(-50%);
  cursor: pointer;
  display: flex !important;
  align-items: center;
  justify-content: center;
}

.ba .show-password-input:hover {
  background: var(--ba-cream) !important;
}

.ba .show-password-input::after {
  position: static !important;
  margin: 0 !important;
}

/* Remember me */
.ba .woocommerce-form-login__rememberme {
  display: flex !important;
  align-items: center;
  gap: 10px;
  margin: 2px 0 18px !important;
  font-weight: 400 !important;
  font-size: 14px !important;
  cursor: pointer;
}

.ba input[type="checkbox"] {
  width: 18px !important;
  height: 18px !important;
  margin: 0 !important;
  flex: none;
  accent-color: var(--ba-plum);
  cursor: pointer;
}


/* =========================================================================
   BUTTONS
   ========================================================================= */

.ba button[type="submit"],
.ba .woocommerce-button,
.ba .woocommerce-Button {
  display: flex !important;
  align-items: center;
  justify-content: center;
  float: none !important;
  width: 100% !important;
  min-height: 50px !important;
  margin: 0 !important;
  padding: 0 24px !important;
  border: 1px solid var(--ba-plum) !important;
  border-radius: 999px !important;
  background: var(--ba-plum) !important;
  box-shadow: none !important;
  color: #ffffff !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

/* coral with plum text on hover — white on coral is too faint to read */
.ba button[type="submit"]:hover,
.ba button[type="submit"]:focus-visible,
.ba .woocommerce-button:hover,
.ba .woocommerce-Button:hover {
  border-color: var(--ba-coral) !important;
  background: var(--ba-coral) !important;
  color: var(--ba-plum) !important;
}

.ba button[type="submit"]:focus-visible {
  outline: 2px solid var(--ba-plum) !important;
  outline-offset: 2px;
}

/* the register card's button: outline style, so "Log in" stays the main action */
.ba--two .u-column2 button[type="submit"] {
  background: transparent !important;
  color: var(--ba-plum) !important;
}

.ba--two .u-column2 button[type="submit"]:hover,
.ba--two .u-column2 button[type="submit"]:focus-visible {
  border-color: var(--ba-plum) !important;
  background: var(--ba-plum) !important;
  color: #ffffff !important;
}

/* Lost your password? */
.ba .woocommerce-LostPassword {
  margin: 16px 0 0 !important;
  text-align: center;
  font-size: 14px;
}

.ba .woocommerce-LostPassword a {
  color: var(--ba-plum) !important;
  font-weight: 600;
  text-decoration: underline !important;
  text-underline-offset: 3px;
}

.ba .woocommerce-LostPassword a:hover {
  color: var(--ba-coral-dark) !important;
}


/* =========================================================================
   MESSAGES (wrong password, account created, email sent …)
   Styled site-wide by the Brittle Notices plugin.
   ========================================================================= */

.ba .woocommerce-notices-wrapper:empty {
  display: none;
}

/* lost-password confirmation ("check your email") */
.ba--pw > p {
  margin: 0 0 12px;
  color: var(--ba-muted);
  font-size: 14px;
  line-height: 1.55;
}


/* =========================================================================
   PHONE SWITCH: "Log in | Create account"
   (only once the script runs; without it both cards simply stack)
   ========================================================================= */

.ba-tabs {
  display: none;
}

@media (max-width: 768px) {
  .ba {
    margin: 0 auto 32px;
  }

  .ba--two #customer_login {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
  }

  .ba--two .u-column1,
  .ba--two .u-column2,
  .ba--one {
    padding: 24px 20px 22px !important;
    border-radius: 20px;
  }

  .ba h2 {
    font-size: 20px !important;
  }

  .ba--js .ba-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    border: 1px solid var(--ba-line);
    border-radius: 999px;
    background: var(--ba-paper);
  }

  .ba .ba-tab {
    min-height: 44px !important;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--ba-muted) !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
  }

  .ba .ba-tab[aria-selected="true"] {
    background: var(--ba-plum) !important;
    color: #ffffff !important;
  }

  .ba .ba-tab:focus-visible {
    outline: 2px solid var(--ba-coral) !important;
    outline-offset: 2px;
  }

  /* show one card at a time; the switch above acts as its heading */
  .ba--js[data-active="login"] .u-column2,
  .ba--js[data-active="register"] .u-column1 {
    display: none !important;
  }

  .ba--js #customer_login h2 {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
  }

  /* on its own, the register card is the main action: plain background, solid button */
  .ba--js .u-column2 {
    background: var(--ba-paper) !important;
  }

  .ba--js .u-column2 button[type="submit"] {
    background: var(--ba-plum) !important;
    color: #ffffff !important;
  }

  .ba--js .u-column2 button[type="submit"]:hover,
  .ba--js .u-column2 button[type="submit"]:focus-visible {
    border-color: var(--ba-coral) !important;
    background: var(--ba-coral) !important;
    color: var(--ba-plum) !important;
  }
}

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