@import url("../../assets/css/tokens.css");

html,
body {
  margin: 0;
  background: transparent;
}

.e26-art {
  --art-bg: #f2f6fa;
  --art-text: #1d2129;
  --art-muted: #696c75;
  --art-line: #dde3ed;
  --art-coal: #df3232;
  --art-opp: #0361fc;
  --art-other: #696c75;
  --art-ok: #009ffb;
  --art-warn: #fb6300;
  --art-on: rgba(0, 159, 251, 0.15);
  --art-chip: #dde3ed;
  --art-seat-empty: #000;
  --art-seat-empty-opacity: 0.3;
  box-sizing: border-box;
  width: 100%;
  max-width: 740px;
  margin: 0 auto;
  color: var(--art-text);
  font-family: var(--e26-font);
  direction: rtl;
}

.e26-art *,
.e26-art *::before,
.e26-art *::after {
  box-sizing: border-box;
}

.e26-art--boot .e26-art__chart,
.e26-art--boot .e26-art__blocs,
.e26-art--boot .e26-art__game {
  visibility: hidden;
}

.e26-art__banner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  padding: 12px 16px;
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background:
    linear-gradient(to top, rgba(3, 97, 252, 0.6) 3%, rgba(0, 64, 233, 0.6) 37%, rgba(0, 17, 172, 0.6) 90%),
    url("img/banner.jpg") center / cover no-repeat;
}

.e26-art__elections {
  display: block;
  width: 178px;
  height: 23px;
}

.e26-art__ynet {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 28px;
  direction: ltr;
  text-decoration: none;
}

.e26-art__symbol {
  display: block;
  width: 28px;
  height: 28px;
}

.e26-art__word {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  width: 34px;
}

.e26-art__word img {
  display: block;
  width: 34px;
  height: auto;
}

.e26-art__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.e26-art__main {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 12px 16px 16px;
  background: var(--art-bg);
}

.e26-art__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
}

.e26-art__head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  line-height: 20px;
}

.e26-art__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
  margin: 0;
  color: var(--art-muted);
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
}

.e26-art__meta > span[hidden] {
  display: none !important;
}

.e26-art__meta > span:not([hidden]) + span:not([hidden])::before {
  content: "|";
  margin-inline: 4px;
}

.e26-art__head {
  flex-wrap: wrap;
  row-gap: 4px;
}

.e26-art__meta {
  flex: 1 1 100%;
}

.e26-art__chart {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.e26-art__party {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding: 4px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.e26-art__party.is-on { background: var(--art-on); }

.e26-art__party.is-disabled {
  opacity: 0.3;
  cursor: default;
}

.e26-art__party.is-disabled .e26-art__seats {
  color: var(--art-muted);
}

.e26-art__party.is-disabled .e26-art__fill {
  background: var(--art-muted);
}

.e26-art__party:focus-visible,
.e26-art__side:focus-visible,
.e26-art__mid:focus-visible,
.e26-art__reset:focus-visible {
  outline: 2px solid var(--art-opp);
  outline-offset: 1px;
}

.e26-art__party[data-bloc="A"] { --bar: var(--art-coal); }
.e26-art__party[data-bloc="B"] { --bar: var(--art-opp); }
.e26-art__party[data-bloc="other"] { --bar: var(--art-other); }

.e26-art__name {
  width: 100px;
  flex: 0 0 100px;
  overflow: hidden;
  color: var(--art-text);
  font-size: 13px;
  font-weight: 400;
  line-height: 14px;
  text-align: right;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.e26-art__fill {
  display: block;
  width: var(--bar-size, 8px);
  height: 15px;
  flex: 0 0 auto;
  background: var(--bar, var(--art-other));
  border-radius: 4px 0 0 4px;
}

.e26-art__seats {
  flex: 0 0 auto;
  min-width: 16px;
  color: var(--bar, var(--art-other));
  font-size: 13px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.e26-art__rule { display: none; }

.e26-art__blocs {
  position: relative;
  display: flex;
  align-items: stretch;
  direction: ltr;
  width: 100%;
  height: 28px;
  overflow: hidden;
  border-radius: 8px;
}

.e26-art__mark {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(59 / 120 * 100%);
  z-index: 1;
  width: 2px;
  margin-left: -1px;
  background: #fff;
  box-shadow: 0 0 0 1px rgba(29, 33, 41, 0.35);
  pointer-events: none;
}

.e26-art__side,
.e26-art__mid {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  margin: 0;
  padding: 0 5px;
  border: 0;
  color: #f2f6fa;
  font: inherit;
  cursor: pointer;
}

.e26-art__side img {
  display: block;
  width: 41px;
  height: 28px;
  flex: 0 0 41px;
  object-fit: fill;
}

.e26-art__side--b {
  flex: var(--share, 1) 1 0;
  min-width: 0;
  background: var(--art-opp);
  border-radius: 8px 0 0 8px;
}

.e26-art__side--a {
  flex: var(--share, 1) 1 0;
  min-width: 0;
  background: var(--art-coal);
  border-radius: 0 8px 8px 0;
}

.e26-art__mid {
  flex: var(--share, 1) 1 0;
  min-width: 0;
  background: var(--art-other);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -1px;
}

.e26-art__side.is-on,
.e26-art__mid.is-on {
  box-shadow: inset 0 0 0 1px #fff;
}

.e26-art__side-n {
  font-size: 18px;
  font-weight: 700;
  line-height: 14px;
  letter-spacing: -0.54px;
  font-variant-numeric: tabular-nums;
}

.e26-art__side-name {
  font-size: 12px;
  font-weight: 500;
  line-height: 14px;
  white-space: nowrap;
}

.e26-art__game {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
  row-gap: 8px;
  justify-items: end;
  padding: 16px;
  background: var(--art-bg);
  border-radius: 0 0 20px 20px;
}

.e26-art__chip { grid-column: 1; grid-row: 1; }
.e26-art__hint { grid-column: 1; grid-row: 2; }
.e26-art__status { grid-column: 1; grid-row: 3; }

.e26-art__plenum {
  grid-column: 2;
  grid-row: 1 / span 3;
}

.e26-art__chip {
  margin: 0;
  padding: 4px 8px;
  background: var(--art-chip);
  border-radius: 2px;
  color: var(--art-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 18px;
}

.e26-art__plenum {
  position: relative;
  width: 140px;
  height: 120px;
}

.e26-art__stage,
.e26-art__stage svg {
  display: block;
  width: 140px;
  height: 106px;
}

.e26-art__count {
  position: absolute;
  left: 0;
  right: 0;
  top: 46%;
  margin: 0;
  transform: translateY(-50%);
  color: var(--art-opp);
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -2px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}

.e26-art__count.is-zero { color: var(--art-muted); }

.e26-art__reset {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  transform: translateX(-50%);
  cursor: pointer;
}

.e26-art__reset img {
  display: block;
  width: 24px;
  height: 24px;
}

.e26-art__hint {
  margin: 0;
  color: var(--art-text);
  font-size: 15px;
  font-weight: 400;
  line-height: 18px;
  text-align: right;
}

.e26-art__status {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  color: var(--art-warn);
  font-size: 14px;
  font-weight: 500;
  line-height: 17px;
  white-space: nowrap;
}

.e26-art__status.is-ok { color: var(--art-ok); }

.e26-art__status-icon {
  display: block;
  width: 13px;
  height: 13px;
  flex: 0 0 13px;
}

.e26-art__status-icon--warn { fill: currentColor; }

.e26-art__status-icon[hidden] { display: none !important; }

.e26-art__error {
  margin: 0;
  color: var(--art-muted);
  font-size: 14px;
  line-height: 18px;
}

@media (min-width: 720px) {
  .e26-art__body {
    flex-direction: row;
    gap: 0;
    background: var(--art-bg);
    border-radius: 0 0 20px 20px;
    overflow: hidden;
  }

  .e26-art__main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 12px 16px 16px;
    background: transparent;
  }

  .e26-art__head h1 {
    font-size: 18px;
    line-height: 16px;
  }

  .e26-art__meta {
    flex: 0 1 auto;
    gap: 0;
    color: var(--art-text);
    font-size: 14px;
    line-height: 16px;
    white-space: nowrap;
  }

  .e26-art__meta > span:not([hidden]) + span:not([hidden])::before {
    margin-inline: 6px;
  }

  .e26-art__chart {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: center;
    gap: 8px 8px;
    min-height: 236px;
    padding: 4px 0 8px;
  }

  .e26-art__party {
    flex: 0 0 68px;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    width: 68px;
    height: 114px;
    gap: 4px;
    padding: 0;
    border-radius: 0;
    background: transparent;
  }

  .e26-art__party.is-on { background: transparent; }

  .e26-art__seats {
    order: 1;
    flex-shrink: 0;
    min-width: 0;
    font-size: 18px;
    line-height: 18px;
    text-align: center;
  }

  .e26-art__fill {
    order: 2;
    flex-shrink: 1;
    width: 40px;
    min-height: 4px;
    height: var(--bar-size, 8px);
    border-radius: 8px 8px 0 0;
  }

  .e26-art__name {
    order: 3;
    flex-shrink: 0;
    width: 68px;
    height: 28px;
    flex-basis: auto;
    color: var(--art-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 14px;
    text-align: center;
    white-space: normal;
  }

  .e26-art__rule {
    order: 4;
    display: block;
    flex: 0 0 2px;
    width: 40px;
    height: 2px;
    min-height: 2px;
    background: var(--art-ok);
    opacity: 0;
  }

  .e26-art__party.is-on .e26-art__rule { opacity: 1; }

  .e26-art__game {
    display: flex;
    flex: 0 0 183px;
    flex-direction: column;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 16px 16px 8px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.4);
    border-inline-start: 1px solid var(--art-line);
  }

  .e26-art__chip,
  .e26-art__hint,
  .e26-art__status,
  .e26-art__plenum {
    grid-column: auto;
    grid-row: auto;
  }

  .e26-art__plenum {
    width: 150px;
    height: 128px;
    margin-bottom: 8px;
  }

  .e26-art__stage,
  .e26-art__stage svg {
    width: 150px;
    height: 114px;
  }

  .e26-art__hint {
    max-width: 150px;
    font-size: 14px;
    line-height: 16px;
    text-align: center;
  }
}

@media (prefers-color-scheme: dark) {
  .e26-art {
    --art-bg: #243044;
    --art-text: #f2f6fa;
    --art-muted: #a3a7b0;
    --art-line: rgba(255, 255, 255, 0.12);
    --art-other: #8b919c;
    --art-chip: rgba(255, 255, 255, 0.08);
    --art-on: rgba(0, 159, 251, 0.22);
    --art-seat-empty: #fff;
    --art-seat-empty-opacity: 0.38;
  }

  .e26-art__game {
    background: var(--art-bg);
  }
}

@media (min-width: 720px) and (prefers-color-scheme: dark) {
  .e26-art__game {
    background: rgba(255, 255, 255, 0.04);
  }
}
