/* =========================
   GLOBAL FIX (IMPORTANT)
   ========================= */

html, body {
  overflow-x: hidden;
}

*, *::before, *::after {
  box-sizing: border-box;
}

/* =========================
   IMAGE / VIDEO SIZES
   ========================= */

.fire {
  width: 100%;
  max-width: 20rem;
  height: auto;
  display: block;
  cursor: pointer;
  border-radius: 7px;
  object-fit: cover;
}

.flint {
  width: 100%;
  max-width: 16rem;
  height: auto;
  border-radius: 7px;
}

.acorns {
  width: 100%;
  max-width: 16rem;
  border-radius: 7px;
  aspect-ratio: 3 / 4;
  height: auto;
}

/* =========================
   CENTERING CONTAINER
   ========================= */

.media {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
  border-radius: 10px;
}

.videotitle {
  text-align: center;
}

/* =========================
   VIDEO WRAPPER
   ========================= */

.video-wrapper {
  position: relative;
  display: block;
  width: 100%;
  max-width: 20rem;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 10px;
}

/* Make video scale properly */
.video-wrapper video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
}

/* =========================
   PLAY BUTTON OVERLAY
   ========================= */

.play-overlay {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: none;
  background: #cb5430;
  color: #D5B982;
  font-size: 28px;
  cursor: pointer;
}

.play-overlay:hover {
  background-color: #D5B982;
  color: #cb5430;
}

/* =========================
   CONTROLS BAR
   ========================= */

.controls {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.55);
  padding: 8px;
  border-radius: 0 0 10px 10px;

  opacity: 0;
  pointer-events: none;
  transition: 0.25s ease;
}

.video-wrapper:hover .controls {
  opacity: 1;
  pointer-events: auto;
}

/* =========================
   TIME DISPLAY
   ========================= */

.top-row {
  font-size: 12px;
  color: white;
  margin-bottom: 4px;
}

/* =========================
   BOTTOM CONTROLS
   ========================= */

.bottom-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* =========================
   PROGRESS BAR
   ========================= */

.progress {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #D5B982;
  border-radius: 5px;
  outline: none;
}

.progress::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cb5430;
  cursor: pointer;
}

/* =========================
   VOLUME CONTROL
   ========================= */

.volume-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.volume {
  width: 0;
  opacity: 0;
  transition: 0.2s;

  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: #D5B982;
  border-radius: 5px;
  outline: none;
  cursor: pointer;
}

/* Expand volume slider */
.volume-wrapper.active .volume {
  width: 80px;
  opacity: 1;
}

/* Thumb (WebKit) */
.volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cb5430;
  cursor: pointer;
}

/* Thumb (Firefox) */
.volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cb5430;
  border: none;
  cursor: pointer;
}

/* Track (Firefox) */
.volume::-moz-range-track {
  height: 4px;
  background: #D5B982;
  border-radius: 5px;
}

/* =========================
   MOBILE FIXES
   ========================= */

@media (max-width: 600px) {
  .fire,
  .flint,
  .acorns,
  .video-wrapper {
    max-width: 100%;
  }

  .media {
    gap: 0.5rem;
  }
}