/* Hookme auth panel — layered on top of landing-tailwind.css (Tailwind build). */

:root {
  --auth-border: rgba(255, 255, 255, 0.1);
  --auth-border-strong: rgba(255, 255, 255, 0.16);
  --auth-text: #f8f8fb;
  --auth-muted: #a1a1b5;
  --auth-dim: #6b6b80;
  --auth-surface: #14141c;
  --auth-surface-2: #1c1c26;
  --auth-danger: #ff8fb0;
  --auth-green: #22ff88;
}

/* ---------- brand logo ---------- */

.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 0 20px rgba(255, 45, 123, 0.4);
}

.brand-mark-sm {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: none;
}

/* landing-tailwind.css ships `[hidden]:where(:not([hidden=until-found])){display:none}`,
   which the class-based display rules below would otherwise win against on a
   later tie. Keep the attribute authoritative so the MFA panel and location
   modal stay closed until opened. */
[hidden] {
  display: none !important;
}

.auth-panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin-left: auto;
  padding: 32px;
  border: 1px solid var(--auth-border);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(28, 28, 38, 0.92), rgba(20, 20, 28, 0.92));
  backdrop-filter: blur(20px);
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(255, 45, 123, 0.55), rgba(139, 92, 246, 0.35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.auth-panel-head {
  margin-bottom: 24px;
}

.auth-panel-title {
  margin: 0;
  font-family: Sora, sans-serif;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--auth-text);
}

.auth-panel-sub {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--auth-muted);
}

/* ---------- form ---------- */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-label {
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #c4c1cb;
}

.auth-input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--auth-border);
  border-radius: 12px;
  background: #0f0f14;
  color: var(--auth-text);
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.auth-input:focus {
  outline: none;
  border-color: rgba(255, 45, 123, 0.6);
  box-shadow: 0 0 0 3px rgba(255, 45, 123, 0.14);
}

.auth-input-code {
  letter-spacing: 0.4em;
  /* The trailing letter-space of the last digit pushes the code left of the
     optical centre, so the line is nudged back by half of it. */
  text-indent: 0.4em;
  text-align: center;
  font-size: 18px;
}

.auth-error {
  margin: 6px 0 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--auth-danger);
}

.auth-submit {
  width: 100%;
  height: 48px;
  margin-top: 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #ff2d7b, #8b5cf6);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(255, 45, 123, 0.28);
  transition: filter 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.auth-submit:hover {
  filter: brightness(1.08);
  box-shadow: 0 10px 30px rgba(255, 45, 123, 0.38);
}

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.auth-quiet {
  width: 100%;
  height: 40px;
  margin-top: 10px;
  border: 1px solid var(--auth-border);
  border-radius: 999px;
  background: transparent;
  color: #aaa8b2;
  font-size: 13px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.auth-quiet:hover {
  border-color: var(--auth-border-strong);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.auth-foot {
  margin: 22px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--auth-dim);
  text-align: center;
}

.auth-link {
  color: #ff75a1;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* ---------- focus ---------- */

/* Keyboard focus needs a visible ring on every control the panel renders.
   The signup page uses the same violet, so both auth pages behave alike. */
.auth-submit:focus-visible,
.auth-quiet:focus-visible,
.auth-link:focus-visible {
  outline: 2px solid #bd91ff;
  outline-offset: 3px;
}

/* ---------- google ---------- */

.auth-google {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
}

.auth-google iframe {
  width: 100% !important;
  max-width: 100%;
  height: 44px !important;
  border: 1px solid #dadce0 !important;
  border-radius: 10px !important;
  background: #fff !important;
}

/* Google Identity Services renders its button with hashed class names, ships the
   visual rules in an inline <style>, and sets its own layout through inline
   style attributes. Our CSP blocks all three, so restate the rendered contract
   with structural selectors, which survive GSI re-hashing. */
#google-signin > div {
  position: relative;
  align-self: stretch;
  width: 100%;
}

#google-signin [role="button"] {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 44px;
  padding: 0 14px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  background: #fff;
  color: #3c4043;
  font-family: "Google Sans", Roboto, Arial, sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  user-select: none;
}

#google-signin [role="button"] > div:first-of-type {
  position: absolute;
  inset: 0;
  transition: background-color 0.218s;
}

#google-signin [role="button"] > div:last-of-type {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 100%;
  position: relative;
}

#google-signin [role="button"] svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

#google-signin [role="button"] span {
  font-weight: 500;
  white-space: nowrap;
}

/* GSI keeps the accessible name in a separate span; keep it out of the layout
   but still exposed to assistive technology. */
#google-signin [role="button"] #button-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* The FedCM overlay iframe sits on top of the rendered button. GSI normally
   positions it with inline styles, which our CSP strips, so pin it here. */
#google-signin iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  border: 0 !important;
  border-radius: 10px;
  background: transparent !important;
  opacity: 0;
}

#google-signin {
  position: relative;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 18px;
  color: var(--auth-dim);
  font-size: 11px;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.google-unavailable {
  width: 100%;
  height: 44px;
  border: 1px solid #dadce0;
  border-radius: 10px;
  background: #f8f9fa;
  color: #5f6368;
  font-size: 13px;
  font-weight: 500;
  cursor: not-allowed;
}

.google-setup-note {
  color: var(--auth-dim);
  font-size: 10px;
  text-align: center;
}

#google-signin[aria-busy="true"] {
  opacity: 0.6;
  pointer-events: none;
}

/* ---------- mfa ---------- */

.auth-mfa {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 18px;
  border-top: 1px solid var(--auth-border);
}

.auth-eyebrow {
  margin: 0;
  color: #ff2d7b;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  color: var(--auth-muted);
}

/* ---------- location modal ---------- */

.auth-modal {
  position: fixed;
  z-index: 60;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(6, 5, 10, 0.78);
  backdrop-filter: blur(8px);
}

.auth-modal-card {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  background: #15131b;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
}

.auth-modal-title {
  margin: 6px 0 0;
  font-family: Sora, sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--auth-text);
}

.auth-feedback {
  margin: 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(255, 45, 123, 0.08);
  color: #ffb3ca;
  font-size: 11px;
  line-height: 1.5;
}

/* ---------- layout helpers (replaces inline styles blocked by CSP) ---------- */

.app-root {
  padding-top: var(--safe-area-inset-top, 0px);
  box-sizing: border-box;
}

.app-header {
  top: var(--safe-area-inset-top, 0px);
}

.app-float-1 {
  animation: float1 6s ease-in-out infinite;
}

.app-float-2 {
  animation: float2 7s ease-in-out infinite;
}

.app-float-3 {
  animation: float3 6.5s ease-in-out infinite;
}

.app-map-dot-1 {
  left: 30%;
  top: 20%;
}

.app-map-dot-2 {
  left: 60%;
  top: 45%;
}

.app-map-dot-3 {
  left: 20%;
  top: 70%;
}

.scroll-mt-20 {
  scroll-margin-top: 5rem;
}

/* ---------- responsive ---------- */

@media (max-width: 1023px) {
  .auth-panel {
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .auth-panel {
    padding: 24px 20px;
    border-radius: 20px;
  }
}
