/* Thought For Food Archive – PDF-bibliotek. Farver og fonte arves fra style.css (:root). */
.tff-lib, .tff-lib * { box-sizing: border-box; }
.tff-lib { font-family: var(--tff-font-body, inherit); color: var(--tff-navy, #1B2140); }
.tff-lib [hidden] { display: none !important; }
.tff-lib-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* værktøjslinje */
.tff-lib-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tff-lib-search { flex: 1 1 280px; position: relative; }
.tff-lib-search svg { position: absolute; left: 16px; top: 15px; color: var(--tff-muted, #5E6380); }
.tff-lib .tff-lib-search input,
.tff-lib select {
  height: 50px;
  border: 1.5px solid var(--tff-line, #E4E2EE);
  border-radius: 999px;
  font: inherit;
  font-size: 16px;
  color: var(--tff-navy, #1B2140);
  background: #fff;
  margin: 0;
}
.tff-lib .tff-lib-search input { width: 100%; padding: 0 20px 0 46px; }
.tff-lib select { padding: 0 16px; cursor: pointer; }
.tff-lib input:focus,
.tff-lib select:focus,
.tff-lib button:focus-visible { outline: 2px solid var(--tff-purple, #651FFF); outline-offset: 2px; }
.tff-lib-view { display: inline-flex; border: 1.5px solid var(--tff-line, #E4E2EE); border-radius: 999px; overflow: hidden; }
.tff-lib-view button { height: 47px; width: 52px; border: 0; background: #fff; color: var(--tff-muted, #5E6380); cursor: pointer; display: grid; place-items: center; }
.tff-lib-view button[aria-pressed="true"] { background: var(--tff-purple, #651FFF); color: #fff; }

/* kategori-chips */
.tff-lib-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 24px 0 0; }
.tff-lib-chip {
  border: 1.5px solid var(--tff-line, #E4E2EE);
  background: #fff;
  color: var(--tff-navy, #1B2140);
  border-radius: 999px;
  padding: 0 18px;
  min-height: 42px;
  font-family: var(--tff-font-heading, inherit);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
}
.tff-lib-chip:hover { border-color: var(--tff-purple, #651FFF); }
.tff-lib-chip[aria-pressed="true"] { background: var(--tff-purple, #651FFF); border-color: var(--tff-purple, #651FFF); color: #fff; }
.tff-lib .tff-lib-count { color: var(--tff-muted, #5E6380); font-size: 14px; margin: 18px 0 24px; padding: 0; }

/* gitter */
.tff-lib .tff-lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 32px 24px; list-style: none; margin: 0; padding: 0; }
.tff-lib .tff-lib-card { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.tff-lib-card a.tff-lib-main { display: flex; flex-direction: column; flex: 1; text-decoration: none !important; color: inherit !important; }
.tff-lib-card a.tff-lib-video {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 10px 2px 0;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--tff-purple, #651FFF) !important;
  text-decoration: none !important;
}
.tff-lib-card a.tff-lib-video:hover { text-decoration: underline !important; text-underline-offset: 3px; }
.tff-lib-pdf svg { vertical-align: -1px; }
.tff-lib-cover {
  aspect-ratio: 3 / 4;
  border-radius: 6px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
  box-shadow: 0 8px 20px rgba(27,33,64,.08);
}
.tff-lib-cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.tff-lib-card a:hover .tff-lib-cover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(27,33,64,.16); }
.tff-lib-cover-top { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.tff-lib-cover-title {
  font-family: var(--tff-font-heading, inherit);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 800;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tff-lib-cover-foot { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 700; }
.tff-lib-pdf { border: 1.5px solid currentColor; border-radius: 4px; padding: 1px 6px; letter-spacing: .06em; }
.tff-lib-meta { display: block; padding: 14px 2px 0; }
.tff-lib-title { display: block; font-family: var(--tff-font-heading, inherit); font-size: 17px; line-height: 1.3; font-weight: 800; }
.tff-lib-card a:hover .tff-lib-title { color: var(--tff-purple, #651FFF); }
.tff-lib-sub { display: block; margin-top: 4px; font-size: 14px; color: var(--tff-muted, #5E6380); }

/* forsidefarver uden billede */
.tff-lib-cover.v0 { background: #651FFF; color: #fff; }
.tff-lib-cover.v1 { background: #F7E4A6; color: #4A12C4; }
.tff-lib-cover.v2 { background: #1B2140; color: #fff; }
.tff-lib-cover.v3 { background: #F3EFFF; color: #4A12C4; }
.tff-lib-cover.v1 .tff-lib-cover-top,
.tff-lib-cover.v3 .tff-lib-cover-top { color: #651FFF; }
.tff-lib-cover.has-color .tff-lib-cover-top { opacity: .8; }
.tff-lib-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 8px; vertical-align: 0; box-shadow: inset 0 0 0 1px rgba(27,33,64,.15); }
.tff-lib-chip[aria-pressed="true"] .tff-lib-dot { box-shadow: 0 0 0 1.5px currentColor; }

/* listevisning */
.tff-lib .tff-lib-grid.is-list { grid-template-columns: 1fr; gap: 0; border-top: 1px solid var(--tff-line, #E4E2EE); }
.tff-lib .is-list .tff-lib-card { flex-direction: row; align-items: center; border-bottom: 1px solid var(--tff-line, #E4E2EE); }
.is-list .tff-lib-card a.tff-lib-main { flex-direction: row; align-items: center; gap: 20px; padding: 16px 8px; min-width: 0; }
.is-list .tff-lib-card:hover { background: #F8F6FF; }
.is-list .tff-lib-card a.tff-lib-video { margin: 0 8px 0 0; align-self: center; white-space: nowrap; }
.is-list .tff-lib-cover { width: 48px; flex: 0 0 48px; padding: 0; border-radius: 4px; box-shadow: none; transform: none !important; }
.is-list .tff-lib-cover > span { display: none; }
.is-list .tff-lib-meta { padding: 0; flex: 1; min-width: 0; }
.tff-lib-open { display: none; align-items: center; gap: 6px; font-weight: 800; color: var(--tff-purple, #651FFF); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; white-space: nowrap; }
.is-list .tff-lib-open { display: inline-flex; }

.tff-lib-more {
  display: block;
  margin: 48px auto 0;
  padding: 14px 24px;
  border-radius: 999px;
  border: 2px solid var(--tff-purple, #651FFF);
  background: var(--tff-purple, #651FFF);
  color: #fff;
  font-family: var(--tff-font-heading, inherit);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  cursor: pointer;
}
.tff-lib-more:hover { background: var(--tff-purple-dark, #4F12D6); border-color: var(--tff-purple-dark, #4F12D6); }
.tff-lib .tff-lib-empty { text-align: center; padding: 64px 0; color: var(--tff-muted, #5E6380); }

@media (max-width: 600px) {
  .tff-lib .tff-lib-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 14px; }
  .tff-lib-cover { padding: 14px; }
  .tff-lib-cover-title { font-size: 16px; }
  .tff-lib-title { font-size: 15px; }
  .is-list .tff-lib-open { display: none; }
}
