/* CIID HUB · MOTION-04 · SELECTOR — стиль RED SIGNAL (CSS + JS, без зависимостей).
   Разметку внутри [data-ciid-selector] строит selector.js. Файл самодостаточен и не зависит от dice.css / coin.css. */

.ciid-selector {
  --row: 52px;                    /* высота строки барабана / элемента списка */
  --cols: 1;
  --strike-ms: 240ms;             /* длительность росчерка исключения (задаёт selector.js) */
  position: relative;
  width: 100%;
  padding: 14px;
  color: #eef0f3;
  font: 16px/1.3 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

.ciid-selector__empty {
  margin: 0;
  padding: 44px 12px;
  text-align: center;
  color: #8c909a;
  font-size: 14px;
}

.ciid-selector__live {            /* невидимая зона для скринридеров */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- SINGLE: барабан ---------- */

.ciid-selector__reel {
  position: relative;
  height: calc(var(--row) * 3);
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid #26282e;
  background: linear-gradient(180deg, #0e0f12, #17181c 50%, #0e0f12);
}

.ciid-selector__reel::after {     /* затемнение верхней и нижней строк */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(#0b0b0e, rgba(11, 11, 14, 0) 34%, rgba(11, 11, 14, 0) 66%, #0b0b0e);
}

.ciid-selector__row {
  position: absolute;
  left: 18px;
  right: 18px;
  top: calc(50% - var(--row) / 2);
  height: var(--row);
  line-height: var(--row);
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #b3b6be;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  will-change: transform, opacity;
}

.ciid-selector__row.is-center { color: #fff; }

.ciid-selector__frame {           /* красная рамка выбора */
  position: absolute;
  left: 8px;
  right: 8px;
  top: calc(50% - var(--row) / 2);
  height: var(--row);
  z-index: 3;
  pointer-events: none;
  border: 2px solid rgba(255, 59, 78, .9);
  border-radius: 12px;
  box-shadow: 0 0 18px rgba(255, 40, 60, .4), inset 0 0 14px rgba(255, 40, 60, .22);
  transition: box-shadow .35s, border-color .35s;
}

.ciid-selector[data-state="done"] .ciid-selector__frame {
  border-color: #ff4a5e;
  box-shadow: 0 0 28px rgba(255, 40, 60, .85), inset 0 0 18px rgba(255, 40, 60, .4);
}

.ciid-selector[data-state="done"] .ciid-selector__row.is-center { text-shadow: 0 0 14px rgba(255, 59, 78, .8); }

/* ---------- ELIMINATION: список ---------- */

.ciid-selector__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(var(--cols), minmax(0, 1fr));
  gap: 8px;
}

.ciid-selector__item {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #26282e;
  background: #111215;
  transition: border-color .15s, background .15s, box-shadow .3s, opacity .3s;
}

.ciid-selector__text {
  position: relative;
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
  transition: color .3s;
}

.ciid-selector__text::after {     /* росчерк: зачёркивание всей строки */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  margin-top: -1px;
  background: #ff3b4e;
  box-shadow: 0 0 8px rgba(255, 40, 60, .8);
  transform: scaleX(0);
  transform-origin: left center;
}

.ciid-selector__sr {              /* «исключён» / «победитель» для скринридеров */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ciid-selector__item[data-state="scan"] {
  border-color: #ff3b4e;
  background: rgba(229, 20, 43, .16);
}

.ciid-selector__item[data-state="strike"] {
  border-color: #ff3b4e;
  background: rgba(229, 20, 43, .22);
  box-shadow: 0 0 16px rgba(255, 40, 60, .45);
}

.ciid-selector__item[data-state="strike"] .ciid-selector__text::after {
  transform: scaleX(1);
  transition: transform var(--strike-ms) cubic-bezier(.2, .7, .2, 1);
}

.ciid-selector__item[data-state="out"] {
  border-color: #1d1f24;
  background: transparent;
}

.ciid-selector__item[data-state="out"] .ciid-selector__text { color: #7b7f89; }
.ciid-selector__item[data-state="out"] .ciid-selector__text::after { transform: scaleX(1); }

.ciid-selector__item[data-state="winner"] {
  border-color: #ff4a5e;
  background: rgba(229, 20, 43, .28);
  box-shadow: 0 0 24px rgba(255, 40, 60, .7), inset 0 0 14px rgba(255, 40, 60, .25);
}

.ciid-selector__item[data-state="winner"] .ciid-selector__text { color: #fff; }

@media (max-width: 420px) {
  .ciid-selector { --row: 48px; padding: 10px; }
  .ciid-selector__row { font-size: 19px; }
  .ciid-selector__item { padding: 0 10px; min-height: 42px; }
  .ciid-selector__text { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .ciid-selector__frame,
  .ciid-selector__item,
  .ciid-selector__text,
  .ciid-selector__text::after { transition: none !important; }
}
