/* ==========================================================================
   tsbfight — components.css
   Кнопки, чипы, статусы, карточка-панель, блок кода, инжекторы.
   ========================================================================== */

/* --- buttons ------------------------------------------------------------ */
.btn-t {
  display: inline-block;
  background: var(--bolt);
  color: #191613;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15px;
  line-height: 1.2;
  padding: 12px 20px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-align: center;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
  transition: filter .15s, background .15s, color .15s;
}
.btn-t:hover { filter: brightness(1.08); color: #191613; text-decoration: none; }

.btn-t--o {
  background: transparent;
  color: var(--bolt);
  box-shadow: inset 0 0 0 1px var(--bolt);
}
.btn-t--o:hover { background: var(--bolt); color: #191613; filter: none; }

.btn-t.is-copied { background: var(--ok); color: #08130b; box-shadow: none; }

/* Внутри .prose ссылки красятся в --bolt (правило `.prose a`), и его специфичность
   перебивает `.btn-t` → жёлтый текст на жёлтой заливке (виден только на ховере).
   Возвращаем кнопкам их собственный цвет текста (порядок важен: --o после базового). */
.prose .btn-t { color: #191613; }
.prose .btn-t--o { color: var(--bolt); }
.prose .btn-t--o:hover { color: #191613; }

/* --- status & chips ----------------------------------------------------- */
.status { font-weight: 700; font-size: 12px; letter-spacing: .3px; }
.status--ok   { color: var(--ok); }
.status--warn { color: var(--warn); }

.tchip {
  display: inline-block;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 3px 9px;
  background: var(--bolt-dim);
  color: var(--bolt);
}
.tchip--nokey { background: rgba(88,196,114,.16); color: var(--ok); }
.tchip--safe  { background: transparent; color: var(--text-muted); box-shadow: inset 0 0 0 1px var(--border); }

/* --- script card = «файтинг-панель» ------------------------------------- */
.tcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0;
  padding: 20px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: border-color .15s;
}
.tcard:hover { border-color: var(--bolt); }

/* флагман: залитый жёлтым срез + метка ⚡ ТОП (без пунктира/двойной рамки/свечения) */
.tcard--lead { border-color: var(--bolt); }
.tcard--lead::after {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 0; height: 0;
  border-top: 46px solid var(--bolt);
  border-left: 46px solid transparent;
  pointer-events: none;
}
.tcard__top {
  align-self: flex-start;
  background: var(--bolt-dim);
  color: var(--bolt);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .6px;
  padding: 4px 13px;
  margin-bottom: 14px;
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 0 100%);
}

.tcard__shot {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.tcard__shot img { width: 100%; max-height: 190px; object-fit: cover; }

.tcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.tcard__title { font-size: 21px; margin-bottom: 10px; }
.tcard__desc { color: var(--text-muted); margin-bottom: 14px; }

.tcard__feats, .inj__feats { list-style: none; margin: 0 0 16px; padding: 0; }
.tcard__feats li, .inj__feats li {
  position: relative; padding-left: 20px; margin-bottom: 7px;
  font-size: 14px; color: var(--text-muted);
}
.tcard__feats li::before, .inj__feats li::before {
  content: "›"; position: absolute; left: 3px; top: -1px;
  color: var(--bolt); font-family: var(--font-mono); font-weight: 700;
}

.tcard__dl { width: 100%; margin-top: auto; margin-bottom: 14px; }

.tcard__inj { margin-top: 12px; font-size: 13px; color: var(--text-muted); }
.tcard__inj-lead { color: var(--text-primary); font-weight: 700; }

.tcard__checked {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-muted);
}
.tcard__checked::first-letter { color: var(--ok); }

/* --- luabox (блок кода) ------------------------------------------------- */
.luabox { background: var(--bg-code); border: 1px solid var(--border); }
.luabox__bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px; border-bottom: 1px solid var(--border);
}
.luabox__label {
  font-family: var(--font-mono); font-size: 11px; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
}
.luabox__copy.btn-t--o { padding: 5px 13px; font-size: 12px; font-family: var(--font-mono); }
.luabox__pre {
  margin: 0; padding: 14px;
  max-height: 220px; overflow: auto;
  font-family: var(--font-mono); font-size: 12.5px; line-height: 1.55;
  color: var(--text-primary);
  white-space: pre-wrap; word-break: break-all;
}
.luabox__pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

/* --- injectors ---------------------------------------------------------- */
.inj-list { display: flex; flex-direction: column; gap: 20px; }
.inj {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 22px;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
  transition: border-color .15s;
}
.inj:hover { border-color: var(--bolt); }
.inj__head { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.inj__mono {
  flex: none; width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--bolt-dim); color: var(--bolt);
  font-family: var(--font-display); font-size: 27px;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
}
.inj__name { font-size: 22px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.inj__plat { color: var(--text-muted); font-family: var(--font-mono); font-size: 13px; margin-top: 5px; }
.inj__desc { margin-bottom: 14px; }
.inj__how { margin-top: 6px; }
.inj__how-h {
  font-family: var(--font-body); font-weight: 700; font-size: 12px;
  text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 8px;
}
.inj__note { margin-top: 16px; font-size: 12.5px; color: var(--text-muted); font-style: italic; }

/* --- youtube facade (click-to-load) ------------------------------------- */
.ytlite {
  position: relative;
  aspect-ratio: 16 / 9;
  max-width: 860px;
  margin-top: 6px;
  background: var(--bg-code);
  border: 1px solid var(--border);
  overflow: hidden;
  cursor: pointer;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.ytlite__poster { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .82; transition: opacity .15s; }
.ytlite:hover .ytlite__poster { opacity: 1; }
.ytlite__btn {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 74px; height: 74px; display: grid; place-items: center;
  background: var(--bolt); color: #191613; border: 0; cursor: pointer;
  clip-path: polygon(0 0, calc(100% - 9px) 0, 100% 9px, 100% 100%, 0 100%);
  transition: filter .15s;
}
.ytlite__btn svg { display: block; }
.ytlite:hover .ytlite__btn { filter: brightness(1.08); }
.ytlite.is-playing { cursor: default; }
.ytlite iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
