/* Auth pages: /login/, /register/, /lost-password/ */

.ra-page {
  --ra-night: #1a0f2e;
  --ra-night-2: #2a1845;
  --ra-gold: #D4A574;
  --ra-gold-light: #E8C9A1;
  --ra-ink: #2D2A32;
  --ra-muted: #6B6670;
  --ra-line: #E4E0DB;
  --ra-danger: #B42318;

  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 100px);
  padding: 56px 16px 72px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 15% 10%, rgba(124, 143, 214, 0.18), transparent 50%),
    radial-gradient(ellipse at 85% 90%, rgba(212, 165, 116, 0.16), transparent 50%),
    linear-gradient(160deg, #2a1845 0%, #1a0f2e 60%, #140b24 100%);
}

.ra-stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  background-image:
    radial-gradient(1px 1px at 8% 20%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 22% 70%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 35% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 64% 84%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 76% 24%, #fff 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 88% 60%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 94% 12%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 50% 94%, #fff 50%, transparent 51%);
}

.ra-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  padding: 40px 40px 32px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

/* Heading */
.ra-head {
  margin-bottom: 28px;
  text-align: center;
}

.ra-mark {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  font-size: 1.4rem;
  color: var(--ra-gold);
  background: linear-gradient(145deg, var(--ra-night-2), var(--ra-night));
  border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px rgba(212, 165, 116, 0.6);
}

.ra-head h1 {
  margin: 0 0 6px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.1rem;
  font-weight: 600;
  line-height: 1.1;
  color: var(--ra-ink);
}

.ra-head p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ra-muted);
}

/* Notices */
.ra-notice {
  margin-bottom: 20px;
  padding: 14px 16px;
  font-size: 0.9rem;
  line-height: 1.5;
  border-radius: 12px;
}

.ra-notice p { margin: 0 0 4px; }
.ra-notice p:last-child { margin-bottom: 0; }

.ra-notice--error {
  color: var(--ra-danger);
  background: #FEF3F2;
  border: 1px solid #FECDCA;
}

.ra-notice--warn {
  color: #93370D;
  background: #FFFAEB;
  border: 1px solid #FEDF89;
}

.ra-notice--ok {
  color: #05603A;
  background: #ECFDF3;
  border: 1px solid #ABEFC6;
}

.ra-notice--ok .ra-submit {
  margin-top: 14px;
}

/* Google button slot: fixed height, placeholder underneath */
.ra-google {
  position: relative;
  height: 44px;
}

.ra-google__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 700;
  color: #3c4043;
  background: #fff;
  border: 1px solid #dadce0;
  border-radius: 999px;
  transition: opacity 0.2s ease;
}

.ra-google__button {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.ra-google.is-ready .ra-google__button { opacity: 1; }
.ra-google.is-ready .ra-google__placeholder { opacity: 0; }
.ra-google.is-busy { opacity: 0.55; pointer-events: none; }
.ra-google.is-unavailable { opacity: 0.5; }

.ra-google__status {
  margin: 10px 0 0;
  font-size: 0.85rem;
  text-align: center;
  color: var(--ra-muted);
}

.ra-google__status.is-error { color: var(--ra-danger); }

.ra-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9A949F;
}

.ra-divider::before,
.ra-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--ra-line);
}

/* Form */
.ra-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ra-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ra-ink);
}

.ra-field__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ra-input {
  position: relative;
  display: flex;
  align-items: center;
}

.ra-input > svg {
  position: absolute;
  left: 14px;
  color: #9A949F;
  pointer-events: none;
}

.ra-input input {
  width: 100%;
  height: 48px;
  padding: 0 44px 0 44px;
  font-size: 1rem;
  color: var(--ra-ink);
  background: #FAF9F7;
  border: 1.5px solid var(--ra-line);
  border-radius: 12px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.ra-input input:focus {
  background: #fff;
  border-color: var(--ra-gold);
  box-shadow: 0 0 0 4px rgba(212, 165, 116, 0.2);
}

.ra-input:focus-within > svg { color: #9A6B3C; }

.ra-input.is-invalid input {
  border-color: var(--ra-danger);
  box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.1);
}

.ra-reveal {
  position: absolute;
  right: 6px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #6B6670;
  background: none;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}

.ra-reveal:hover,
.ra-reveal.is-on { color: var(--ra-ink); }

.ra-reveal:focus-visible {
  outline: 2px solid var(--ra-gold);
}

.ra-hint,
.ra-error {
  display: block;
  margin-top: 6px;
  font-size: 0.8rem;
}

.ra-hint { color: var(--ra-muted); }
.ra-error { color: var(--ra-danger); }
.ra-error:empty { display: none; }

.ra-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.9rem;
  color: var(--ra-muted);
  cursor: pointer;
}

.ra-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ra-night);
}

.ra-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 50px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  text-decoration: none;
  background: linear-gradient(145deg, var(--ra-night-2), var(--ra-night));
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.ra-submit:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(26, 15, 46, 0.3);
}

.ra-submit:focus-visible {
  outline: 3px solid var(--ra-gold);
  outline-offset: 2px;
}

.ra-link {
  font-weight: 700;
  color: #7A5230;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.ra-link:hover {
  color: var(--ra-night);
  text-decoration: underline;
}

.ra-link--small { font-size: 0.82rem; }

.ra-legal {
  margin: -4px 0 0;
  font-size: 0.78rem;
  line-height: 1.5;
  text-align: center;
  color: #9A949F;
}

.ra-foot {
  margin: 24px 0 0;
  padding-top: 20px;
  font-size: 0.92rem;
  text-align: center;
  color: var(--ra-muted);
  border-top: 1px solid var(--ra-line);
}

.ra-bday {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  color: #5B4B78;
  background: rgba(212, 165, 116, 0.12);
  border: 1px solid rgba(212, 165, 116, 0.4);
  border-radius: 999px;
}

.ra-bday[hidden] { display: none; }
.ra-bday strong { color: var(--ra-night); }
.ra-bday .ra-link { margin-left: auto; }

@media (max-width: 520px) {
  .ra-page { padding: 24px 12px 48px; }
  .ra-card { padding: 30px 22px 24px; border-radius: 18px; }
  .ra-head h1 { font-size: 1.8rem; }
}

@media (prefers-reduced-motion: reduce) {
  .ra-google__placeholder,
  .ra-google__button,
  .ra-submit { transition: none; }
}

/* Outrank the theme's global button[type=submit|button] rules */
.ra-page .ra-submit,
.ra-page .ra-submit:hover {
  min-height: 0;
  padding: 0 20px;
  font-size: 0.98rem;
  color: #fff;
  background: linear-gradient(145deg, var(--ra-night-2), var(--ra-night));
  border-radius: 999px;
}

.ra-page .ra-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(26, 15, 46, 0.3);
}

.ra-page .ra-reveal,
.ra-page .ra-reveal:hover {
  min-height: 0;
  padding: 0;
  background: none;
  box-shadow: none;
  transform: none;
  border-radius: 8px;
}

.ra-page .ra-link,
.ra-page .ra-link:hover {
  min-height: 0;
  padding: 0;
  font-size: inherit;
  color: #7A5230;
  background: none;
  box-shadow: none;
  transform: none;
}

.ra-page .ra-link--small { font-size: 0.82rem; }
