/* TD-2026.09.29.034: scoped fixes for rezultate.html only. */

/* Preserve the full kitchen photograph and its physical display frames. */
html .results-role-story > .results-proof-hero > picture {
  display: block;
  width: 100%;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
  background: #111715;
}

html .results-role-story > .results-proof-hero > picture > img {
  display: block;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  aspect-ratio: auto !important;
  object-fit: contain !important;
  object-position: center top !important;
}

/* Left physical display: compact pickup queue. */
html .results-role-story .results-screen.is-screen-calibrated {
  box-sizing: border-box;
  border: 0 !important;
  border-radius: 1px !important;
  background: #071b16 !important;
  color: #eef9f4 !important;
  box-shadow: inset 0 0 0 2px rgba(121, 235, 184, .12) !important;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

html .results-role-story .results-screen--criterion.is-screen-calibrated {
  display: grid !important;
  grid-template-rows: auto 1fr;
  gap: 15px !important;
  padding: 22px !important;
  align-content: stretch !important;
  justify-content: stretch !important;
}

.results-screen-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 2px solid #315d4c;
}

html .results-role-story .results-screen .results-screen-head span,
html .results-role-story .results-screen .results-screen-head small {
  color: #93bdaa !important;
  font-size: 20px !important;
  font-weight: 850;
  line-height: 1;
  letter-spacing: .04em !important;
  white-space: nowrap;
}

html .results-role-story .results-screen .results-screen-head small {
  color: #75e7b2 !important;
  font-size: 15px !important;
}

.results-pickup-queue {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.results-pickup-queue li {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-content: center;
  min-width: 0;
  padding: 12px 13px;
  border-left: 5px solid #4b7865;
  background: #102d24;
}

.results-pickup-queue li[data-order-state="new"] { border-left-color: #dfb348; }
.results-pickup-queue li[data-order-state="ready"] { border-left-color: #79e8b7; background: #123a2d; }
.results-pickup-queue strong { grid-row: 1 / 3; align-self: center; color: #f3fbf7; font-size: 31px; line-height: 1; }
.results-pickup-queue span { min-width: 0; color: #f3fbf7; font-size: 15px; font-weight: 850; line-height: 1.15; }
.results-pickup-queue small { color: #9bb7aa; font-size: 14px; font-weight: 750; line-height: 1.2; }
.results-pickup-queue li[data-order-state="new"] span { color: #f2cb69; }
.results-pickup-queue li[data-order-state="ready"] span { color: #84efbd; }

/* Right physical display: one selected order with products and elapsed time. */
html .results-role-story .results-screen--outcome.is-screen-calibrated {
  display: grid !important;
  grid-template-rows: auto auto 1fr auto;
  gap: 13px !important;
  padding: 24px 28px !important;
  align-content: stretch !important;
  justify-content: stretch !important;
}

.results-detail-head,
.results-detail-meta,
.results-detail-time {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.results-detail-head { padding-bottom: 12px; border-bottom: 2px solid #315d4c; }
.results-detail-head span { color: #eaf8f1; font-size: 25px; font-weight: 900; line-height: 1; }
.results-detail-head b { padding: 8px 10px; background: #6fe5ae; color: #062116; font-size: 16px; line-height: 1; }
.results-detail-meta strong { color: #82eebb; font-size: 23px; line-height: 1; }
.results-detail-meta span { color: #9bb7aa; font-size: 15px; font-weight: 800; }

.results-detail-products {
  display: grid;
  align-content: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.results-detail-products li {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 10px 12px;
  background: #102d24;
}

.results-detail-products b { color: #79e8b7; font-size: 20px; }
.results-detail-products span { color: #f4faf7; font-size: 22px; font-weight: 800; }
.results-detail-products small { color: #aac0b5; font-size: 15px; }
.results-detail-time { padding-top: 10px; border-top: 2px solid #315d4c; }
.results-detail-time span { color: #9bb7aa; font-size: 16px; font-weight: 850; letter-spacing: .04em; }
.results-detail-time strong { color: #f4faf7; font-size: 31px; line-height: 1; }

/* The HoReCa order is a real layout row, never a floating image overlay. */
.results-horeca-order {
  display: grid;
  grid-template-columns: minmax(150px, .9fr) minmax(260px, 1.5fr) auto;
  align-items: stretch;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, .16);
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  background: #0b1713;
  color: #f3faf6;
}

.results-horeca-order > div,
.results-horeca-order > ul {
  min-width: 0;
  margin: 0;
  padding: 14px 16px;
}

.results-horeca-order > * + * { border-left: 1px solid rgba(255, 255, 255, .14); }
.results-horeca-order__id,
.results-horeca-order__state { display: grid; align-content: center; gap: 4px; }
.results-horeca-order small { color: #8eb4a3; font-size: .58rem; font-weight: 850; letter-spacing: .1em; }
.results-horeca-order__id strong { color: #7ce9b8; font-size: .95rem; line-height: 1.2; }
.results-horeca-order ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; list-style: none; }
.results-horeca-order li { display: flex; align-items: center; gap: 8px; min-width: 0; }
.results-horeca-order li b { color: #7ce9b8; font-size: .72rem; }
.results-horeca-order li span { min-width: 0; font-size: .78rem; font-weight: 760; }
.results-horeca-order__state { grid-template-columns: auto auto; column-gap: 10px; }
.results-horeca-order__state small { grid-column: 1; }
.results-horeca-order__state strong { grid-column: 1; color: #fff; font-size: 1rem; }
.results-horeca-order__state span { grid-column: 2; grid-row: 1 / 3; align-self: center; padding: 8px 10px; background: #6fe5ae; color: #062116; font-size: .68rem; font-weight: 900; white-space: nowrap; }

/* Do not let the access figure inherit the taller copy column and center a void. */
@media (min-width: 701px) {
  .sp-scenes .sp-scene figure.results-photo--access {
    display: grid !important;
    grid-template-rows: auto auto;
    align-self: start !important;
    align-items: start !important;
    justify-content: start !important;
    min-height: 0 !important;
    height: auto !important;
  }

  .sp-scenes .sp-scene .results-photo--access img {
    display: block;
    width: 100%;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: 3 / 2;
    object-fit: contain !important;
    object-position: center !important;
  }
}

/* Two physically paired indicators for the two cabled rack ports. */
.results-rack-proof .td-final-story__media img { transform: none !important; transition: none !important; }
.results-rack-leds { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.results-rack-port {
  --rack-led-size: 4px;
  position: absolute;
  display: flex;
  gap: max(2px, calc(var(--rack-led-size) * .55));
  align-items: center;
  transform: translate(-50%, -50%);
}

.results-rack-port i {
  display: block;
  width: var(--rack-led-size);
  height: var(--rack-led-size);
  border-radius: 50%;
}

.results-rack-link { background: #58e99e; box-shadow: 0 0 3px rgba(88, 233, 158, .8); }
.results-rack-activity {
  background: #f6c84b;
  box-shadow: 0 0 3px rgba(246, 200, 75, .82);
  opacity: .72;
  animation: results-rack-activity-one 5.4s steps(1, end) infinite;
  animation-play-state: paused;
}

.results-rack-port[data-rack-port="two"] .results-rack-activity {
  animation-name: results-rack-activity-two;
  animation-duration: 6.7s;
}

.results-rack-active .results-rack-activity { animation-play-state: running; }

@keyframes results-rack-activity-one {
  0%, 68%, 74%, 100% { opacity: .72; }
  69%, 73% { opacity: 1; }
}

@keyframes results-rack-activity-two {
  0%, 36%, 42%, 100% { opacity: .72; }
  37%, 41% { opacity: 1; }
}

@media (max-width: 700px) {
  html .results-role-story > .results-proof-hero > picture { aspect-ratio: 1024 / 1536; }
  .results-horeca-order { grid-template-columns: minmax(0, 1fr) auto; }
  .results-horeca-order > * + * { border-left: 1px solid rgba(255, 255, 255, .14); }
  .results-horeca-order > ul { grid-column: 1 / -1; grid-row: 2; border-top: 1px solid rgba(255, 255, 255, .14); border-left: 0; }
  .results-horeca-order > div,
  .results-horeca-order > ul { padding: 12px 13px; }
  .results-horeca-order__state span { padding: 7px 8px; font-size: .6rem; }
}

@media (prefers-reduced-motion: reduce) {
  .results-rack-activity { animation: none !important; opacity: 1 !important; }
}
