.edc-esim-checker,
.edc-esim-checker * { box-sizing: border-box; }

/* Brug altid sidens/temaets eksisterende font. */
.edc-esim-checker,
.edc-esim-checker button,
.edc-esim-checker input,
.edc-esim-checker code {
  font-family: inherit !important;
}

.edc-esim-checker {
  --edc-ink: #111827;
  --edc-muted: #667085;
  --edc-line: #e5e7eb;
  --edc-soft: #f8fafc;
  --edc-blue: #251cca;
  --edc-blue-dark: #1d16a8;
  --edc-green: #087443;
  --edc-green-bg: #eaf8f0;
  --edc-amber: #9a6700;
  --edc-amber-bg: #fff6d8;
  font: inherit;
}

.edc-trigger {
  appearance: none;
  border: 1px solid #d9dde5;
  background: #fff;
  color: var(--edc-ink);
  border-radius: 12px;
  min-height: 48px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.25;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 14px rgba(16,24,40,.05);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.edc-trigger:hover {
  color: var(--edc-ink) !important;
  border-color: #b8bfcc;
  box-shadow: 0 6px 20px rgba(16,24,40,.09);
  transform: translateY(-1px);
}

.edc-trigger:focus-visible,
.edc-search:focus-visible,
.edc-chip:focus-visible,
.edc-close:focus-visible,
.edc-clear:focus-visible {
  outline: 3px solid rgba(37,28,202,.22);
  outline-offset: 2px;
}

.edc-trigger__icon {
  width: 31px;
  height: 31px;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #efefff;
  color: var(--edc-blue);
  flex: 0 0 auto;
}

.edc-trigger__icon svg,
.edc-search-icon,
.edc-panel__footer svg { fill: currentColor; }

.edc-trigger__arrow { color: #8a94a6; margin-left: 2px; font-size: 17px; }

.edc-modal[hidden] { display: none !important; }
.edc-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 20px;
}

.edc-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity .16s ease;
}

.edc-panel {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: min(760px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(255,255,255,.75);
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(15,23,42,.28);
  opacity: 0;
  transform: translateY(12px) scale(.985);
  transition: opacity .16s ease, transform .16s ease;
}

.edc-modal.is-open .edc-modal__backdrop { opacity: 1; }
.edc-modal.is-open .edc-panel { opacity: 1; transform: translateY(0) scale(1); }
.edc-modal-open { overflow: hidden !important; }

.edc-panel__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding: 24px 24px 16px;
}

.edc-eyebrow {
  display: block;
  margin-bottom: 5px;
  color: var(--edc-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.edc-panel__header h2 {
  margin: 0 0 5px !important;
  padding: 0 !important;
  color: var(--edc-ink);
  font: inherit;
  font-size: clamp(21px, 3vw, 27px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.025em;
}

.edc-panel__header p {
  margin: 0 !important;
  color: var(--edc-muted);
  font-size: 14px;
  line-height: 1.45;
}

.edc-close {
  appearance: none;
  position: relative;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  flex: 0 0 auto;
  padding: 0 !important;
  border: 1px solid var(--edc-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  color: #344054 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none !important;
}
/* CSS-kryds i stedet for SVG, så temaets SVG-regler ikke kan skjule luk-ikonet. */
.edc-close::before,
.edc-close::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform-origin: center;
}
.edc-close::before { transform: translate(-50%, -50%) rotate(45deg); }
.edc-close::after  { transform: translate(-50%, -50%) rotate(-45deg); }
.edc-close:hover {
  background: #f4f6f8 !important;
  border-color: #cbd2dc !important;
  color: #101828 !important;
}
.edc-close:active { transform: scale(.96); }

.edc-panel__header,
.edc-search-wrap,
.edc-brand-filters,
.edc-meta,
.edc-panel__footer {
  flex-shrink: 0;
}

.edc-search-wrap { position: relative; margin: 0 24px 12px; }
.edc-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #8b95a7;
  pointer-events: none;
}

.edc-search {
  appearance: none;
  width: 100%;
  min-height: 50px;
  margin: 0 !important;
  padding: 11px 58px 11px 43px !important;
  border: 1px solid #ccd2dc !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--edc-ink) !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.03) !important;
  font: inherit !important;
  font-size: 15px !important;
  line-height: 1.4 !important;
}
.edc-search::placeholder { color: #98a2b3; }
.edc-search:focus { border-color: var(--edc-blue) !important; }
.edc-search::-webkit-search-cancel-button { display: none; }

.edc-clear {
  position: absolute;
  right: 9px;
  top: 50%;
  transform: translateY(-50%);
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--edc-blue);
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  padding: 8px;
}

.edc-brand-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  overflow: visible;
  padding: 0 24px 13px;
  flex: 0 0 auto;
}
.edc-chip {
  appearance: none;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: auto !important;
  min-width: 0 !important;
  max-width: 100%;
  height: auto !important;
  min-height: 30px;
  margin: 0 !important;
  white-space: nowrap;
  border: 1px solid #e1e5eb !important;
  background: #fff !important;
  color: #4b5563 !important;
  border-radius: 999px !important;
  padding: 6px 11px !important;
  font: inherit !important;
  font-size: 12px !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none !important;
}
.edc-chip:hover { border-color: #c5cbd5 !important; color: var(--edc-ink) !important; }
.edc-chip.is-active { background: #eeedff !important; border-color: #d8d5ff !important; color: var(--edc-blue) !important; }

.edc-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 24px;
  border-top: 1px solid #edf0f4;
  border-bottom: 1px solid #edf0f4;
  background: #fafbfc;
  color: #7a8494;
  font-size: 11px;
  font-weight: 650;
}

.edc-results {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 8px 14px;
}

.edc-item {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr);
  gap: 11px;
  align-items: start;
  padding: 11px 10px;
  border-radius: 12px;
  color: var(--edc-ink) !important;
  background: transparent;
  transition: background-color .14s ease;
}
.edc-item + .edc-item { border-top: 1px solid #f0f2f5; }
/* Rækkerne er ikke klikbare: hover er bevidst diskret og ændrer aldrig tekstfarven. */
.edc-item:hover {
  background: #f7f8fa !important;
  color: var(--edc-ink) !important;
}
.edc-item:hover .edc-item__top strong { color: #111827 !important; }
.edc-item:hover .edc-brand-name,
.edc-item:hover small { color: #667085 !important; }
.edc-item:hover .edc-status.is-supported { color: var(--edc-green) !important; }
.edc-item:hover .edc-status.is-conditional { color: var(--edc-amber) !important; }
.edc-item[hidden] { display: none !important; }

.edc-brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f3f6;
  color: #344054;
  font-size: 13px;
  font-weight: 850;
}

.edc-item__body { min-width: 0; }
.edc-item__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.edc-item__top strong {
  color: var(--edc-ink) !important;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 750;
}
.edc-brand-name { display: block; margin-top: 1px; color: #667085 !important; font-size: 11px; font-weight: 650; }
.edc-item small { display: block; margin-top: 4px; color: #667085 !important; font-size: 10.5px; line-height: 1.35; }

.edc-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 10.5px;
  line-height: 1;
  font-weight: 850;
  white-space: nowrap;
}
.edc-status.is-supported { background: var(--edc-green-bg) !important; color: var(--edc-green) !important; }
.edc-status.is-conditional { background: var(--edc-amber-bg) !important; color: var(--edc-amber) !important; }

.edc-empty {
  margin: 24px;
  padding: 24px;
  text-align: center;
  border: 1px dashed #d5dae2;
  border-radius: 14px;
  background: #fbfcfd;
}
.edc-empty__icon {
  width: 38px;
  height: 38px;
  margin: 0 auto 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f0efff;
  color: var(--edc-blue);
  font-weight: 900;
}
.edc-empty strong { display: block; color: var(--edc-ink); font-size: 14px; }
.edc-empty p { margin: 6px 0 0 !important; color: var(--edc-muted); font-size: 12px; line-height: 1.5; }
.edc-empty code { padding: 1px 5px; border-radius: 4px; background: #eef0f3; color: #344054; }

.edc-panel__footer {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 13px 24px 16px;
  border-top: 1px solid #edf0f4;
  background: #fbfcfd;
  color: #667085;
  font-size: 10.5px;
  line-height: 1.45;
}
.edc-panel__footer svg { flex: 0 0 auto; margin-top: 1px; color: #8a94a6; }

@media (max-width: 640px) {
  .edc-trigger { width: 100%; justify-content: flex-start; border-radius: 10px; }
  .edc-trigger__arrow { margin-left: auto; }
  .edc-modal { padding: 0; align-items: end; }
  .edc-panel {
    width: 100%;
    max-height: min(88svh, 760px);
    border-radius: 20px 20px 0 0;
    transform: translateY(20px);
  }
  .edc-panel__header { padding: 18px 16px 13px; gap: 12px; }
  .edc-close { width: 40px; height: 40px; min-width: 40px; min-height: 40px; }
  .edc-panel__header p { font-size: 12.5px; }
  .edc-search-wrap { margin: 0 16px 10px; }
  .edc-search { font-size: 16px !important; }
  .edc-brand-filters { padding: 0 16px 11px; }
  .edc-meta { padding: 8px 16px; }
  .edc-results { padding: 5px 7px 10px; }
  .edc-item { padding: 10px 8px; grid-template-columns: 34px minmax(0,1fr); gap: 9px; }
  .edc-brand-mark { width: 32px; height: 32px; border-radius: 9px; }
  .edc-item__top strong { font-size: 13.5px; }
  .edc-item small { display: none; }
  .edc-status { font-size: 10px; padding: 5px 7px; }
  .edc-panel__footer { padding: 11px 16px calc(13px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .edc-modal__backdrop,
  .edc-panel,
  .edc-trigger { transition: none !important; }
}
