/* Shared auth + onboarding styles: centered cards, form fields, the pet reveal/public card.
   Mobile-first, token-driven (light/dark). */
.auth-wrap {
  min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: max(16px, env(safe-area-inset-top)) clamp(12px, 4vw, 24px) max(16px, env(safe-area-inset-bottom));
  background: var(--surface-sunken);
}
.auth-card {
  width: 100%; max-width: min(440px, 100%);
  background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-xl);
  padding: clamp(20px, 6vw, 36px) clamp(18px, 5vw, 32px); box-shadow: var(--shadow-md-c);
}
.auth-card h2 { font-size: clamp(var(--text-xl), 6vw, var(--text-2xl)); margin: 0 0 8px; }
.muted { color: var(--text-faint); font-size: 14px; }
.auth-icon { width: 76px; height: 76px; border-radius: 50%; margin: 0 auto 20px; display: grid; place-items: center; color: #fff; font-size: 36px; background: linear-gradient(140deg, var(--ovdje-orange), var(--ovdje-rust)); }
.auth-icon--sent { background: linear-gradient(140deg, var(--success), var(--ovdje-teal-700)); }
.auth-foot { text-align: center; font-size: 13px; color: var(--text-faint); margin-top: 18px; }
.linkbtn { border: 0; background: none; color: var(--accent-text); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }

/* form fields (shared by onboarding + login) */
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 7px; color: var(--text); }
.field input, .field select, .field textarea {
  width: 100%; border: 1px solid var(--border-strong); border-radius: var(--radius-lg);
  padding: 13px 16px; min-height: 48px; font-family: var(--font-body); font-size: 16px; color: var(--text);
  background: var(--surface-raised); outline: none; transition: border-color var(--dur-fast) var(--ease-warm);
}
.field textarea { min-height: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.form-error { background: color-mix(in srgb, var(--danger) 10%, transparent); border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent); color: var(--danger); border-radius: var(--radius-md); padding: 11px 14px; font-size: 14px; margin-bottom: 18px; }
.field-err { color: var(--danger); font-size: 13px; margin: 6px 2px 0; }
.auth-status:empty { display: none; }
.auth-status { margin-bottom: 16px; }

/* submit loading state */
.auth-submit { width: 100%; min-height: 48px; position: relative; }
.auth-submit__spin { display: none; }
.auth-submit.is-loading .auth-submit__label { visibility: hidden; }
.auth-submit.is-loading .auth-submit__spin {
  display: block; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--text-on-accent) 40%, transparent); border-top-color: var(--text-on-accent);
  animation: auth-spin .7s linear infinite;
}
@keyframes auth-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .auth-submit__spin { animation-duration: 1.4s; } }
.auth-sent { text-align: center; }

/* photo uploader (onboarding + profile modals + compose) */
.uploader { display: flex; gap: 16px; align-items: center; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: var(--radius-lg); background: var(--surface-raised); }
.uploader .ph-circ { width: 72px; height: 72px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 34px; flex: none; overflow: hidden; }
.uploader .ph-circ img { width: 100%; height: 100%; object-fit: cover; }
.uploader .tx b { display: block; font-size: 15px; }
.uploader .tx span { font-size: 13px; color: var(--text-faint); }
.uploader [data-upload-btn] { min-height: 44px; }
.upload-unavailable.uploader, .upload-unavailable .uploader { border-style: solid; opacity: 0.76; }
.upload-unavailable [data-upload-btn], .upload-unavailable.uploader [data-upload-btn] { opacity: 0.72; cursor: not-allowed; }

/* pet reveal / public card */
.reveal { text-align: center; max-width: min(420px, 100%); margin: 0 auto; }
.reveal h2 { font-size: clamp(24px, 7vw, 28px); margin: 6px 0 8px; }
.reveal .lead { margin: 0 auto 22px; }
.pcard { border-radius: var(--radius-xl); overflow: hidden; border: 1px solid var(--border); box-shadow: var(--shadow-lg-c); text-align: left; background: var(--surface-raised); view-transition-name: pet-card; }
.pcard .banner { height: 96px; position: relative; }
.pcard .av-wrap { padding: 0 18px; margin-top: -38px; }
.pcard .pa { border-radius: 50%; border: 4px solid var(--surface-raised); display: grid; place-items: center; color: #fff; }
.pcard .pa i { font-size: 38px; }
.pcard .info { padding: 8px 18px 18px; }
.pcard .nm { font-family: var(--font-display); font-weight: 700; font-size: 22px; display: flex; align-items: center; gap: 7px; }
.pcard .nm i { color: var(--accent-text); font-size: 18px; }
.pcard .hd { font-family: var(--font-mono); font-size: 13px; color: var(--text-faint); }
.pcard .chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.pcard .note { margin: 12px 0 0; font-size: 15px; color: var(--text); line-height: 1.5; }
.reveal-cta { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.reveal-cta .btn { min-height: 48px; }
@media (max-width: 360px) { .reveal-cta .btn { flex: 1 1 100%; } }

/* public pet page wrapper */
.pubpet { width: 100%; max-width: min(440px, 100%); }
.pubpet .owner-hint { text-align: center; font-size: 13px; color: var(--text-faint); margin-top: 16px; }
.pubpet .brandline { text-align: center; margin-top: 22px; }
.pubpet .brandline a { font-family: var(--font-display); font-weight: 700; color: var(--accent-text); }
