/* ==========================================================================
   TankAndBarrel.com - Login page stylesheet (tb_login)
   2026-11-28

   CSS ONLY. This file does not touch form field names, the form action,
   the formid token, the Turnstile widget, the sign-in / session / password
   logic, the cart restore, the checkout redirect or Shiplify.

   Scope: every rule is anchored to #loginModules (an id that only exists on
   login.php - login.php prints <div id="loginModules"> itself) or to
   #bodyContent:has(> #loginModules). Nothing here can match another page.
   Browsers without :has() support just keep the old look for the two
   page-level tweaks; the card layout does not need :has().

   Look matches the Create Account redesign (tb_forms): #13253a navy text,
   #1e6fc4 primary blue, #e3e8ee card borders, 8-10px radii, 16px inputs,
   44px+ tap targets.

   Words that are not in the page markup (page title, sign-in card
   description, field labels, "Create an Account" button text)
   are drawn with ::before / ::after. Every one of those rules is guarded
   by :not(.tb-login-native), so if the optional PHP templates are installed
   later (they add that class and real text) the CSS text switches off by
   itself and nothing shows twice.
   ========================================================================== */

/* ---------- page level ---------- */
#bodyContent:has(> #loginModules) {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #33475b;
}
/* the old <br> above the modules */
#bodyContent:has(> #loginModules) > br {
  display: none;
}

/* sign-in error / info messages printed above the cards */
#bodyContent > .alert:has(~ #loginModules) {
  max-width: 880px;
  margin: 12px auto 4px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.5;
}

#loginModules {
  max-width: 880px;
  margin: 20px auto 28px;
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #33475b;
}

/* ---------- title (drawn text) ---------- */
#loginModules::before {
  content: "Create Account or Login";
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #13253a;
  margin: 0 0 6px;
}

/* ---------- two-card grid ---------- */
#loginModules > .row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: 0;
  padding: 0;
  align-items: start;
}
/* kill Bootstrap's clearfix pseudo-element so it is not a grid cell */
#loginModules > .row::after {
  display: none;
  content: none;
}

/* New customers on the left, returning customers on the right (also on
   phones: New Customer first, same as desktop). The live module order is
   New, then Returning, so this just matches the markup; grid order makes it
   explicit. No markup change. */
#loginModules > .row > .create-account-link {
  order: 1;
}
#loginModules > .row > .login-form {
  order: 2;
}

/* Each module column becomes the card (so the "Forget your password" link,
   which sits outside .panel in the markup, lives inside the card). */
#loginModules > .row > .login-form,
#loginModules > .row > .create-account-link {
  float: none;
  width: auto;
  min-width: 0;
  margin: 0;
  padding: 24px;
  background: #fff;
  border: 1px solid #e3e8ee;
  border-radius: 10px;
  -webkit-box-shadow: 0 1px 3px rgba(19, 37, 58, .06);
          box-shadow: 0 1px 3px rgba(19, 37, 58, .06);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
}
#loginModules > .row > .login-form {
  border-top: 4px solid #1e6fc4;
}
#loginModules > .row > .create-account-link {
  background: #f6f9fc;
  border-top: 4px solid #cbd6e2;
}

/* flatten Bootstrap's panel inside the card */
#loginModules .panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  -webkit-box-shadow: none;
          box-shadow: none;
  margin: 0;
}
#loginModules .panel-body {
  padding: 0;
}
#loginModules .create-account-link .panel {
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
}
#loginModules .create-account-link .panel-body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  height: 100%;
}

/* ---------- card headings ---------- */
#loginModules h2 {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 20px !important;
  font-weight: 700 !important;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #13253a !important;
  text-decoration: none !important;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  text-align: left;
}

/* Bootstrap alerts inside the cards are the old "I am a returning customer"
   lines. Replaced by the description below. (Sign-in errors are NOT inside
   the cards, so they are not affected.) */
#loginModules .login-form:not(.tb-login-native) .panel-body > .alert,
#loginModules .create-account-link:not(.tb-login-native) .panel-body > .alert {
  display: none;
}
/* the stray "Continue to checkout" line in the new-customer card */
#loginModules .create-account-link:not(.tb-login-native) .panel-body > p:not(.alert):not(.text-right) {
  display: none;
}

/* real-text version used by the optional PHP templates */
#loginModules .tb-login-sub {
  display: block;
  font-size: 14px;
  line-height: 1.5;
  color: #6b7a8c;
  margin: -8px 0 16px;
  padding: 0;
  background: none;
  border: 0;
}

/* ---------- sign-in form ---------- */
#loginModules form[name="login"] .form-group {
  margin: 0 0 14px;
}
/* field labels (drawn text, only when the template has no real labels) */
#loginModules .login-form:not(.tb-login-native) .form-group:has(#inputEmail)::before,
#loginModules .login-form:not(.tb-login-native) .form-group:has(#inputPassword)::before {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: #13253a;
  margin-bottom: 6px;
}
#loginModules .login-form:not(.tb-login-native) .form-group:has(#inputEmail)::before {
  content: "Email Address";
}
#loginModules .login-form:not(.tb-login-native) .form-group:has(#inputPassword)::before {
  content: "Password";
}
#loginModules .tb-login-label {
  display: block;
  font-size: 14px;
  font-weight: 650;
  color: #13253a;
  margin: 0 0 6px;
}

#loginModules .form-control,
#loginModules input[type="text"],
#loginModules input[type="email"],
#loginModules input[type="password"] {
  width: 100%;
  max-width: 100%;
  font-size: 16px !important;
  height: auto;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #c7d2df;
  border-radius: 6px;
  color: #13253a;
  background: #fff;
  -webkit-box-shadow: none;
          box-shadow: none;
}
#loginModules .form-control::-webkit-input-placeholder { color: #8a97a6; }
#loginModules .form-control::placeholder { color: #8a97a6; }
#loginModules .form-control:focus {
  border-color: #1e6fc4;
  outline: 0;
  -webkit-box-shadow: 0 0 0 3px rgba(30, 111, 196, .22);
          box-shadow: 0 0 0 3px rgba(30, 111, 196, .22);
}

/* Cloudflare Turnstile: centred, never clipped, keeps its own size */
#loginModules .reCaptcha {
  float: none;
  width: 100%;
  padding: 0 !important;
  margin: 2px 0 16px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  overflow: visible;
}

/* ---------- buttons ---------- */
#loginModules .btn-success,
#loginModules .btn-primary {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 18px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.4;
  border-radius: 6px;
  text-shadow: none;
  -webkit-box-shadow: none;
          box-shadow: none;
}
#loginModules .btn-success {
  background: #1e6fc4;
  border: 1px solid #1e6fc4;
  color: #fff;
}
#loginModules .btn-success:hover,
#loginModules .btn-success:focus {
  background: #15589e;
  border-color: #15589e;
  color: #fff;
}
/* "New customer" button: outlined, so Sign In stays the one solid button */
#loginModules .btn-primary {
  background: #fff;
  border: 2px solid #1e6fc4;
  color: #1e6fc4;
  padding: 11px 18px;
}
#loginModules .btn-primary:hover,
#loginModules .btn-primary:focus {
  background: #1e6fc4;
  border-color: #1e6fc4;
  color: #fff;
}
#loginModules .btn .fa {
  margin-right: 8px;
}
#loginModules .btn-success:focus-visible,
#loginModules .btn-primary:focus-visible,
#loginModules .btn-default:focus-visible {
  outline: 3px solid rgba(30, 111, 196, .45);
  outline-offset: 2px;
}

/* new-customer button sits right under its heading (the card is short now
   that the benefit text is gone, so no stretching or bottom-pinning) */
#loginModules .create-account-link .panel-body > .text-right {
  margin: 0;
  padding: 0;
  text-align: left;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
}
#loginModules .create-account-link .panel-body > .text-right > a.btn {
  margin-top: 0;
}
/* button text: the markup says "Continue"; draw "Create an Account" */
#loginModules .create-account-link:not(.tb-login-native) a.btn {
  font-size: 0;
  line-height: 0;
}
#loginModules .create-account-link:not(.tb-login-native) a.btn .fa {
  display: none;
}
#loginModules .create-account-link:not(.tb-login-native) a.btn::after {
  content: "Create an Account";
  font-size: 16px;
  line-height: 1.4;
  font-weight: 700;
}

/* "Forget your password" - quiet text link under the Sign In button */
#loginModules .login-form > p {
  margin: 14px 0 0;
  text-align: center;
}
#loginModules .login-form > p .btn-default {
  display: inline-block;
  min-height: 44px;
  padding: 10px 8px;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #1e6fc4;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-shadow: none;
  white-space: normal;
  -webkit-box-shadow: none;
          box-shadow: none;
}
#loginModules .login-form > p .btn-default:hover,
#loginModules .login-form > p .btn-default:focus {
  color: #15589e;
  background: #eef4fb;
}

/* ---------- phones ---------- */
@media (max-width: 767px) {
  #loginModules {
    margin-top: 12px;
  }
  #loginModules::before {
    font-size: 24px;
  }
  #loginModules > .row {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  #loginModules > .row > .login-form,
  #loginModules > .row > .create-account-link {
    padding: 18px 16px;
  }
  #loginModules .btn-success,
  #loginModules .btn-primary {
    min-height: 50px;
  }
}
@media (max-width: 380px) {
  /* leave room for the 300px Turnstile widget on the narrowest phones */
  #loginModules > .row > .login-form,
  #loginModules > .row > .create-account-link {
    padding-left: 10px;
    padding-right: 10px;
  }
}
