/* ============ TD STUDIOS — customer accounts (storefront) ============
   Styles for account.js only. Every class is prefixed "acct-" so nothing
   can collide with styles.css. Matches the house look: cream/paper/ink,
   1.5px borders, pill buttons, hard offset shadows, Instrument Serif
   italic display + Space Mono microcopy. Relies on the :root variables
   styles.css defines (--cream/--paper/--ink/--red/--lime/--serif/--mono). */

/* ---------- Overlay + drawer (sits above the cart drawer's z-range) ---------- */
.acct-overlay {
  position: fixed; inset: 0; background: rgba(23, 20, 17, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 140;
}
.acct-overlay.show { opacity: 1; pointer-events: auto; }

.acct-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(400px, 100vw);
  background: var(--cream, #FBF6EC); border-left: 1.5px solid var(--ink, #171411);
  z-index: 150; transform: translateX(105%);
  transition: transform .3s cubic-bezier(.2, .8, .2, 1);
  display: flex; flex-direction: column;
}
.acct-drawer.show { transform: translateX(0); }

.acct-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; border-bottom: 1.5px solid var(--ink);
}
.acct-title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: 28px; }

.acct-body {
  flex: 1; overflow-y: auto; padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
}
.acct-foot {
  border-top: 1.5px solid var(--ink); padding: 12px 22px; text-align: center;
  font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; opacity: .55;
}

/* ---------- Unavailable banner (static preview / API down) ---------- */
.acct-banner {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em; line-height: 1.7;
  background: var(--butter, #F3B62B); border: 1.5px dashed var(--ink);
  border-radius: 12px; padding: 10px 14px;
}

/* ---------- LOG IN / SIGN UP toggle ---------- */
.acct-tabs { display: flex; gap: 8px; }
.acct-tab {
  flex: 1; padding: 9px 0; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--paper); color: var(--ink);
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  transition: background .12s, color .12s;
}
.acct-tab:hover { background: var(--lime); color: var(--ink); }
.acct-tab.active { background: var(--ink); color: var(--paper); }

/* ---------- Forms ---------- */
.acct-form { display: flex; flex-direction: column; gap: 8px; }
.acct-label {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .08em; margin-top: 6px;
}
.acct-input {
  padding: 11px 13px; font-size: 14px; font-family: var(--sans);
  border: 1.5px solid var(--ink); border-radius: 10px;
  background: var(--paper); color: var(--ink); width: 100%;
}
.acct-input::placeholder { color: var(--ink); opacity: .4; }
.acct-input:focus { outline: none; box-shadow: 3px 3px 0 var(--lime); }
.acct-hint { font-family: var(--mono); font-size: 10px; letter-spacing: .06em; opacity: .55; }
.acct-error {
  font-family: var(--mono); font-size: 11px; letter-spacing: .04em;
  line-height: 1.6; color: var(--red-deep, #C3331F);
}
.acct-ok { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .04em; }

.acct-btn {
  margin-top: 8px; padding: 12px 22px; border: 1.5px solid var(--ink); border-radius: 999px;
  background: var(--ink); color: var(--paper); width: 100%;
  font-family: var(--mono); font-size: 13px; font-weight: 700; letter-spacing: .06em;
  transition: transform .12s ease, box-shadow .12s ease;
}
.acct-btn:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--red); }
.acct-btn:active { transform: none; box-shadow: none; }
.acct-btn:disabled { opacity: .6; transform: none; box-shadow: none; cursor: default; }

.acct-note { font-family: var(--mono); font-size: 11px; letter-spacing: .03em; line-height: 1.8; opacity: .6; }

/* ---------- Logged-in view ---------- */
.acct-kicker {
  font-family: var(--mono); font-size: 11px; font-weight: 700;
  letter-spacing: .1em; color: var(--red);
}
.acct-user-name {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: 34px; line-height: 1.05; overflow-wrap: anywhere;
}
.acct-user-email {
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  opacity: .75; overflow-wrap: anywhere; margin-bottom: 8px;
}

.acct-collapse {
  padding: 11px 16px; border: 1.5px solid var(--ink); border-radius: 12px;
  background: var(--paper); color: var(--ink); text-align: left;
  font-family: var(--mono); font-size: 12px; font-weight: 700; letter-spacing: .06em;
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  transition: background .12s;
}
.acct-collapse:hover { background: var(--lime); }

.acct-pw-form {
  border: 1.5px dashed var(--ink); border-radius: 12px;
  padding: 14px; margin-top: -4px; background: var(--paper);
}

.acct-logout { background: var(--paper); color: var(--ink); }
.acct-logout:hover { box-shadow: 4px 4px 0 var(--ink); }
