/* ==========================================================================
   Sign-in panel: controls sized for thumbs.
   
   Measured on a 390px viewport before changing anything:
     primary button        356x36   (below the 44px minimum)
     สร้างบัญชีใหม่          62x14   — a 14px tap target
     ลืมรหัสผ่าน             50x14   — 14px, and grey, so it read as plain text
     Google                372x39   — no border, no background: looked like text
     ดูแพ็กและราคา           372x39   — same problem, and barely visible

   Everything below is driven by those numbers: 44px minimum height on every
   interactive element, real affordance on the Google button, and one consistent
   link treatment instead of three different greys.
   ========================================================================== */

/* ---------- primary submit ---------- */

.sheet .btn-primary.btn-block {
  min-height: 46px;
  font-size: 15px;
  font-weight: 560;
  letter-spacing: 0.005em;
  border-radius: 10px;
  /* A lit top edge so the button belongs to the glass rather than sitting on it. */
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.20),
    0 6px 16px -6px rgba(79, 70, 229, 0.55);
  transition: transform .12s ease, filter .16s ease, box-shadow .16s ease;
}
.sheet .btn-primary.btn-block:hover {
  filter: brightness(1.08);
  box-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.24),
    0 8px 20px -6px rgba(79, 70, 229, 0.65);
}
/* Press feedback matters more on touch than hover ever does. */
.sheet .btn-primary.btn-block:active { transform: translateY(1px); filter: brightness(.96); }
.sheet .btn-primary.btn-block:disabled { opacity: .6; transform: none; filter: none; }

/* ---------- the message under it ---------- */

.sheet-msg {
  /* Separated from the button that produced it, but not so tall that a one-line
     message becomes a slab — padding and dot alignment are tuned for one line. */
  margin: 14px 12px 6px;
  padding: 9px 11px;
  font-size: 12.5px;
  line-height: 1.5;
  display: flex; align-items: center; gap: 8px;
  /* Errors are stated in the product's warning colour, not a neutral grey —
     the previous version was light blue-grey and read as a hint, not a problem. */
  color: #fca5a5;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.26);
  border-radius: 9px;
}
/* A leading dot marker, so the message is scannable without an icon font. */
.sheet-msg::before {
  content: "";
  flex: 0 0 auto;
  width: 5px; height: 5px; margin-top: 0;
  border-radius: 999px;
  background: currentColor;
}
.sheet-msg.is-ok {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(16, 185, 129, 0.28);
}

/* ---------- the two text links ---------- */

/* Given real height and one consistent treatment. Previously 14px tall, and
   'ลืมรหัสผ่าน' was grey while 'สร้างบัญชีใหม่' was indigo, so only one of the
   two looked clickable. */
.auth-alt {
  display: flex; align-items: stretch; gap: 6px;
  padding: 6px 8px 10px;
}
.auth-alt-link {
  flex: 1;
  min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink-2);
  font-size: 13px; text-decoration: none;
  text-align: center;
  transition: background .14s, border-color .14s, color .14s;
}
.auth-alt-link:hover {
  background: rgba(255, 255, 255, 0.075);
  border-color: rgba(255, 255, 255, 0.18);
  color: var(--ink-1);
}
.auth-alt-link:active { background: rgba(255, 255, 255, 0.10); }
.auth-alt-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* One of the two is the more likely next step, so it carries the accent. */
.auth-alt-link.is-lead { color: var(--accent-hi); border-color: rgba(129, 140, 248, 0.26); }
.auth-alt-link.is-lead:hover { border-color: rgba(129, 140, 248, 0.45); }

/* Single full-width variant, used when only one alternative applies. */
.auth-alt.is-single .auth-alt-link { flex: 1 1 100%; }

/* ---------- divider before third-party sign-in ---------- */

.auth-or {
  display: flex; align-items: center; gap: 10px;
  margin: 2px 12px 8px;
  font-size: 11px; letter-spacing: .04em;
  color: var(--ink-4);
}
.auth-or::before, .auth-or::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(to right,
    rgba(255,255,255,0) 0%, rgba(255,255,255,.12) 50%, rgba(255,255,255,0) 100%);
}

/* ---------- Google: a real button, not a text row ---------- */

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 9px;
  width: calc(100% - 24px);
  min-height: 46px;
  margin: 0 12px 6px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 10px;
  /* Slightly lighter than the panel so it reads as a raised surface — the old
     version had no background or border at all and looked like a link. */
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-1);
  font: inherit; font-size: 14px; font-weight: 510;
  text-decoration: none;
  cursor: pointer;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.10);
  transition: background .14s, border-color .14s, transform .12s;
}
.btn-google:hover {
  background: rgba(255, 255, 255, 0.10);
  border-color: rgba(255, 255, 255, 0.24);
}
.btn-google:active { transform: translateY(1px); }
.btn-google:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-google svg { flex: 0 0 auto; }

/* ---------- footer row ---------- */

.auth-foot {
  display: flex; align-items: center; justify-content: center;
  min-height: 44px;
  margin: 2px 8px 6px;
  padding: 0 12px;
  border-radius: 9px;
  color: var(--ink-3);
  font-size: 12.5px; text-decoration: none;
  transition: background .14s, color .14s;
}
.auth-foot:hover { background: rgba(255, 255, 255, 0.05); color: var(--ink-1); }
.auth-foot:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- account rows (signed-in state) ---------- */

/* Same 44px rule applies to the panel's rows once signed in. */
.sheet-row { min-height: 44px; }
.sheet-confirm-actions .btn { min-height: 42px; }

/* On a phone the panel is a bottom sheet, so give the controls a little more
   room and keep the last row clear of the home indicator. */
@media (max-width: 560px) {
  .sheet .btn-primary.btn-block,
  .btn-google { min-height: 48px; font-size: 15px; }
  .auth-alt-link, .auth-foot, .sheet-row { min-height: 48px; }
  .sheet-rows { padding-bottom: max(8px, env(safe-area-inset-bottom)); }
}
