/*
 * Styles for the authentication flow (sessions#new, sessions#verify).
 * Linked only on those pages via `content_for :stylesheets`.
 * Relies on the shared tokens, header, footer and buttons in application.css.
 */

.auth {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 68px);
  padding: 56px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px 34px;
  border-radius: 24px;
  border: 1px solid var(--panel-border);
  background:
    radial-gradient(520px 220px at 50% 0%, rgba(124, 108, 255, 0.22), transparent 70%),
    var(--panel);
  text-align: center;
}

.auth-mascot {
  font-size: 64px;
  line-height: 1;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 30px var(--accent-glow));
  animation: bob 4s ease-in-out infinite;
}

.auth-card h1 {
  margin: 0 0 10px;
  font-size: clamp(26px, 5vw, 32px);
  letter-spacing: -0.5px;
}

.auth-card h1 .grad {
  background: linear-gradient(120deg, var(--accent-2), var(--accent) 70%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-card .sub {
  margin: 0 auto 28px;
  max-width: 340px;
  color: var(--muted);
  font-size: 15px;
}

/* Form */
.auth-form {
  text-align: left;
}

.field {
  margin-bottom: 20px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}

.field input {
  width: 100%;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-size: 16px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field input::placeholder {
  color: rgba(154, 160, 195, 0.6);
}

.field-hint {
  margin: 8px 2px 0;
  font-size: 12px;
  color: var(--muted);
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 108, 255, 0.25);
}

/* Verify-code input: centered, spaced digits */
.field input.code {
  text-align: center;
  font-size: 26px;
  letter-spacing: 10px;
  font-weight: 700;
}

/* Clickable phone number for the inbound (call us) flow */
.call-number {
  display: inline-block;
  margin: 4px 0 18px;
  padding: 14px 26px;
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: rgba(51, 230, 184, 0.08);
  font-size: clamp(22px, 6vw, 30px);
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--accent-2);
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.call-number:hover,
.call-number:focus-visible {
  background: rgba(51, 230, 184, 0.16);
  box-shadow: 0 0 24px rgba(51, 230, 184, 0.35);
  transform: translateY(-1px);
}

.poll-hint {
  margin: 0 0 22px;
  font-size: 14px;
  color: var(--muted);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.btn-block {
  width: 100%;
}

.auth-hint {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.45;
  color: var(--muted);
  text-align: center;
}

.auth-hint-free {
  margin-top: 8px;
  color: var(--accent-2);
}

.auth-alt {
  margin-top: 22px;
  font-size: 14px;
  color: var(--muted);
}

.auth-alt a {
  color: var(--accent-2);
}

.auth-alt a:hover {
  text-decoration: underline;
}

/* Flash messages */
.flash {
  margin-bottom: 20px;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  text-align: left;
}

.flash-error {
  color: var(--danger);
  border: 1px solid rgba(255, 107, 107, 0.4);
  background: rgba(255, 107, 107, 0.1);
}

.flash-ok {
  color: var(--accent-2);
  border: 1px solid rgba(51, 230, 184, 0.4);
  background: rgba(51, 230, 184, 0.1);
}
