/* TerroCS — okienko opisu rang (v1.0.1, 25.11.2026) */
.terro-rank { cursor: pointer; transition: filter .2s, transform .2s; }
.terro-rank:hover, .terro-rank:focus-visible { filter: brightness(1.25) drop-shadow(0 0 6px rgba(213, 23, 24, .45)); outline: none; }

html.tr-noscroll { overflow: hidden; }

.tr-modal {
  position: fixed; inset: 0; z-index: 10050;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  background: rgba(5, 6, 10, .72);
  backdrop-filter: blur(6px);
  opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.tr-modal.is-open { opacity: 1; visibility: visible; }

.tr-modal__card {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 2rem);
  overflow-y: auto; scrollbar-width: thin;
  display: flex; flex-direction: column; gap: 10px;
  transform: translateY(8px) scale(.98); transition: transform .25s cubic-bezier(.22, 1, .36, 1);
}
.tr-modal.is-open .tr-modal__card { transform: none; }

.tr-head, .tr-rules, .tr-strip {
  background: var(--card, #161a22);
  border: 1px solid var(--transparent-5-w, rgba(255, 255, 255, .05));
  clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
}

.tr-modal__close {
  position: absolute; border-radius: 0; outline: none; top: .4rem; right: .5rem; z-index: 2;
  width: 2.2rem; height: 2.2rem; padding: 0; border: none; background: transparent;
  color: var(--text-default, #fff); opacity: .45; font-size: 1.8rem; line-height: 1; cursor: pointer; transition: opacity .2s;
}
.tr-modal__close:hover, .tr-modal__close:focus-visible { opacity: 1; background: transparent; outline: none; }

/* wybrana ranga */
.tr-head { display: flex; align-items: center; gap: 1.2rem; padding: 1.2rem 3rem 1.2rem 1.4rem; position: relative; }
.tr-head::before {
  content: ''; position: absolute; left: 0; top: 14px; bottom: 0; width: 3px;
  background: var(--brand-orange, #d51718); box-shadow: 0 0 8px var(--brand-orange, #d51718);
}
.tr-head__img { width: 86x; height: auto; flex: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .5)); }
.tr-head__info { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.tr-head__kat { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-custom, #9aa3b2); }
.tr-head__name { font-family: 'Anton', var(--font-family-1), sans-serif; font-size: 1.9rem; line-height: 1.1; text-transform: uppercase; color: var(--text-default, #fff); }
.tr-head__pts { font-size: 13px; font-weight: 600; color: var(--brand-orange, #d51718); }

/* zasady punktów */
.tr-rules { padding: 1.1rem 1.4rem 1.2rem; }
.tr-rules__title { display: flex; align-items: center; gap: .6rem; font-size: 1.15rem; font-weight: 700; color: var(--text-default, #fff); margin-bottom: .9rem; }
.tr-rules__title svg { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.tr-rules__cols { display: grid; grid-template-columns: 1fr 1fr; gap: .2rem 1.5rem; }
.tr-rules__col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .55rem; }
.tr-rule { display: flex; align-items: center; gap: .5rem; font-size: 13px; color: var(--text-custom, #9aa3b2); }
.tr-rule b { color: var(--text-default, #fff); font-weight: 600; white-space: nowrap; }
.tr-rule__txt::before { content: '- '; opacity: .6; }
.tr-rule__ico {
  width: 1.15rem; height: 1.15rem; flex: none; border-radius: 50%;
  display: grid; place-items: center; font-size: 13px; font-weight: 700; line-height: 1;
}
.tr-rule--plus .tr-rule__ico { color: #4fd1a5; border: 1.5px solid #4fd1a5; }
.tr-rule--minus .tr-rule__ico { color: #f06a6a; border: 1.5px solid #f06a6a; }
.tr-rules__note { margin: .9rem 0 0; font-size: 12px; color: var(--text-custom, #9aa3b2); opacity: .7; }

/* pasek wszystkich rang */
.tr-strip {
  display: flex; align-items: stretch; gap: .35rem; padding: .9rem 1rem 1rem;
  overflow-x: auto; scroll-snap-type: x proximity;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--brand-orange, #d51718) 55%, transparent) transparent;
}
.tr-strip::-webkit-scrollbar { height: 6px; }
.tr-strip::-webkit-scrollbar-track { background: transparent; }
.tr-strip::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--brand-orange, #d51718) 55%, transparent); }
.tr-strip__kat {
  flex: none; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-custom, #9aa3b2); opacity: .55; padding: 0 .15rem; margin-left: .35rem;
  border-right: 1px solid var(--transparent-10-w, rgba(255, 255, 255, .1));
}
.tr-strip__kat:first-child { margin-left: 0; }
.tr-strip__item {
  flex: none; width: 104px; scroll-snap-align: center;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  padding: .55rem .3rem; background: transparent; border: 1px solid transparent; cursor: pointer;
  color: var(--text-default, #fff); transition: background .2s, border-color .2s;
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  /* reset globalnego stylu button z szablonu (stała wysokość, tło, zaokrąglenia) */
  height: auto; min-height: 0; justify-content: flex-start; line-height: 1.2;
  border-radius: 0; outline: none; font-size: 11px; padding-inline: .3rem;
}
.tr-strip__item img { width: 86px; height: auto; transition: transform .2s; }
.tr-strip__item:hover { background: var(--transparent-5-w, rgba(255, 255, 255, .05)); }
.tr-strip__item:hover img { transform: scale(1.06); }
.tr-strip__item.is-active { background: color-mix(in srgb, var(--brand-orange, #d51718) 14%, transparent); border-color: color-mix(in srgb, var(--brand-orange, #d51718) 55%, transparent); }
.tr-strip__name { font-size: 11px; font-weight: 600; white-space: nowrap; }
.tr-strip__pts { font-size: 11px; font-weight: 700; color: #f2c752; }

@media (max-width: 560px) {
  .tr-head { flex-direction: column; text-align: center; padding: 1.4rem 1rem 1rem; }
  .tr-head::before { display: none; }
  .tr-head__img { width: 150px; }
  .tr-rules__cols { grid-template-columns: 1fr; }
  .tr-head__name { font-size: 1.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tr-modal, .tr-modal__card, .terro-rank, .tr-strip__item img { transition: none !important; }
}
