/* The camcorder walkthrough's scenes, drawn in stage pixels (1280 x 800). The
   windows mimic CamDrop's Tk windows, HandBrake and Google Drive, restyled
   with the site's palette. Window chrome comes from walkthrough.css. */

/* ---------- desktop ---------- */

.taskbar {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 56px;
  padding: 0 18px;
  border-top: var(--line) solid var(--ink);
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 15px;
}

.tb-start {
  width: 28px;
  height: 28px;
  margin-right: 8px;
  border: 2px solid var(--ink);
  border-radius: 7px;
  background:
    linear-gradient(var(--ink), var(--ink)) 50% 50% / 2px 100% no-repeat,
    linear-gradient(var(--ink), var(--ink)) 50% 50% / 100% 2px no-repeat;
}

.tb-app {
  padding: 6px 12px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink-2);
}

.tb-handbrake {
  border-color: var(--accent);
  border-bottom-width: 3px;
  color: var(--ink);
}

.tb-tray {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-left: auto;
}

.tb-camdrop {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);

  svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: var(--accent);
    stroke-width: 2;
    stroke-linejoin: round;
  }
}

/* The laptop's side, with the SD card going in or out of its slot. */
.inset {
  width: 280px;
  height: 160px;
  padding: 12px 14px;
  overflow: hidden;
  border: 2px solid var(--ink);
  border-radius: 14px;
  background: var(--paper);
}

.inset-label {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.laptop-side {
  position: absolute;
  z-index: 1;
  top: 44px;
  left: 14px;
  width: 168px;
  height: 96px;
  border: 2px solid var(--ink);
  border-radius: 10px;
  background: var(--paper-2);

  &.is-active .slot {
    background: var(--accent);
    box-shadow: 0 0 14px var(--accent);
  }
}

.slot {
  position: absolute;
  top: 24px;
  right: -2px;
  width: 6px;
  height: 46px;
  border-radius: 3px;
  background: var(--ink);
}

.sd-card {
  position: absolute;
  top: 58px;
  left: 150px;
  display: grid;
  place-items: center;
  width: 84px;
  height: 66px;
  border: 2px solid var(--ink);
  border-radius: 6px 6px 6px 18px;
  background: var(--accent);
  color: var(--on-accent);
  font: 600 18px/1 var(--font-mono);
}

.foot-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ---------- 1. what did you plug in ---------- */

.ask {
  width: 580px;
}

.choice {
  display: flex;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px 16px;
  border: var(--line) solid var(--ink-3);
  border-radius: 10px;

  b {
    flex: none;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 1.5px solid currentColor;
    border-radius: 8px;
    font-family: var(--font-mono);
  }

  strong {
    display: block;
    font-size: 20px;
  }

  small {
    display: block;
    font-size: 16px;
    color: var(--ink-2);
  }

  &.is-default {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 9%, var(--paper));
  }

  &.is-pressed {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    color: var(--on-accent);

    small {
      color: inherit;
    }
  }
}

/* ---------- 2. the folder picker ---------- */

.picker {
  width: 680px;
  font-size: 17px;

  .win-head {
    padding: 12px 24px;
  }

  .win-head h3 {
    margin-bottom: 2px;
  }

  .win-body {
    padding: 12px 24px;
  }

  .win-foot {
    padding-bottom: 14px;
  }
}

.progress-line {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 4px 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
}

.progress-title {
  font-weight: 600;
}

.mark {
  width: 22px;
  height: 22px;
  margin-top: 2px;
  border: 2px solid var(--ink-3);
  border-radius: 50%;

  &.is-running {
    border-color: var(--accent);
    border-right-color: transparent;
  }

  &.is-done {
    border-color: var(--ok);
    background:
      linear-gradient(
          45deg,
          transparent 45%,
          var(--ok) 45% 60%,
          transparent 60%
        )
        2px 6px / 8px 8px no-repeat,
      linear-gradient(
          -45deg,
          transparent 42%,
          var(--ok) 42% 58%,
          transparent 58%
        )
        6px 2px / 10px 12px no-repeat;
  }
}

.ask-line {
  margin: 10px 0 6px;
  font-size: 20px;
  font-weight: 600;
}

.tree {
  width: 100%;
  border: 1px solid var(--rule);
  border-collapse: collapse;

  th {
    padding: 6px 12px;
    border-bottom: 1px solid var(--rule);
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  td {
    padding: 4px 12px;
  }

  th + th,
  td + td {
    width: 80px;
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .is-selected td {
    background: var(--accent-ink);
    color: var(--on-accent);
  }
}

.link-line {
  margin: 6px 0 4px;
  color: var(--accent-ink);
}

.check-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;

  &::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid var(--accent-ink);
    border-radius: 4px;
    background:
      linear-gradient(
          45deg,
          transparent 40%,
          var(--accent-ink) 40% 58%,
          transparent 58%
        )
        1px 5px / 7px 7px no-repeat,
      linear-gradient(
          -45deg,
          transparent 42%,
          var(--accent-ink) 42% 58%,
          transparent 58%
        )
        4px 1px / 10px 12px no-repeat;
  }
}

/* ---------- 3. checking the numbers ---------- */

.renumber {
  width: 820px;

  .win-body {
    min-height: 470px;
  }
}

.ranges {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;

  div {
    display: grid;
    grid-template-columns: 150px 1fr;
  }

  dt {
    font-family: var(--font-mono);
    font-size: 14px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  dd {
    margin: 0;
    font-family: var(--font-mono);
    font-size: 22px;
  }
}

.flag {
  display: inline-block;
  padding: 10px 16px;
  border: 2px solid var(--danger);
  border-radius: 10px;
  color: var(--danger);
  font-size: 20px;
  font-weight: 600;
}

.plan {
  width: 100%;
  margin-bottom: 14px;
  border-collapse: collapse;
  font-family: var(--font-mono);
  font-size: 17px;

  th {
    padding: 6px 10px;
    border-bottom: var(--line) solid var(--ink);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-align: left;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  td {
    padding: 7px 10px;
    border-bottom: 1px solid var(--rule);
  }

  .plan-gap td {
    color: var(--ink-3);
    text-align: center;
  }
}

.sort-title {
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 600;
}

.sort-option {
  margin-top: 12px;
  padding: 10px 12px;
  border: var(--line) solid var(--rule);
  border-radius: 10px;

  &.is-chosen {
    border-color: var(--accent);
    background: color-mix(in srgb, var(--accent) 9%, var(--paper));
  }

  p {
    margin-bottom: 8px;
  }

  .muted {
    margin-left: 8px;
    font-size: 15px;
  }
}

.thumbs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;

  img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
  }

  .is-question {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
  }
}

.verify-count {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 22px;
}

/* ---------- 4. HandBrake ---------- */

.handbrake {
  width: 860px;
}

.xray {
  padding: 2px 10px;
  border: 1px dashed var(--accent);
  border-radius: 6px;
  font-size: 13px;
  color: var(--accent-ink);
}

.hb-tools {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--rule);

  span {
    padding: 8px 14px;
    border: 1px solid var(--rule);
    border-radius: 8px;
  }

  .is-pressed {
    background: var(--accent-ink);
    border-color: var(--accent-ink);
    color: var(--on-accent);
  }
}

.hb-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 28px;
  margin: 0;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);

  dt {
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--ink-3);
  }

  dd {
    margin: 2px 0 0;
  }
}

.hb-queue {
  padding: 14px 20px 20px;
}

.hb-queue-title {
  margin-bottom: 8px;
  font-weight: 600;
}

.job {
  display: grid;
  grid-template-columns: 130px 1fr 110px;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 16px;

  .meter {
    margin: 0;
  }
}

/* ---------- 5. Google Drive ---------- */

.drive {
  width: 980px;
}

.drive-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
}

.drive-nav {
  padding: 16px;
  border-right: 1px solid var(--rule);

  p {
    padding: 7px 12px;
    border-radius: 8px;
    color: var(--ink-2);
  }

  .is-on {
    background: var(--paper-2);
    color: var(--ink);
    font-weight: 600;
  }
}

.drive-main {
  padding: 16px 20px 22px;
}

.crumbs {
  font-size: 19px;
  font-weight: 600;
}

.folder-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
}

.folder-tab {
  padding: 6px 16px;
  border: 1px solid var(--rule);
  border-radius: 999px;

  &.is-on {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper);
  }
}

.drive-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-content: start;
  gap: 14px;
}

.tile {
  position: relative;

  img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border: 1px solid var(--rule);
    border-radius: 8px;
  }

  figcaption {
    margin-top: 4px;
    overflow: hidden;
    font-family: var(--font-mono);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  &.is-part img {
    opacity: 0.45;
  }
}

.tile-more {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--ink-3);
  border-radius: 8px;
  color: var(--ink-2);
}

.length {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 1px 7px;
  border-radius: 5px;
  background: rgb(0 0 0 / 0.7);
  color: #fff;
  font: 500 13px/1.5 var(--font-mono);
}

.notice {
  width: 410px;
  padding: 16px 18px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--paper);
  box-shadow: 8px 8px 0 var(--shade);
}

.notice-app {
  margin-bottom: 4px;
  font-family: var(--font-mono);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
