/* ==========================================================================
   Milli – "Anmod om profil" (tilmeldingsside og takkeside)
   Eget stilark, så designet ikke påvirker resten af hjemmesiden.
   Alle klasser starter med .ap- . Overført fra designet
   "Milli – opskrivning for dyreejere".
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-latin.woff2') format('woff2');
}

.ap-body {
  margin: 0;
  background: #F7EEDD;
  color: #17191D;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ap-body *,
.ap-body *::before,
.ap-body *::after { box-sizing: border-box; }

.ap-body :focus-visible {
  outline: 3px solid #17191D;
  outline-offset: 3px;
}

.ap-skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 10;
  background: #17191D;
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: 0 0 12px 0;
  font-weight: 600;
  text-decoration: none;
}
.ap-skip:focus { left: 0; }

.ap-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------- Header ---------- */

.ap-header { padding: 18px 4px 4px; }

.ap-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: #17191D;
  text-decoration: none;
}
.ap-brand img { display: block; width: 39px; height: 40px; }
.ap-brand span {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ---------- Tilmeldingsside ---------- */

.ap-main {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: stretch;
}

.ap-hero {
  flex: 1 1 380px;
  min-width: 0;
  background: #3A74C8;
  color: #FFFFFF;
  border-radius: 28px;
  padding: 28px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.ap-badge {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.ap-hero-title {
  margin: 4px 0 0;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.ap-hero-lead {
  margin: 0;
  max-width: 420px;
  font-size: 17px;
  line-height: 1.5;
  font-weight: 500;
}

.ap-hero-photo {
  flex-grow: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-top: 12px;
}
.ap-hero-photo img {
  display: block;
  width: 100%;
  max-width: 300px;
  height: 240px;
  object-fit: cover;
  object-position: 50% 70%;
  border-radius: 150px 150px 0 0;
}

.ap-card {
  flex: 1 1 360px;
  min-width: 0;
  background: #FFFFFF;
  border-radius: 28px;
  padding: 28px 24px;
  box-shadow: 0 1px 2px rgba(23, 25, 29, 0.04), 0 12px 32px rgba(120, 90, 40, 0.08);
}

.ap-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.ap-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ap-field label {
  font-size: 15px;
  font-weight: 700;
}
.ap-field input {
  height: 52px;
  border: 1.5px solid #DCD2C1;
  border-radius: 14px;
  background: #FFFCF7;
  padding: 0 16px;
  font: inherit;
  font-size: 16px;
  color: #17191D;
  width: 100%;
}
.ap-field input::placeholder { color: #6B6F76; }
.ap-field input:focus-visible {
  outline: 3px solid #17191D;
  outline-offset: 2px;
  border-color: #3A74C8;
}
.ap-field input[aria-invalid="true"] {
  border-color: #B3261E;
  background: #FFF8F7;
}
.ap-field-error {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  font-weight: 600;
  color: #B3261E;
}

.ap-alert {
  margin: 0;
  border: 1.5px solid #B3261E;
  border-radius: 14px;
  background: #FDECEA;
  padding: 14px 16px;
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 600;
  color: #7A1712;
}
.ap-alert a { color: inherit; }
.ap-alert:focus-visible { outline-offset: 3px; }
.ap-alert--static { margin-top: 4px; }

/* Spam-fælde (honeypot): uden for skærmen, ikke i tabrækkefølgen */
.ap-trap {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ---------- Knap ---------- */

.ap-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  margin-top: 6px;
  padding: 0 28px;
  border: 0;
  border-radius: 16px;
  background: #3A74C8;
  color: #FFFFFF;
  font: inherit;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(58, 116, 200, 0.28);
}
.ap-button:hover { background: #2F66B5; color: #FFFFFF; }
.ap-button--link { margin-top: 12px; }

.ap-button .ap-spinner { display: none; }
.ap-button[aria-disabled="true"] {
  cursor: progress;
  background: #3A74C8;
  opacity: 0.88;
}
.ap-button[aria-disabled="true"] .ap-button-arrow { display: none; }
.ap-button[aria-disabled="true"] .ap-spinner { display: inline-block; }

.ap-spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: ap-spin 0.8s linear infinite;
}
@keyframes ap-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .ap-spinner { animation: none; border-top-color: rgba(255, 255, 255, 0.4); border-right-color: #FFFFFF; }
}

.ap-note {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #F7EEDD;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.45;
  color: #4A4F57;
}
.ap-note svg { flex-shrink: 0; margin-top: 1px; }

/* ---------- Footer ---------- */

.ap-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 8px 4px 0;
  font-size: 13px;
  color: #5C6169;
}
.ap-footer a {
  color: #2F5F9F;
  font-weight: 600;
  text-decoration: none;
}
.ap-footer a:hover { text-decoration: underline; }

/* ---------- Takkeside ---------- */

.ap-page--tak {
  min-height: 100vh;
  padding-bottom: 28px;
  justify-content: center;
}

.ap-tak-wrap {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding-top: 40px;
}

.ap-tak-card {
  background: #FFFFFF;
  border-radius: 28px;
  padding: 48px 28px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
  box-shadow: 0 1px 2px rgba(23, 25, 29, 0.04), 0 12px 32px rgba(120, 90, 40, 0.08);
}
.ap-tak-card img { display: block; width: 94px; height: 96px; }

.ap-tak-title {
  margin: 8px 0 0;
  max-width: 440px;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.035em;
}
.ap-tak-lead {
  margin: 0;
  max-width: 400px;
  font-size: 18px;
  line-height: 1.5;
  font-weight: 500;
  color: #3E434B;
}

.ap-footer--tak { padding: 0 4px; }

@media (max-width: 480px) {
  .ap-button--link { width: 100%; }
}
