/* คู่มือ WastePRO — the reset, the icons and the video player; style.css sets the --mp-* and --font-* tokens and
   draws everything else. */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
body {
  margin: 0;
}
img,
video {
  display: block;
  max-width: 100%;
}
button,
input,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus, #2f8fbd);
  outline-offset: 2px;
}
.i {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.i.fill {
  fill: currentColor;
  stroke: none;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── the player ─────────────────────────────────────────────────────────────── */
.mp {
  --mp-radius: 14px;
  display: grid;
  gap: 0;
  border-radius: var(--mp-radius);
  overflow: hidden;
  background: var(--mp-bg, #0f1720);
  box-shadow: var(--mp-shadow, 0 10px 30px rgba(15, 23, 32, 0.12));
}
.mp-phone {
  width: fit-content;
  max-width: 100%;
  margin-inline: auto;
}
.mp-frame {
  position: relative;
  background: var(--mp-stage, #0f1720);
  display: grid;
  place-items: center;
}
.mp-frame video {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: contain;
  background: var(--mp-stage, #0f1720);
  cursor: pointer;
}
.mp-phone .mp-frame video {
  aspect-ratio: 390 / 844;
  width: auto;
  height: min(72vh, 760px);
  max-width: 100%;
}
.mp-big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 76px;
  height: 76px;
  border: 0;
  border-radius: 999px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--mp-accent, #12936f);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  font-size: 30px;
  transition: transform 0.15s, opacity 0.2s;
}
.mp-big:hover {
  transform: scale(1.06);
}
.mp.is-playing .mp-big {
  opacity: 0;
  pointer-events: none;
}
.mp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--mp-bar, #ffffff);
  color: var(--mp-ink, #142033);
  border-top: 1px solid var(--mp-line, rgba(20, 32, 51, 0.08));
}
.mp-btn {
  width: 36px;
  height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font-size: 18px;
}
.mp-btn:hover {
  background: var(--mp-hover, rgba(20, 32, 51, 0.07));
}
.mp-time {
  flex: none;
  font: 500 13px/1 var(--font-mono, ui-monospace, monospace);
  font-variant-numeric: tabular-nums;
  color: var(--mp-muted, #5d6b72);
  min-width: 86px;
}
.mp-track {
  position: relative;
  flex: 1;
  height: 28px;
  cursor: pointer;
  touch-action: none;
}
.mp-rail,
.mp-fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 6px;
  margin-top: -3px;
  border-radius: 999px;
}
.mp-rail {
  right: 0;
  background: var(--mp-rail, rgba(20, 32, 51, 0.12));
}
.mp-fill {
  width: 0;
  background: var(--mp-accent, #12936f);
}
.mp-tick {
  position: absolute;
  top: 50%;
  width: 3px;
  height: 12px;
  margin: -6px 0 0 -1.5px;
  border-radius: 2px;
  background: var(--mp-tick, #f59e0b);
  z-index: 1;
}
.mp-knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border-radius: 999px;
  background: #fff;
  border: 3px solid var(--mp-accent, #12936f);
  z-index: 2;
}
.mp-speed {
  flex: none;
  height: 32px;
  padding: 0 8px;
  border-radius: 8px;
  border: 1px solid var(--mp-line, rgba(20, 32, 51, 0.15));
  background: transparent;
  font-size: 13px;
}
.mp:fullscreen {
  border-radius: 0;
  grid-template-rows: 1fr auto;
}
.mp:fullscreen .mp-frame video {
  height: 100%;
  max-height: calc(100vh - 60px);
  width: 100%;
}
/* a phone video is narrow: its track gets a row of its own */
.mp-phone .mp-bar {
  flex-wrap: wrap;
  row-gap: 4px;
}
.mp-phone .mp-track {
  order: -1;
  flex-basis: 100%;
}
.mp-phone .mp-time {
  min-width: 0;
  margin-right: auto;
}
@media (max-width: 560px) {
  .mp-time {
    min-width: 0;
    font-size: 12px;
  }
  .mp-speed {
    display: none;
  }
  .mp-bar {
    gap: 8px;
    padding: 8px 10px;
  }
  .mp-phone .mp-frame video {
    height: min(68vh, 640px);
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
    animation: none !important;
  }
}
