/*
 * El-Prisen Extras – Styles
 * Author box + Quick Answer panel
 * Arver designtokens fra temaet (:root).
 */

/* ── FÆLLES HJÆLP ────────────────────────────────────────── */
.ep-author-box *,
.ep-qa * {
  box-sizing: border-box;
}


/* ══════════════════════════════════════════════════════════
   AUTHOR BOX
══════════════════════════════════════════════════════════ */

.ep-author-box {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-top: 64px;
  padding: 28px 28px 26px;
  border: 1px solid var(--border, #e4e4de);
  border-radius: 10px;
  background: var(--surface, #ffffff);
}

/* Avatar */
.ep-author-avatar {
  flex-shrink: 0;
}

.ep-author-avatar__img {
  display: block;
  width: 72px !important;
  height: 72px !important;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border, #e4e4de);
}

/* Body */
.ep-author-body {
  flex: 1;
  min-width: 0;
}

.ep-author-kicker {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-light, #9a9a8e);
  margin: 0 0 5px;
  line-height: 1;
}

.ep-author-name {
  font-family: 'Lora', Georgia, serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink, #181815);
  margin: 0 0 10px;
  line-height: 1.3;
}

.ep-author-bio {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13.5px;
  color: var(--ink-mid, #56564e);
  line-height: 1.65;
  margin: 0 0 16px;
}

.ep-author-bio p {
  margin: 0 0 10px;
  max-width: 58ch;
}

.ep-author-bio p:last-child {
  margin-bottom: 0;
}

/* Links */
.ep-author-links {
  list-style: none;
  margin: 0 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ep-author-link {
  display: inline-flex;
  align-items: center;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink, #181815) !important;
  text-decoration: none !important;
  background: var(--bg, #f9f9f7);
  border: 1.5px solid var(--border, #e4e4de);
  border-radius: 6px;
  padding: 6px 13px;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
  white-space: nowrap;
}

/* Pil via CSS – undgår konflikter med temaets a[target="_blank"]::after */
.ep-author-link::after {
  content: '↗' !important;
  margin-left: 5px;
  font-size: 11px;
  opacity: 0.45;
  transition: opacity 0.15s;
}

.ep-author-link:hover {
  color: var(--ink, #181815) !important;
  border-color: var(--ink-mid, #56564e);
  background: var(--surface, #fff);
  text-decoration: none !important;
}

.ep-author-link:hover::after {
  opacity: 0.75;
}


/* Dato-sektion */
.ep-author-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border, #e4e4de);
}

.ep-author-dates__item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.ep-author-dates__label {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink-light, #9a9a8e);
  white-space: nowrap;
}

.ep-author-dates__icon {
  flex-shrink: 0;
  color: var(--ink-light, #9a9a8e);
}

.ep-author-dates__value {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mid, #56564e);
  white-space: nowrap;
}

/* "Senest redigeret" fremhæves en smule */
.ep-author-dates__item--modified .ep-author-dates__value {
  color: var(--green, #2d6a4f);
}

.ep-author-dates__item--modified .ep-author-dates__label,
.ep-author-dates__item--modified .ep-author-dates__icon {
  color: var(--green, #2d6a4f);
  opacity: 0.75;
}
@media (max-width: 520px) {
  .ep-author-box {
    flex-direction: column;
    gap: 16px;
    padding: 22px 18px 20px;
  }

  .ep-author-avatar__img {
    width: 56px !important;
    height: 56px !important;
  }
}


/* ══════════════════════════════════════════════════════════
   QUICK ANSWER PANEL
══════════════════════════════════════════════════════════ */

.ep-qa {
  margin: 0 0 36px;
  padding: 18px 22px 18px 20px;
  border: 1px solid var(--border, #e4e4de);
  border-left: 3px solid var(--green, #2d6a4f);
  border-radius: 0 8px 8px 0;
  background: rgba(45, 106, 79, 0.032);
}

/* Kicker-linje (ikon + label) */
.ep-qa__kicker {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--green, #2d6a4f);
  margin: 0 0 10px;
  line-height: 1;
}

.ep-qa__icon {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--green, #2d6a4f);
  opacity: 0.85;
}

/* Brødtekst */
.ep-qa__body {
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink, #181815);
  line-height: 1.72;
}

.ep-qa__body p {
  margin: 0 0 10px;
  max-width: 62ch;
}

.ep-qa__body p:last-child {
  margin-bottom: 0;
}

.ep-qa__body strong {
  font-weight: 500;
  color: var(--ink, #181815);
}

.ep-qa__body a {
  color: var(--green, #2d6a4f);
  text-decoration: underline;
  text-decoration-color: rgba(45, 106, 79, 0.35);
  text-underline-offset: 2px;
  transition: text-decoration-color 0.15s;
}

.ep-qa__body a:hover {
  text-decoration-color: var(--green, #2d6a4f);
}

.ep-qa__body ul,
.ep-qa__body ol {
  padding-left: 1.4rem;
  margin: 0 0 10px;
}

.ep-qa__body li {
  margin-bottom: 5px;
}

.ep-qa__body li:last-child {
  margin-bottom: 0;
}


/* ══════════════════════════════════════════════════════════
   TABLE OF CONTENTS
══════════════════════════════════════════════════════════ */

/* Breadcrumb-baren gøres til flex-row så TOC kan leve til højre */
.breadcrumbs--has-toc {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* TOC-wrapper – enten i breadcrumbs eller inline i content */
.ep-toc {
  position: relative;
  flex-shrink: 0;
}

/* Inline-fallback (ingen breadcrumbs): vis som blok øverst */
.entry-content .ep-toc {
  display: inline-block;
  margin-bottom: 28px;
}

/* ── Knappen ──────────────────────────────────────────────── */
.ep-toc__toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 9px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e4e4de);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-mid, #56564e);
  white-space: nowrap;
  transition: border-color 0.15s, color 0.15s, background 0.15s;
  line-height: 1;
}

.ep-toc__toggle:hover {
  border-color: var(--ink-light, #9a9a8e);
  color: var(--ink, #181815);
}

.ep-toc--open .ep-toc__toggle {
  border-color: var(--ink-light, #9a9a8e);
  color: var(--ink, #181815);
  background: var(--bg, #f9f9f7);
}

.ep-toc__icon {
  flex-shrink: 0;
  color: var(--ink-light, #9a9a8e);
}

.ep-toc__chevron {
  flex-shrink: 0;
  color: var(--ink-light, #9a9a8e);
  transition: transform 0.18s ease;
  margin-left: 1px;
}

.ep-toc--open .ep-toc__chevron {
  transform: rotate(180deg);
}

/* ── Dropdown-panel ───────────────────────────────────────── */
.ep-toc__list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 50;
  list-style: none;
  margin: 0;
  padding: 8px 0 10px;
  min-width: 220px;
  max-width: 320px;
  background: var(--surface, #fff);
  border: 1px solid var(--border, #e4e4de);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(24,24,21,0.08), 0 1px 4px rgba(24,24,21,0.04);
  counter-reset: toc-counter;
}

/* Peg fra panel op mod knap */
.ep-toc__list::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 14px;
  width: 8px;
  height: 8px;
  background: var(--surface, #fff);
  border-left: 1px solid var(--border, #e4e4de);
  border-top: 1px solid var(--border, #e4e4de);
  transform: rotate(45deg);
}

.ep-toc__item {
  counter-increment: toc-counter;
}

.ep-toc__link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 6px 16px;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  color: var(--ink-mid, #56564e);
  text-decoration: none;
  line-height: 1.4;
  transition: background 0.1s, color 0.1s;
}

.ep-toc__link::before {
  content: counter(toc-counter);
  font-size: 10.5px;
  font-weight: 500;
  color: var(--ink-light, #9a9a8e);
  min-width: 14px;
  flex-shrink: 0;
}

.ep-toc__link:hover {
  background: rgba(0,0,0,0.03);
  color: var(--ink, #181815);
  text-decoration: none;
}

.ep-toc__link:hover::before {
  color: var(--green, #2d6a4f);
}

/* h3 indrykning */
.ep-toc__item--h3 {
  position: relative;
}

.ep-toc__item--h3 .ep-toc__link {
  padding-left: 38px;
  font-size: 12.5px;
}

.ep-toc__item--h3 .ep-toc__link::before {
  content: '–';
  position: absolute;
  left: 27px;
  color: var(--border, #e4e4de);
  min-width: auto;
}
