/*
 * Review page: device picker, device chrome, the TV remote, and notes.
 */

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  overflow: hidden;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: #06080c;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

.icon {
  width: 1em;
  height: 1em;
  flex: none;
}

.rv {
  height: 100%;
  display: grid;
  grid-template-columns: 248px 1fr 300px;
  grid-template-rows: 64px 1fr;
  grid-template-areas:
    'top top top'
    'devices stage notes';
}

.rv.notes-off {
  grid-template-columns: 248px 1fr 0;
}

/* Top bar --------------------------------------------------------------- */

.rv-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #0a0d13;
}

.rv-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.rv-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 900;
  font-size: 18px;
  flex: none;
}

.rv-brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rv-brand__text b {
  font-size: 15px;
}

.rv-brand__text span {
  font-size: 12px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.rv-seg {
  display: flex;
  padding: 3px;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--line);
}

.rv-seg button {
  min-width: 40px;
  height: 30px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
}

.rv-seg button.is-on {
  background: var(--surface-3);
  color: var(--text);
}

.rv-swatches {
  display: flex;
  gap: 6px;
  padding: 0 4px;
}

.rv-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  box-shadow: inset 0 0 0 3px #0a0d13;
}

.rv-swatch.is-on {
  border-color: var(--text);
}

.rv-btn {
  height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 10px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 650;
  color: var(--text-2);
}

.rv-btn .icon {
  font-size: 18px;
}

.rv-btn:hover {
  color: var(--text);
}

.rv-btn[disabled] {
  opacity: 0.35;
  cursor: default;
}

.rv-btn.is-on {
  color: var(--text);
  border-color: var(--line-strong);
}

/* Device list ----------------------------------------------------------- */

.rv-devices {
  grid-area: devices;
  overflow-y: auto;
  padding: 14px 12px 24px;
  border-right: 1px solid var(--line);
  background: #080b10;
}

.rv-group {
  margin: 14px 8px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rv-group:first-child {
  margin-top: 4px;
}

.rv-device {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 10px;
  border-radius: 12px;
  text-align: left;
  color: var(--text-2);
}

.rv-device:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.rv-device.is-on {
  background: var(--accent-soft);
  color: var(--text);
}

.rv-device__icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--surface-1);
  font-size: 20px;
  flex: none;
}

.rv-device.is-on .rv-device__icon {
  background: var(--accent);
  color: var(--accent-contrast);
}

.rv-device__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rv-device__text b {
  font-size: 13.5px;
  font-weight: 650;
}

.rv-device__text span {
  font-size: 11.5px;
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Stage ----------------------------------------------------------------- */

.rv-stage {
  grid-area: stage;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(
      900px 600px at 50% 40%,
      rgba(255, 255, 255, 0.04),
      transparent 70%
    ),
    #06080c;
}

.rv-rig {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 90px;
  transform-origin: center center;
}

.rv-rig iframe {
  display: block;
  border: 0;
  background: #000;
}

/* Phones and tablets ---------------------------------------------------- */

.dev {
  position: relative;
  flex: none;
  background: #111317;
  box-shadow:
    0 0 0 2px #2a2d34,
    0 40px 80px rgba(0, 0, 0, 0.55);
}

.dev__screen {
  position: relative;
  overflow: hidden;
  background: #000;
}

.dev--iphone {
  padding: 14px;
  border-radius: 62px;
}

.dev--iphone .dev__screen {
  border-radius: 48px;
}

.dev--android {
  padding: 12px;
  border-radius: 44px;
}

.dev--android .dev__screen {
  border-radius: 34px;
}

.dev--ipad,
.dev--androidtab {
  padding: 26px;
  border-radius: 40px;
}

.dev--ipad .dev__screen,
.dev--androidtab .dev__screen {
  border-radius: 16px;
}

.statusbar {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-size: 16px;
  font-weight: 650;
  color: #fff;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.statusbar__icons {
  display: flex;
  gap: 6px;
  align-items: center;
}

.statusbar svg {
  height: 13px;
  width: auto;
}

.dev--iphone .statusbar {
  height: 54px;
  padding: 6px 38px 0 46px;
}

.dev--android .statusbar {
  height: 36px;
  padding: 0 22px;
  font-size: 14px;
}

.dev--ipad .statusbar,
.dev--androidtab .statusbar {
  height: 24px;
  padding: 0 22px;
  font-size: 13px;
}

.dev--androidtab .statusbar {
  height: 28px;
}

.island {
  position: absolute;
  top: 11px;
  left: 50%;
  z-index: 4;
  width: 124px;
  height: 36px;
  border-radius: 18px;
  background: #000;
  transform: translateX(-50%);
  pointer-events: none;
}

.punch {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 4;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #000;
  box-shadow: 0 0 0 2px #15171b;
  transform: translateX(-50%);
  pointer-events: none;
}

.homebar {
  position: absolute;
  left: 50%;
  bottom: 8px;
  z-index: 4;
  width: 136px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.82);
  transform: translateX(-50%);
  pointer-events: none;
}

.dev--android .homebar,
.dev--androidtab .homebar {
  width: 108px;
  height: 4px;
  bottom: 9px;
}

.dev--ipad .homebar {
  width: 300px;
}

/* Phones turn to landscape while a video plays, with no status bar. */

.dev--iphone.dev--landscape .statusbar,
.dev--android.dev--landscape .statusbar {
  display: none;
}

.dev--landscape .island {
  top: 50%;
  left: 11px;
  width: 36px;
  height: 124px;
  transform: translateY(-50%);
}

.dev--landscape .punch {
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
}

/* Browser window --------------------------------------------------------- */

.win {
  flex: none;
  border-radius: 14px;
  overflow: hidden;
  background: #1d2027;
  box-shadow:
    0 0 0 1px #2c3038,
    0 40px 80px rgba(0, 0, 0, 0.55);
}

.win__bar {
  height: 84px;
  display: flex;
  flex-direction: column;
  background: #1d2027;
  border-bottom: 1px solid #2c3038;
}

.win__tabs {
  height: 40px;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 0 14px;
}

.win__lights {
  display: flex;
  gap: 8px;
  align-self: center;
  margin-right: 14px;
}

.win__lights span {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ff5f57;
}

.win__lights span:nth-child(2) {
  background: #febc2e;
}

.win__lights span:nth-child(3) {
  background: #28c840;
}

.win__tab {
  height: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 10px 10px 0 0;
  background: #2a2e37;
  font-size: 13px;
  color: var(--text-2);
}

.win__tab i {
  width: 14px;
  height: 14px;
  border-radius: 4px;
  background: var(--accent);
}

.win__url {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: #2a2e37;
}

.win__url div {
  flex: 1;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border-radius: 15px;
  background: #1a1d23;
  font-size: 13px;
  color: var(--text-2);
}

.win__url .icon {
  font-size: 14px;
  color: var(--text-3);
}

/* TV and stand ----------------------------------------------------------- */

.tvset {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.tvset__frame {
  padding: 16px;
  border-radius: 14px;
  background: #0d0e11;
  box-shadow:
    0 0 0 3px #24262c,
    0 50px 100px rgba(0, 0, 0, 0.6);
}

.tvset__stand {
  width: 420px;
  height: 70px;
  margin-top: -2px;
  background: linear-gradient(180deg, #1b1d22, #0e0f12);
  clip-path: polygon(
    44% 0,
    56% 0,
    64% 70%,
    100% 70%,
    100% 100%,
    0 100%,
    0 70%,
    36% 70%
  );
}

/* Remote ----------------------------------------------------------------- */

.remote {
  flex: none;
  width: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 26px;
  padding: 44px 26px 52px;
  border-radius: 125px;
  background: linear-gradient(180deg, #24262d, #15161a);
  box-shadow:
    0 0 0 2px #31343c,
    0 40px 80px rgba(0, 0, 0, 0.55);
  user-select: none;
}

.remote--google {
  background: linear-gradient(180deg, #eceef2, #d6d9df);
  box-shadow:
    0 0 0 2px #c4c8d0,
    0 40px 80px rgba(0, 0, 0, 0.55);
  color: #20232a;
}

.remote--lg {
  border-radius: 125px 125px 110px 110px;
  background: linear-gradient(180deg, #f3f4f6, #dcdfe4);
  box-shadow:
    0 0 0 2px #c9ccd3,
    0 40px 80px rgba(0, 0, 0, 0.55);
  color: #20232a;
}

.remote--fire {
  width: 214px;
  background: linear-gradient(180deg, #1d1e22, #111214);
}

.remote--samsung {
  width: 220px;
  background: linear-gradient(180deg, #2c2f36, #191b1f);
}

.remote__row {
  display: flex;
  gap: 18px;
  justify-content: center;
}

.rkey {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.35);
  transition: transform 0.08s ease;
}

.remote--google .rkey,
.remote--lg .rkey {
  background: #ffffff;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.15);
}

.rkey:active,
.rkey.is-pressed {
  transform: scale(0.92);
}

.rkey--power {
  width: 40px;
  height: 40px;
  font-size: 18px;
  color: #ff5f57;
}

.dpad {
  position: relative;
  width: 196px;
  height: 196px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.06);
}

.remote--google .dpad,
.remote--lg .dpad {
  background: #ffffff;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.05),
    0 2px 4px rgba(0, 0, 0, 0.15);
}

.dpad button {
  position: absolute;
  display: grid;
  place-items: center;
  font-size: 26px;
  opacity: 0.85;
}

.dpad__up,
.dpad__down {
  left: 60px;
  width: 76px;
  height: 56px;
}

.dpad__up {
  top: 2px;
}

.dpad__down {
  bottom: 2px;
}

.dpad__left,
.dpad__right {
  top: 60px;
  width: 56px;
  height: 76px;
}

.dpad__left {
  left: 2px;
}

.dpad__right {
  right: 2px;
}

.dpad__ok {
  left: 56px;
  top: 56px;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  font-size: 15px !important;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.remote--google .dpad__ok,
.remote--lg .dpad__ok {
  background: #eef0f3;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.06);
}

.dpad button:active {
  transform: scale(0.92);
}

.rocker {
  width: 58px;
  height: 128px;
  border-radius: 29px;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.remote--google .rocker,
.remote--lg .rocker {
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

.rocker button {
  flex: 1;
  font-size: 13px;
  font-weight: 800;
}

.rocker button:active {
  background: rgba(127, 127, 127, 0.2);
}

.rocker span {
  display: block;
  text-align: center;
  font-size: 10px;
  font-weight: 800;
  opacity: 0.6;
}

.colors {
  display: flex;
  gap: 10px;
}

.colors button {
  width: 38px;
  height: 16px;
  border-radius: 8px;
}

.remote__label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.5;
  text-align: center;
}

.remote__mid {
  display: flex;
  gap: 18px;
  align-items: center;
}

.remote__col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.numpad {
  display: grid;
  grid-template-columns: repeat(3, 48px);
  gap: 10px 14px;
}

.numpad button {
  height: 34px;
  border-radius: 12px;
  background: #ffffff;
  box-shadow:
    inset 0 -2px 0 rgba(0, 0, 0, 0.12),
    0 1px 2px rgba(0, 0, 0, 0.15);
  font-size: 15px;
  font-weight: 750;
  color: #20232a;
}

.numpad button:active {
  transform: scale(0.92);
}

/* Notes ------------------------------------------------------------------ */

.rv-notes {
  grid-area: notes;
  overflow-y: auto;
  padding: 18px 18px 30px;
  border-left: 1px solid var(--line);
  background: #080b10;
}

.notes-off .rv-notes {
  display: none;
}

.rv-notes h2 {
  margin: 0 0 4px;
  font-size: 16px;
}

.rv-notes h3 {
  margin: 22px 0 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rv-notes .rv-sub {
  margin: 0;
  font-size: 12.5px;
  color: var(--text-3);
}

.rv-notes ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.rv-kbd {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 12px;
  font-size: 12.5px;
  color: var(--text-2);
}

.rv-kbd kbd {
  padding: 1px 7px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  font-family: inherit;
  font-size: 11.5px;
  color: var(--text);
}

/* Narrow windows: device chips on top, notes as a drawer ---------------- */

@media (max-width: 980px) {
  .rv,
  .rv.notes-off {
    grid-template-columns: 1fr;
    grid-template-rows: 58px auto 1fr;
    grid-template-areas:
      'top'
      'devices'
      'stage';
  }

  .rv-top {
    padding: 0 12px;
    gap: 10px;
  }

  .rv-brand__text span {
    display: none;
  }

  .rv-btn span {
    display: none;
  }

  .rv-devices {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    scrollbar-width: none;
  }

  .rv-group {
    display: none;
  }

  .rv-device {
    width: auto;
    flex: none;
    padding: 6px 10px 6px 6px;
  }

  .rv-device__icon {
    width: 28px;
    height: 28px;
    font-size: 16px;
  }

  .rv-device__text span {
    display: none;
  }

  .rv-notes {
    position: fixed;
    right: 0;
    top: 58px;
    bottom: 0;
    z-index: 20;
    width: min(340px, 90vw);
    box-shadow: -20px 0 40px rgba(0, 0, 0, 0.5);
  }
}

@media (max-width: 560px) {
  .rv-swatches {
    display: none;
  }
}

.rv-mark .icon {
  font-size: 18px;
}

.rv-sub--gap {
  margin: 14px 0 8px !important;
}

.rv-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rv-jumps button {
  height: 30px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--surface-1);
  border: 1px solid var(--line);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}

.rv-jumps button:hover {
  color: var(--text);
  border-color: var(--line-strong);
}
