/* ==========================================================================
   Overgangssenteret
   --------------------------------------------------------------------------
   Samme designregler som «Norske spillere i utlandet»:
     · Hierarki foran dekor. Spiller → bevegelse → metadata.
     · Nær-monokromt. Farge bærer bare betydning (lån = gult, Bosman = grønt).
     · Hårfine skiller, ingen kort-stabling. Siden skal lese som én flate.
   Bygget på 433.no-tokens (--bg-body, --text-main, --border-light …) slik at
   mørk modus følger temaet uten en egen palett.

   Én stilfil for alle fire flatene. Modifierne (--front, --portal, --term,
   --shortcode) justerer bare rammen; radene er identiske overalt.
   ========================================================================== */

.tr-module,
.tr-page {
  --tr-hair: var(--border-light);
  --tr-radius: 8px;
  --tr-gap: 14px;
  color: var(--text-main);
}

/* ── Modulramme ─────────────────────────────────────────────────── */
.tr-module { margin: 32px 0; }

.tr-module-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--tr-hair);
  margin-bottom: 4px;
}

.tr-module-title {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
}

.tr-module-more {
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
}
.tr-module-more:hover { color: var(--text-main); text-decoration: underline; }

/* ── Liste ──────────────────────────────────────────────────────── */
.tr-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--tr-gap);
  padding: 12px 0;
  border-bottom: 1px solid var(--tr-hair);
  flex-wrap: wrap;
}
.tr-row:last-child { border-bottom: 0; }

.tr-row-main {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  min-width: 0;
  flex: 1 1 320px;
}

.tr-player { font-weight: 650; font-size: 0.9375rem; }
.tr-player-link { color: var(--text-main); text-decoration: none; }
.tr-player-link:hover { text-decoration: underline; }

/* ── Bevegelsen: fra → til ──────────────────────────────────────── */
.tr-move {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
}

.tr-club {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.tr-club-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  flex: none;
}

.tr-club-logo--text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.5625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  background: var(--bg-subtle, rgba(127, 127, 127, 0.12));
  border-radius: 3px;
}

.tr-club-name {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Målklubben er poenget med raden — den skal veie tyngst. */
.tr-club--to .tr-club-name { color: var(--text-main); font-weight: 600; }

.tr-arrow { color: var(--text-muted); font-size: 0.875rem; flex: none; }

/* ── Metadata ───────────────────────────────────────────────────── */
.tr-row-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.tr-type {
  font-size: 0.6875rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: 3px;
  border: 1px solid var(--tr-hair);
  color: var(--text-muted);
  white-space: nowrap;
}

/* Farge bare der den betyr noe. */
.tr-type--loan        { color: #8a6100; border-color: rgba(180, 130, 0, 0.4); }
.tr-type--loan_return { color: var(--text-muted); opacity: 0.75; }
.tr-type--free        { color: #00794a; border-color: rgba(0, 121, 74, 0.35); }
.tr-type--permanent   { color: var(--text-main); border-color: var(--text-muted); }

.tr-league,
.tr-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── Kompakt variant (forside, terminmoduler) ───────────────────── */
.tr-row--compact { padding: 9px 0; }
.tr-row--compact .tr-player { font-size: 0.875rem; }
.tr-row--compact .tr-club-name { font-size: 0.8125rem; }

/* ── Egen side ──────────────────────────────────────────────────── */
.tr-page {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 20px 72px;
}

.tr-page :focus-visible {
  outline: 2px solid var(--text-main);
  outline-offset: 2px;
  border-radius: 3px;
}

.tr-page-head { padding: 28px 0 6px; }

.tr-page-title {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 4px;
}

.tr-page-sub { font-size: 0.8125rem; color: var(--text-muted); margin: 0; }

.tr-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 16px 0;
  border-bottom: 1px solid var(--tr-hair);
  margin-bottom: 4px;
}

.tr-filter {
  font-size: 0.8125rem;
  padding: 5px 11px;
  border: 1px solid var(--tr-hair);
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  white-space: nowrap;
}
.tr-filter:hover { color: var(--text-main); border-color: var(--text-muted); }
.tr-filter.is-active {
  background: var(--text-main);
  border-color: var(--text-main);
  color: var(--bg-body);
}
.tr-filter--sep { margin-left: auto; }

.tr-empty {
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 0.9375rem;
  text-align: center;
}

.tr-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 24px 0 0;
}

.tr-page-link {
  font-size: 0.875rem;
  color: var(--text-main);
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid var(--tr-hair);
  border-radius: var(--tr-radius);
}
.tr-page-link:hover { border-color: var(--text-muted); }

.tr-page-status { font-size: 0.8125rem; color: var(--text-muted); }

/* ── Smalt ──────────────────────────────────────────────────────── */
@media (max-width: 620px) {
  .tr-row { align-items: flex-start; gap: 8px; }
  .tr-row-main { flex: 1 1 100%; gap: 6px; }
  .tr-row-meta { flex: 1 1 100%; }
  .tr-page { padding: 0 14px 56px; }
  .tr-filter--sep { margin-left: 0; }
}
