/* Komponenter efter håndbogens Design.md. Værdierne er taget derfra og ikke gættet. */

/* Montserrat hentes ikke: PWA'en er nødadgang og må ikke afhænge af URM (se Project.md). */
body {
  font-family: Montserrat, "Helvetica Neue", Arial, sans-serif;
  background: #f1f1f1;
  color: #222222;
}

.it34-content {
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

.it34-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 16px;
}

.it34-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
/* Design.md: IT34-logoet, border-radius 0. Lille, fordi PWA'en ikke har topbar. */
.it34-logo { width: 32px; height: 32px; border-radius: 0; flex: 0 0 auto; }

.it34-title {
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

/* Kontokort: navn og status på én linje. */
.it34-account-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.it34-account-head .it34-card-title { margin: 0; overflow-wrap: anywhere; }
.it34-account p { margin: 0; }
.it34-status {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}
.it34-status-ok { background: rgba(66, 153, 70, .14); color: #2f6e32; }

/* Fejlsøgning (kun dev og test): lille "i" nederst til højre, teksten foldes ud ved tryk. */
.it34-diagnostics { display: flex; flex-direction: column; align-items: flex-end; margin-top: 8px; }
.it34-diagnostics-text { margin: 4px 0 0; font-size: 12px; overflow-wrap: anywhere; text-align: right; }
.it34-diagnostics-text[hidden] { display: none; }

/* Servicebanner (Design.md → Topbar): miljøets navn, orange på dev, gul på test, aldrig på prod. */
.it34-env-banner {
  flex: 0 0 auto;
  height: 24px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
  color: #222222;
}
.it34-env-banner[hidden] { display: none; }
.it34-env-banner.is-dev { background: #e6942e; }
.it34-env-banner.is-test { background: #f2c200; }

/* Kort */
.it34-card {
  background: #ffffff;
  border: 1px solid #e6e6e6;
  border-radius: 8px;
  padding: 24px;
  box-shadow: 0 1px 2px rgba(16, 32, 43, .06), 0 4px 12px rgba(16, 32, 43, .06);
  margin-bottom: 16px;
}
.it34-card-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 12px;
}

/* Knap */
.it34-button-primary {
  background: #0073a9;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  padding: 0 24px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.it34-button-medium { height: 32px; font-size: 14px; }
.it34-button-secondary {
  background: #e6e6e6;
  color: #222222;
  border: none;
  border-radius: 4px;
  padding: 0 24px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: normal;
}
.it34-button-secondary:disabled { color: #9f9f9f; }
.it34-button-secondary:focus-visible { outline: 2px solid #222222; outline-offset: 2px; }

.it34-muted { color: #666666; font-size: 14px; }
.it34-empty { color: #666666; font-size: 14px; margin: 0; }

.it34-push { margin-bottom: 16px; }
.it34-push p { margin-bottom: 8px; }

/* Afventende VPN-anmodning */
.it34-request { border-top: 1px solid #e6e6e6; padding-top: 16px; margin-top: 16px; }
.it34-request:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.it34-request-title { font-size: 16px; font-weight: 600; margin: 0 0 8px; }
.it34-request-meta { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: 14px; margin: 0 0 12px; }
.it34-request-meta dt { font-weight: 500; color: #666666; }
.it34-request-meta dd { margin: 0; }
.it34-request-actions { display: flex; gap: 8px; flex-wrap: wrap; }
/* Lille "?" efter stedet med kilde og licens (DB-IP, CC BY 4.0). */
.it34-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: 1px solid #666666;
  border-radius: 50%;
  background: transparent;
  color: #666666;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  vertical-align: text-top;
  cursor: help;
}
/* Usynligt større trykområde på telefoner. */
@media (pointer: coarse) {
  .it34-info { position: relative; }
  .it34-info::after { content: ""; position: absolute; inset: -14px; }
}
.it34-info:focus-visible { outline: 2px solid #222222; outline-offset: 2px; }
.it34-info-text { display: block; margin-top: 4px; font-size: 12px; color: #666666; }
.it34-info-text[hidden] { display: none; }
.it34-info-text a { color: #0073a9; }
/* Større berøringsflade på telefoner (WCAG 2.2, målstørrelse). */
@media (pointer: coarse) {
  .it34-button-medium { height: 44px; min-width: 120px; }
}
/* Mobil-layout (Design.md, bilag: under 992px): knapperne stables lodret i fuld bredde, primær øverst. */
@media (max-width: 991.98px) {
  .it34-request-actions { flex-direction: column; }
  .it34-content .it34-button-primary,
  .it34-content .it34-button-secondary { width: 100%; }
}
.it34-button-primary:disabled { color: #9f9f9f; }
.it34-button-primary:focus-visible { outline: 2px solid #222222; outline-offset: 2px; }

/* Inputfelt, small: label, felt, hjælpetekst, fejltekst. Blokken har fast højde, så intet flytter sig ved fejl. */
.it34-input { display: flex; flex-direction: column; margin-bottom: 16px; }
.it34-input label { font-size: 12px; line-height: 12px; font-weight: 500; color: #222222; margin-bottom: 8px; }
.it34-input-box { position: relative; }
.it34-input input {
  width: 100%;
  height: 32px;
  border: 1px solid #666666;
  border-radius: 4px;
  background: transparent;
  padding: 0 28px 0 8px;
  font-size: 16px; /* 16px forhindrer iOS i at zoome ved fokus */
  line-height: 20px;
  color: rgba(0, 0, 0, .87);
}
@media (min-width: 768px) {
  .it34-input input { font-size: 14px; }
}
.it34-input input:focus-visible { outline: 2px solid #0073a9; outline-offset: 1px; }
.it34-input-help,
.it34-input-error { font-size: 14px; line-height: 14px; min-height: 14px; margin: 4px 0 0; }
.it34-input-help { color: #666666; }
.it34-input-error { color: #b30000; }

.it34-input-icon {
  position: absolute;
  right: 4px;
  top: 0;
  width: 24px;
  height: 32px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 16px 16px;
}
.it34-input-invalid input { border-color: #b30000; }
.it34-input-invalid .it34-input-icon {
  /* Advarselstrekant: streg, ikke fyldt (Design.md → Fejl vises tre steder). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23b30000' stroke-width='1.4' stroke-linejoin='round'%3E%3Cpath d='M8 1.8 15 14H1z'/%3E%3Cpath d='M8 6.2v3.6M8 11.6v.4'/%3E%3C/svg%3E");
}

/* Besked: tonet baggrund, statusfarve, ikon og tekst */
.it34-message {
  border-radius: 4px;
  padding: 12px 16px 12px 40px;
  margin-bottom: 16px;
  position: relative;
  font-size: 14px;
}
.it34-message::before {
  position: absolute;
  left: 14px;
  top: 11px;
  font-weight: 700;
}
.it34-message-info { background: rgba(0, 115, 169, .12); color: #00577f; }
.it34-message-info::before { content: "i"; }
.it34-message-success { background: rgba(66, 153, 70, .14); color: #2f6e32; }
.it34-message-success::before { content: "\2713"; }
.it34-message-warning { background: rgba(230, 148, 46, .16); color: #8a520c; }
.it34-message-warning::before { content: "!"; }
.it34-message-error { background: rgba(179, 0, 0, .10); color: #b30000; }
.it34-message-error::before { content: "\00D7"; }
