:root {
  --pol-bg: #eef5ff;
  --pol-surface: #ffffff;
  --pol-border: #d8e3f3;
  --pol-heading: #16324f;
  --pol-text: #48627d;
  --pol-muted: #6d8399;
  --pol-accent: #0d6efd;
  --pol-accent-soft: rgba(13, 110, 253, 0.1);
  --pol-warm: #f59f00;
  --pol-danger: #cf3d4e;
  --pol-shadow: 0 16px 34px rgba(22, 50, 79, 0.08);
}

.pol-shell {
  background: linear-gradient(180deg, #f7fbff 0%, #eef4fd 100%);
  border: 1px solid var(--pol-border);
  border-radius: 22px;
}

.pol-shell .card {
  border: 1px solid var(--pol-border);
  border-radius: 18px;
  background: var(--pol-surface);
  box-shadow: var(--pol-shadow);
}

.pol-shell .card-header {
  background: linear-gradient(180deg, #fbfdff 0%, #edf3fb 100%);
  border-bottom: 1px solid var(--pol-border);
}

/* The .pol-hero-*, .pol-pill-* and .pol-panel-header rules that stood here went
   with the markup that used them: pol_overview.html's four panels render the
   shared .panel-head (core_data/css/panel-head.css) now, and no template in the
   app emitted a pol-hero or a pol-pill any more. .pol-eyebrow and
   .pol-panel-title stay — demokrati.html still uses both. */

.pol-eyebrow {
  display: inline-block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--pol-muted);
}

.pol-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.pol-panel-title {
  display: flex;
  align-items: center;
  color: var(--pol-heading);
  font-weight: 800;
}

.pol-panel-title i {
  color: var(--pol-accent);
}

/* Still the tour's anchor for the regional panel's tab row; the segmented-control
   look comes from .feed-tabs / .feed-tab in core_data/css/panel-head.css, which
   replaced the .nav-feedtab / .nav-underline pills this file used to define. */
.pol-panel-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pol-video-body,
.pol-docs-body,
.pol-panel > .card-body {
  flex: 1;
  min-height: 0;
}

/* background-color, not the `background` shorthand: the shorthand reset
   background-image, which is where Bootstrap draws .form-select's caret — every
   select in the shell rendered without its arrow. */
.pol-shell .form-select,
.pol-shell .dropdown-toggle {
  border-radius: 12px;
  border: 1px solid var(--pol-border);
  background-color: #fff;
  color: #304d68;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(22, 50, 79, 0.05);
}

/* ── Docs panel filters ────────────────────────────────────────────────────
   Pills in the panel's toolbar, sized and toned like .feed-tab next door so the
   four panels read as one set. The <label> is the pill; the native <select>
   inside it keeps the keyboard and screen-reader behaviour for free. */
.pol-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.pol-filter {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  border: 1px solid var(--brand-color-border, rgba(18, 32, 51, 0.12));
  border-radius: 999px;
  background: var(--brand-color-surface-muted, #f5f8fc);
  color: var(--brand-color-text-muted, #5d6c80);
  transition: border-color 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.pol-filter > i {
  position: absolute;
  left: 0.7rem;
  font-size: 0.8rem;
  pointer-events: none;
}

.pol-filter:hover {
  border-color: rgba(18, 32, 51, 0.24);
  color: var(--brand-color-accent-strong, #1157bf);
}

.pol-filter:focus-within {
  border-color: var(--brand-color-accent, #0f88f2);
  box-shadow: 0 0 0 3px var(--brand-color-accent-soft, rgba(15, 136, 242, 0.12));
}

/* A filter that is narrowing the feed looks like the active tab, so it is
   obvious at a glance why the list is shorter than usual. */
.pol-filter.is-active {
  background: var(--brand-color-surface, #fff);
  border-color: rgba(15, 136, 242, 0.35);
  color: var(--brand-color-accent-strong, #1157bf);
  box-shadow: 0 1px 3px rgba(17, 28, 45, 0.1);
}

.pol-filter-select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
  max-width: 16rem;
  padding: 0.32rem 1.75rem 0.32rem 1.85rem;
  border: 0;
  border-radius: 999px;
  background: transparent
    url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%235d6c80' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e")
    no-repeat right 0.7rem center / 0.6rem;
  color: inherit;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: var(--brand-font-weight-semibold, 600);
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  cursor: pointer;
}

.pol-filter-select:focus {
  outline: none;
}

.pol-filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.6rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--brand-color-text-muted, #5d6c80);
  font-family: inherit;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
}

.pol-filter-reset[hidden] {
  display: none;
}

.pol-filter-reset:hover {
  color: var(--pol-danger);
  background: rgba(207, 61, 78, 0.07);
}

.pol-filter-reset:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--brand-color-accent-soft, rgba(15, 136, 242, 0.12));
}

.pol-shell .dropdown-menu {
  border-radius: 14px;
  border: 1px solid var(--pol-border);
  box-shadow: 0 18px 36px rgba(22, 50, 79, 0.12);
}

.regions-scroll,
.feed-scroll,
.lawsndocs-feed,
.riksdag-feed,
#politics_video_section,
.rd-grid {
  scrollbar-width: thin;
  scrollbar-color: #afc6e1 #edf4fd;
}

.regions-scroll {
  max-height: 180px;
  overflow-y: auto;
}

.feed-scroll,
.lawsndocs-feed,
.riksdag-feed {
  overflow-y: auto;
}

.pol-feed-fill {
  position: relative;
  flex: 1;
  min-height: 0;
}

.feed-scroll {
  position: absolute;
  inset: 0;
  overflow-y: auto;
}

.lawsndocs-feed {
  min-height: 24rem;
  max-height: 34rem;
  /* Vertical only: it sits in a .card-body whose own 1rem is the horizontal
     inset — the same ~1rem every feed keeps between panel edge and card. */
  padding: 0.25rem 0;
}

.riksdag-feed {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  padding: 0.95rem;
}

#politics_video_section {
  max-height: 46rem;
  overflow-y: auto;
}

.fade-in {
  animation: fadeIn 0.35s ease forwards;
  opacity: 0;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

.webtv-feature-card {
  border: 0;
}

.webtv-image,
.webtv-thumbnail-placeholder {
  width: 100%;
  min-height: 250px;
  border-radius: 16px;
  object-fit: cover;
  background: linear-gradient(135deg, #f7f8fa 0%, #eef1f5 100%);
  color: #6c757d;
}

/* The spinner politics_webtv.js replaces with the fetched card. Carries the
   same footprint and fill as .webtv-thumbnail-placeholder above so the panel
   does not jump when the fragment lands. */
.webtv-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 250px;
  border-radius: 16px;
  background: linear-gradient(135deg, #f7f8fa 0%, #eef1f5 100%);
  color: #6c757d;
}

/* Aspect-ratio box: the riksdagen /embed/ player has no intrinsic height. */
.webtv-player {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #000;
}

.webtv-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.webtv-title {
  color: var(--pol-heading);
  font-weight: 800;
}

/* The card styling that used to live here was scoped to the feed *containers*
   (#skr_feed_container, .lawsndocs-feed, .riksdag-feed). feed_expand.js copies
   a feed's innerHTML into a shared modal body, where those selectors no longer
   match — so "Förstora" silently stripped every card's border, radius, shadow
   and hover. It now lives on .feedcard in core_data/css/feed-card.css, which
   travels with the markup and therefore renders identically in both places. */

.rd-section {
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.rd-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.rd-title {
  margin: 0;
  font-weight: 800;
  color: var(--pol-heading);
}

.rd-subtitle {
  font-size: 0.85rem;
  color: #64748b;
}

.rd-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
  max-height: 18rem;
  overflow-y: auto;
  padding-right: 0.15rem;
}

.rd-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 1rem;
  transition: all 0.18s ease;
}

.rd-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  border-color: #cbd5e1;
}

.rd-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.rd-badges {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.rd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.22rem 0.6rem;
  border-radius: 999px;
  color: #1d4ed8;
  background: rgba(37, 99, 235, 0.1);
  border: 1px solid rgba(37, 99, 235, 0.18);
}

.rd-date {
  font-size: 0.78rem;
  color: #64748b;
}

.rd-name {
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 1rem;
  color: var(--pol-heading);
}

.rd-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rd-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 800;
  font-size: 0.85rem;
  color: #2563eb;
  text-decoration: none;
}

.rd-link:hover {
  text-decoration: underline;
}

.rd-muted {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* .riksdag-brand* went with the hand-built brand lockup in the Riksdagen panel
   header, which is a plain .panel-head icon tile now. */

/* The four panel heads come from core_data/css/panel-head.css and need nothing
   from this file. `.pol-shell .card-header` (0,2,0) still wins over `.panel-head`
   (0,1,0) on background and border, which is deliberate — the head keeps the
   shell's own slightly bluer tint — and everything else the head declares
   (the flex row, the padding, the tile) is unopposed here. `.pol-panel-toolbar`
   above no longer sets padding, so `.feed-toolbar`'s compact padding applies. */

@media (max-width: 991.98px) {
  .pol-shell {
    border-radius: 0;
    border-left: 0;
    border-right: 0;
    /* Overrides the template's px-4/py-4 — see .econ-shell in econ_overview.css. */
    padding: 1rem 0.5rem !important;
  }

  .pol-panel-toolbar {
    align-items: flex-start;
  }
}

/* The panels stack below xl (the feed-width standard, core_data/css/feed-card.css),
   so below xl a feed has no neighbour to take its height from: out of absolute
   positioning, sized by its content with a floor. */
@media (max-width: 1199.98px) {
  .feed-scroll,
  .lawsndocs-feed,
  .riksdag-feed {
    max-height: none;
    min-height: 22rem;
  }

  .pol-feed-fill {
    position: static;
  }

  .feed-scroll,
  .riksdag-feed {
    position: static;
    inset: auto;
  }
}

