/* Heist on the big screen: the heading and clock, the street of three banks and the house with the players outside
   the one they picked, and the footer. Drawn on the 1920 x 1080 stage (screen_shell/stage). */

.gtf-hss-screen {
  --hss-ground: #0C0A08;
  --hss-blue: oklch(0.76 0.12 230);
  --hss-wall: #231E1A;
  --hss-stone: #3A322A;
}

/* A slimmer brand row than the other screens: the street needs the height. */
.gtf-hss-screen .gtf-screen__header {
  height: calc(64px * var(--gtf-m, 1));
}

.gtf-hss-screen .gtf-screen__brand {
  zoom: 0.6;
}

.gtf-hss-screen .gtf-screen__body {
  top: calc(68px * var(--gtf-m, 1));
}

.gtf-hss {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 0 28px 16px;
  box-sizing: border-box;
}

/* ---------- Heading, clock and bar ---------- */

.gtf-hss-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
}

.gtf-hss-top__text {
  flex: 1;
  min-width: 0;
}

.gtf-hss-heading {
  margin: 0;
  font-size: 56px;
  font-weight: 900;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.gtf-hss-note {
  margin: 8px 0 0;
  font-size: 22px;
  line-height: 1.4;
  color: var(--gtf-text-2);
}

.gtf-hss-clock {
  display: flex;
  align-items: baseline;
  gap: 14px;
}

.gtf-hss-clock__value {
  font-family: var(--gtf-mono);
  font-size: 88px;
  line-height: 1;
  color: var(--gtf-cream);
}

.gtf-hss-clock__label {
  font-size: 20px;
  color: var(--gtf-text-2);
}

.gtf-hss-head.is-urgent .gtf-hss-clock__value {
  color: var(--gtf-orange);
}

.gtf-hss-bar {
  height: 8px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--gtf-surface-2);
}

.gtf-hss-bar__fill {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  background: var(--gtf-yellow);
}

.gtf-hss-head.is-timed .gtf-hss-bar__fill {
  width: calc((1 - var(--progress, 0)) * 100%);
}

/* ---------- The street ---------- */

.gtf-hss-street {
  display: grid;
  flex: 1;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: end;
  min-height: 0;
  padding: 0 12px;
  border-bottom: 10px solid var(--hss-ground);
}

.gtf-hss-lot {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.gtf-hss-tag {
  min-width: 90px;
  margin-bottom: 14px;
  padding: 6px 18px;
  border-radius: 6px;
  font-size: 24px;
  font-weight: 900;
  text-align: center;
  background: var(--gtf-surface-2);
  color: var(--gtf-text-2);

  &.gtf-hss-tag--police {
    background: var(--hss-blue);
    color: var(--gtf-ink);
  }

  &.gtf-hss-tag--small {
    background: var(--gtf-yellow);
    color: var(--gtf-ink);
  }

  &.gtf-hss-tag--big {
    background: var(--gtf-orange);
    color: var(--gtf-ink);
  }

  &.gtf-hss-tag--empty,
  &.gtf-hss-tag--home {
    background: var(--hss-stone);
    color: var(--gtf-cream);
  }
}

/* ---------- Buildings ---------- */

.gtf-hss-bank,
.gtf-hss-house {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}

.gtf-hss-bank__roof {
  width: 94%;
  height: 56px;
  background: var(--hss-stone);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.gtf-hss-bank__plate {
  width: 94%;
  padding: 10px 0;
  background: #332C26;
  font-size: 20px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-align: center;
  color: var(--gtf-yellow);
}

.gtf-hss-bank__front {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 44px;
  gap: 12px;
  box-sizing: border-box;
  width: 94%;
  height: 190px;
  padding: 18px 16px 0;
  background: var(--hss-wall);
}

.gtf-hss-window {
  border-radius: 2px;
  background: var(--gtf-ink);

  &.is-lit {
    background: var(--gtf-yellow);
  }
}

.gtf-hss-door {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 22%;
  height: 78px;
  margin-left: -11%;
  border-radius: 3px 3px 0 0;
  background: var(--hss-ground);
}

/* The light over the police bank: tinted once it is known, flashing blue and red during the siren. */
.gtf-hss-bank__light {
  position: absolute;
  inset: 0;
  pointer-events: none;

  &.is-police {
    background: rgba(111, 175, 232, 0.5);
  }

  &.is-siren {
    animation: gtf-hss-flash 0.6s infinite;
  }
}

.gtf-hss-house__roof {
  width: 78%;
  height: 72px;
  background: #5A3A2A;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

.gtf-hss-house__front {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-around;
  box-sizing: border-box;
  width: 66%;
  height: 140px;
  padding-top: 34px;
  background: #2B2622;
}

.gtf-hss-house__window {
  width: 26%;
  height: 36px;
  border-radius: 2px;
  background: var(--gtf-yellow);
  opacity: 0.8;
}

.gtf-hss-house__front .gtf-hss-door {
  height: 62px;
}

.gtf-hss-kerb {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;

  & span {
    width: 90%;
    height: 12px;
    background: var(--hss-stone);
  }

  & span:nth-child(2) {
    width: 98%;
    background: #2F2823;
  }

  & span:nth-child(3) {
    width: 106%;
    background: #28221D;
  }
}

/* ---------- The players outside each building ---------- */

.gtf-hss-crowd {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  justify-content: center;
  gap: 6px 8px;
  box-sizing: border-box;
  width: 100%;
  height: 290px;
  padding-top: 14px;
  overflow: hidden;
}

.gtf-hss-person {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;

  & .avatar-component {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  &.is-hit .avatar-component {
    opacity: 0.55;
    filter: grayscale(1);
    box-shadow: 0 0 0 3px #E5605A;
  }
}

.gtf-hss-person__caption {
  font-family: var(--gtf-mono);
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  color: var(--gtf-success);

  &.is-hit {
    color: #FF8A80;
  }
}

.gtf-hss-more {
  align-self: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--gtf-text-2);
}

/* ---------- Footer ---------- */

.gtf-hss-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 28px;
}

.gtf-hss-stats {
  display: flex;
  gap: 28px;
  margin: 0;

  & dt {
    font-size: 15px;
    font-weight: 600;
    color: var(--gtf-text-2);
  }

  & dd {
    margin: 0;
    font-family: var(--gtf-mono);
    font-size: 32px;
    line-height: 1.1;
  }

  & dd.is-free {
    color: var(--gtf-success);
  }

  & dd.is-arrested {
    color: var(--gtf-orange);
  }
}

.gtf-hss-chips {
  display: flex;
  flex: 1 1 400px;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.gtf-hss-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;

  &.is-arrested {
    color: var(--gtf-text-3);

    & .avatar-component {
      opacity: 0.4;
    }
  }
}

.gtf-hss-chip__name {
  font-weight: 600;
}

.gtf-hss-chip__money {
  font-family: var(--gtf-mono);
  font-size: 16px;
}

@keyframes gtf-hss-flash {
  0%, 100% { background: rgba(111, 175, 232, 0.5); }
  50% { background: rgba(229, 96, 90, 0.5); }
}

@media (prefers-reduced-motion: reduce) {
  .gtf-hss-bank__light.is-siren {
    animation: none;
  }
}
