/* AntiFraud.es — Regulatory Tracker v1.0
   Depends on the design tokens declared in antifraud.css (:root) and on
   .page-hero / .page-breadcrumb / .page-tag / .page-kpis from pages.css. */

.rt { background: var(--white); }

/* The ES/EN toggle relies on [hidden]; make sure no display rule outranks it. */
.rt [hidden] { display: none !important; }

/* ─── HERO EXTRAS ─── */
.rt-hero { padding-bottom: 64px; }
.rt-tag-hero {
  background: rgba(0,113,227,0.15);
  color: #6cb0ff;
}
.rt-updated {
  margin-top: 28px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
}
.rt-updated strong { color: rgba(255,255,255,0.75); font-weight: 600; margin-left: 4px; }

/* ─── STICKY CONTROL BAR ─── */
.rt-controls {
  position: sticky; top: 48px; z-index: 40;
  background: rgba(255,255,255,0.88);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 0.5px solid var(--gray-100);
}
.rt-controls-inner {
  padding: 18px max(22px, calc(50% - 600px));
  display: flex; flex-direction: column; gap: 12px;
}
.rt-input {
  width: 100%; font-family: var(--font);
  font-size: 15px; color: var(--gray-800);
  background: var(--gray-50);
  border: 0.5px solid var(--gray-100);
  border-radius: 980px;
  padding: 11px 20px;
  transition: border-color .2s, background .2s;
}
.rt-input::placeholder { color: var(--gray-400); }
.rt-input:focus {
  outline: none; background: var(--white);
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,113,227,0.12);
}

.rt-filter-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
}
.rt-chipset { display: flex; gap: 6px; flex-wrap: wrap; }
.rt-chip {
  font-family: var(--font); font-size: 12px; font-weight: 600;
  color: var(--gray-600); background: var(--gray-50);
  border: 0.5px solid var(--gray-100); border-radius: 980px;
  padding: 7px 14px; cursor: pointer;
  transition: all .18s var(--ease);
}
.rt-chip:hover { border-color: var(--gray-200); color: var(--gray-800); }
.rt-chip.is-on {
  background: var(--gray-800); color: var(--white); border-color: var(--gray-800);
}
.rt-select {
  font-family: var(--font); font-size: 12px; font-weight: 500;
  color: var(--gray-600); background: var(--gray-50);
  border: 0.5px solid var(--gray-100); border-radius: 980px;
  padding: 7px 14px; cursor: pointer;
}
.rt-select:focus { outline: none; border-color: var(--blue); }

.rt-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 500; color: var(--gray-600); cursor: pointer;
  user-select: none;
}
.rt-toggle input { accent-color: var(--blue); width: 14px; height: 14px; cursor: pointer; }

.rt-lang { display: flex; margin-left: auto; border-radius: 980px; overflow: hidden; border: 0.5px solid var(--gray-100); }
.rt-lang-btn {
  font-family: var(--font); font-size: 11px; font-weight: 700; letter-spacing: 0.04em;
  padding: 7px 14px; border: none; cursor: pointer;
  background: var(--gray-50); color: var(--gray-400);
  transition: all .18s var(--ease);
}
.rt-lang-btn.is-on { background: var(--blue); color: var(--white); }

.rt-count { font-size: 12px; color: var(--gray-400); margin: 0; }

/* ─── LIST ─── */
.rt-body { padding: 44px max(22px, calc(50% - 600px)) 100px; }

.rt-card {
  border: 0.5px solid var(--gray-100);
  border-left: 3px solid var(--gray-200);
  border-radius: 16px;
  padding: 26px 28px;
  margin-bottom: 16px;
  background: var(--white);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.rt-card:hover { box-shadow: 0 10px 34px rgba(0,0,0,0.06); }
.rt-card.is-hidden { display: none; }
.rt-impact-high   { border-left-color: var(--blue); }
.rt-impact-medium { border-left-color: var(--gray-200); }
.rt-impact-low    { border-left-color: var(--gray-100); }

.rt-card-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; margin-bottom: 14px;
}
.rt-card-meta { display: flex; gap: 6px; flex-wrap: wrap; }

.rt-badge {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 980px;
  background: var(--gray-50); color: var(--gray-600);
}
.rt-badge-juris  { background: var(--gray-800); color: var(--white); }
.rt-badge-impact { background: rgba(0,113,227,0.1); color: var(--blue); }
.rt-status-in_force   { background: rgba(48,209,88,0.14);  color: #1a8f3c; }
.rt-status-agreed     { background: rgba(255,159,10,0.16); color: #b26a00; }
.rt-status-adopted    { background: rgba(0,113,227,0.1);   color: var(--blue); }
.rt-status-proposed   { background: var(--gray-50);        color: var(--gray-400); }
.rt-status-superseded { background: var(--gray-50);        color: var(--gray-400); text-decoration: line-through; }

.rt-countdown {
  flex-shrink: 0; text-align: right; font-size: 11px;
  color: var(--gray-400); line-height: 1.3;
}
.rt-countdown strong { display: block; font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.rt-countdown.is-soon   { color: var(--red); }
.rt-countdown.is-soon strong { color: var(--red); }
.rt-countdown.is-future { color: var(--gray-800); }
.rt-countdown.is-past   { color: var(--green); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; }

.rt-card-title {
  font-size: 19px; font-weight: 800; letter-spacing: -0.02em;
  color: var(--gray-800); line-height: 1.3; margin: 0 0 8px;
}
.rt-card-ref {
  font-size: 12px; color: var(--gray-400); margin: 0 0 14px; line-height: 1.6;
}
.rt-card-ref strong { color: var(--gray-600); font-weight: 600; }
.rt-sep { margin: 0 7px; color: var(--gray-200); }

.rt-card-summary {
  font-size: 15px; color: var(--gray-600); line-height: 1.72; margin: 0 0 18px;
}

/* ─── TIMELINE ─── */
.rt-timeline { list-style: none; margin: 0 0 16px; padding: 0; }
.rt-timeline li {
  display: flex; gap: 14px; align-items: baseline;
  padding: 7px 0; border-bottom: 0.5px solid var(--gray-50);
}
.rt-timeline li:last-child { border-bottom: none; }
.rt-timeline li.is-key .rt-timeline-date { color: var(--gray-800); font-weight: 700; }
.rt-timeline li.is-key .rt-timeline-label { color: var(--gray-800); font-weight: 600; }
.rt-timeline-date {
  flex-shrink: 0; width: 96px; font-size: 12px; font-weight: 600;
  color: var(--gray-400); font-variant-numeric: tabular-nums;
}
.rt-timeline-date.is-unconfirmed::after {
  content: "?"; margin-left: 3px; color: var(--amber); font-weight: 800;
}
.rt-timeline-label { font-size: 13px; color: var(--gray-600); line-height: 1.5; }
.rt-note {
  display: block; font-size: 11px; color: var(--gray-400);
  font-style: italic; margin-top: 3px;
}

/* ─── DETAILS ─── */
.rt-details {
  border-top: 0.5px solid var(--gray-100);
  padding-top: 14px; margin-top: 4px;
}
.rt-details summary {
  font-size: 12px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--blue);
  cursor: pointer; list-style: none; user-select: none;
  display: inline-flex; align-items: center; gap: 6px;
}
.rt-details summary::-webkit-details-marker { display: none; }
.rt-details summary::after {
  content: "+"; font-size: 15px; font-weight: 600; line-height: 1;
}
.rt-details[open] summary::after { content: "\2212"; }
.rt-details-body { padding-top: 14px; }
.rt-details-body > p {
  font-size: 14px; color: var(--gray-600); line-height: 1.78; margin: 0 0 14px;
}

.rt-caveat {
  background: rgba(255,159,10,0.07);
  border-left: 2px solid var(--amber);
  border-radius: 0 10px 10px 0;
  padding: 12px 16px; margin: 0 0 14px;
}
.rt-caveat-label {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: #b26a00; margin-bottom: 5px;
}
.rt-caveat p { font-size: 13px; color: var(--gray-600); line-height: 1.65; margin: 0; }

.rt-sources-label {
  display: block; font-size: 10px; font-weight: 800;
  letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--gray-400); margin-bottom: 7px;
}
.rt-sources ul { list-style: none; margin: 0; padding: 0; }
.rt-sources li { margin-bottom: 5px; }
.rt-sources a {
  font-size: 13px; color: var(--blue); text-decoration: none;
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.rt-sources a:hover { border-bottom-color: var(--blue); }

/* ─── CARD FOOTER ─── */
.rt-card-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 14px;
  border-top: 0.5px solid var(--gray-50);
}
.rt-verif {
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 5px;
}
.rt-verif-primary     { background: rgba(48,209,88,0.14);  color: #1a8f3c; }
.rt-verif-secondary   { background: rgba(255,159,10,0.14); color: #b26a00; }
.rt-verif-unconfirmed { background: rgba(255,59,48,0.1);   color: #c92a20; }
.rt-verif-date { font-size: 11px; color: var(--gray-400); }
.rt-theme-tag {
  font-size: 10px; color: var(--gray-400);
  background: var(--gray-50); padding: 3px 8px; border-radius: 5px;
  text-transform: capitalize;
}

/* ─── EMPTY / METHOD ─── */
.rt-noresults, .rt-empty {
  text-align: center; font-size: 15px; color: var(--gray-400); padding: 56px 0;
}
.rt-method {
  margin-top: 56px; padding: 30px 32px;
  background: var(--gray-50); border-radius: 16px;
  border: 0.5px solid var(--gray-100);
}
.rt-method h2 {
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--gray-800); margin: 0 0 12px;
}
.rt-method p { font-size: 13px; color: var(--gray-600); line-height: 1.75; margin: 0 0 12px; }
.rt-disclaimer { color: var(--gray-400) !important; font-size: 12px !important; margin-bottom: 0 !important; }

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .rt-controls { top: 48px; }
  .rt-controls-inner { padding: 14px 18px; }
  .rt-lang { margin-left: 0; }
  .rt-body { padding: 32px 18px 72px; }
  .rt-card { padding: 20px 18px; border-radius: 14px; }
  .rt-card-top { flex-direction: column; gap: 10px; }
  .rt-countdown { text-align: left; display: flex; align-items: baseline; gap: 6px; }
  .rt-countdown strong { display: inline; font-size: 17px; }
  .rt-card-title { font-size: 17px; }
  .rt-timeline li { flex-direction: column; gap: 2px; }
  .rt-timeline-date { width: auto; }
  .rt-method { padding: 24px 20px; }
}
