* {
  box-sizing: border-box;
}

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

body {
  background: #ffffff;
  color: #f8fafc;
  font-family: Arial, Helvetica, sans-serif;
}

button,
a {
  font: inherit;
}

a {
  color: #0000ff;
  text-decoration: underline;
}

.page-shell {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  display: block;
}

.player-card {
  width: 100%;
  height: 100%;
}

.prep-folder-video {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #ffffff;
}

/* .scene-layer {
  position: absolute;
  inset: 0;
}

.scene-layer--current {
  z-index: 1;
  opacity: 1;
}

.scene-layer--next {
  z-index: -2;
  opacity: 0;
  transition: opacity 360ms ease;
}

.scene-layer--next.is-visible {
  opacity: 1;
} */

.scene-stage {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.scene-layer {
  position: absolute;
  inset: 0;
  opacity: 1;
}

.scene-layer--current {
  z-index: 2;
}

.scene-layer--next {
  z-index: 1;
}

.scene-layer.is-fading-out {
  opacity: 0;
  transition: opacity 360ms ease;
}

.scene {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
  padding: 1rem;
  text-align: center;
  color: #111827;
}

.scene h1,
.scene h2,
.scene h3,
.scene h4 {
  margin: 0;
  padding: 0;
}

.scene h1 {
  font-size: 1.5rem;
}

.scene h3 {
  color: #ff00ff;
  font-size: 1rem;
}

/********************************
SCENES
*********************************/

.scene--title-screen {
  display: flex;
  flex-direction: column;
  justify-content: start;
  padding: 1rem;
  gap: 1rem;
}

/* Med Intro Scene */

.scene--med-intro-screen {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  gap: 1rem;
}

/* Day Intro Scene */

.scene--day-intro {
  background-color: #c8e4f3;
  gap: 1.5rem;
}

.day-intro-calendar {
  --calendar-ink: #163040;
  --calendar-paper: #ffffff;
  --calendar-line: #163040;
  width: min(78vw, 22rem);
  color: var(--calendar-ink);
  filter: drop-shadow(0 0.4rem 0 rgba(22, 48, 64, 0.08));
}

.day-intro-calendar__top {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--calendar-ink);
  border: 4px solid var(--calendar-line);
  border-bottom: 0;
  color: #ffffff;
  font-size: clamp(1.1rem, 5vw, 2rem);
  font-weight: 700;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.day-intro-calendar__top span:empty::before {
  content: '';
}

.day-intro-calendar__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(5, 1fr);
  aspect-ratio: 7 / 5;
  background: var(--calendar-paper);
  border-top: 4px solid var(--calendar-line);
  border-left: 4px solid var(--calendar-line);
}

.day-intro-calendar__cell {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 4px solid var(--calendar-line);
  border-bottom: 4px solid var(--calendar-line);
  font-weight: 700;
  line-height: 1;
}

.day-intro-calendar__cell.has-marker {
  background: var(--calendar-ink);
  color: #ffffff;
}

.day-intro-calendar__cell.is-secondary {
  background: transparent;
  color: var(--calendar-ink);
}

.day-intro-calendar__cell span {
  display: block;
  transform: translateY(0.04em);
  font-size: clamp(1.4rem, 7vw, 3.25rem);
}

.day-intro-calendar__cell.is-secondary span,
.day-intro-calendar__cell.is-star span {
  font-size: clamp(1.4rem, 7vw, 3.25rem);
}

.day-intro-label {
  max-width: 18rem;
  color: #163040;
  font-size: clamp(1.15rem, 4vw, 1.6rem);
  font-weight: 700;
  line-height: 1.2;
}

/* Backward-compatible classes. These can be removed after old playlists stop using them. */
.calendar-icon-large,
.calendar-icon-large-month,
.calendar-icon-large-day {
  display: none;
}

/* Poop Chart Scene */

.scene--poop-chart {
  justify-content: start;
}

.poop-chart {
  height: 90%;
  width: 100%;
  display: grid;
  grid-template-rows: 1fr 1fr 1fr 1fr 1fr;
  gap: 1rem;
}

/* Timeline Scene */

.scene--timeline-step {
  justify-content: start;
  position: relative;
  /* background-color: #c8e4f3; */
}

.scene--timeline-step .current-day-header {
  margin-top: 0.5rem;
}

/* .timeline-header {
  position: absolute;
  top: 0;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.5rem;
  padding: 1rem;
  background-color: #c8e4f3;
} */

.timeline-header {
  position: absolute;
  width: 100%;
  top: 0;
  display: grid;
  /* grid-template-columns: repeat(6, 1fr); */
  grid-template-columns: 1fr 3fr 1fr 1fr;
  gap: 0.5rem;
  padding: 1rem;
  background-color: #c8e4f3;
}

/* .calendar {
  background-color: white;
  color: #163040;
  aspect-ratio: 1 / 1;
  border: 2px solid #163040;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.25;
} */

.calendar {
  background-color: white;
  color: #163040;
  /* aspect-ratio: 1 / 1; */
  border: 2px solid #163040;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.25;
}

.calendar.calendar-icon,
.calendar.calender-icon {
  --calendar-ring-width: 3px;
  --calendar-ring-height: 10px;
  --calendar-ring-top: -7px;
  --calendar-ring-left: 28%;
  --calendar-ring-right: 28%;
  position: relative;
}

.calendar.calendar-icon::before,
.calendar.calendar-icon::after,
.calendar.calender-icon::before,
.calendar.calender-icon::after {
  content: '';
  position: absolute;
  top: var(--calendar-ring-top);
  width: var(--calendar-ring-width);
  height: var(--calendar-ring-height);
  background-color: #163040;
  border-radius: 999px;
}

.calendar.calendar-icon::before,
.calendar.calender-icon::before {
  left: var(--calendar-ring-left);
}

.calendar.calendar-icon::after,
.calendar.calender-icon::after {
  right: var(--calendar-ring-right);
}

.calendar.calendar-filled {
  border: 0px solid #16304055;
  background-color: #16304055;
}

.calendar.current {
  opacity: 1;
}

.body-below-calendar {
  /* margin-top: 4rem; */
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.center-icon {
  margin: 3rem auto 0 auto;
  width: 150px;
  height: auto;
}

.list-center-no-bullets {
  list-style-type: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  font-size: 1rem;
}

.body-below-calendar-card {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.body-below-calendar-card header {
  display: flex;
  align-items: left;
  border-bottom: 1px solid #ff00ff;
  padding: 0.25rem 0;
}

.body-below-calendar-card-row {
  display: grid;
  grid-template-columns: 4fr 1fr;
  justify-items: start;
  gap: 1rem;
}

.body-below-calendar-card-row p {
  text-align: left;
  margin: 1rem 0 0 0;
}

.body-below-calendar-card-row img {
  width: 100%;
  height: auto;
  margin: 0.5rem 0 0 0;
}

/********************************
IMAGES
*********************************/

.prep-medication-photo img {
  width: 200px;
  height: auto;
  margin: 20px 0 0 0;
}

.clinic-logo img {
  width: 200px;
  height: auto;
  /* margin: 20px 0 0 0; */
  margin: 20px 0; /* temp while captions gone */
}

.full-background-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.scene--title-screne img {
  width: 100px;
  height: auto;
  margin: 20px 0 0 0;
}

/* end images */
/*
.scene-section {
  margin: 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: #111827;
  color: white;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.scene-icon {
  width: 34%;
  max-width: 132px;
  height: auto;
}

.scene-copy {
  width: 100%;
  padding: 1.4rem;
  border-radius: 24px;
  background: white;
  box-shadow: 0 16px 40px rgba(17, 24, 39, 0.1);
}

.scene-copy h2 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.7rem, 7vw, 2.45rem);
  line-height: 1.05;
}

.scene-copy p {
  margin: 0;
  font-size: clamp(1rem, 4vw, 1.25rem);
  line-height: 1.35;
}

.scene-button {
  display: inline-flex;
  margin-top: 1.1rem;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  background: #111827;
  color: white;
  text-decoration: none;
  font-weight: 700;
} */

/********************************
CAPTIONS
*********************************/

.caption-box {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: -4; /* temp hide behind video */
  min-height: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.8);
  color: black;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: pre-line;
}

.caption-box:empty {
  display: none;
}

/********************************
BUTTONS
*********************************/

.big-play-button {
  position: absolute;
  inset: 0;
  z-index: 5;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0);
  color: white;
  cursor: pointer;
  opacity: 1;
  transition: opacity 500ms ease;
}

.play-pause-svg {
  width: 66%;
  height: 66%;
  display: block;
  fill: currentColor;
  pointer-events: none;
}

.big-play-button__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.78);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.28);
  font-size: 2rem;
  line-height: 1;
}

.big-play-button.is-playing {
  background: transparent;
  opacity: 0;
  transition: opacity 2000ms ease;
}

.big-play-button.is-playing .big-play-button__icon {
  opacity: 0;
  transform: scale(0.94);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.big-play-button.is-playing:hover .big-play-button__icon,
.big-play-button.is-playing:focus-visible .big-play-button__icon {
  opacity: 1;
  transform: scale(1);
}

/********************************
NOT USED
*********************************/

.controls {
  /* padding: 1rem 0 0; */
  display: none;
}

.progress-track {
  width: 100%;
  height: 0.55rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: none; /* temporary */
}

.progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: white;
  transition: width 120ms linear;
}

.control-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.9rem;
}

.small-button {
  border: 0;
  border-radius: 999px;
  padding: 0.6rem 0.85rem;
  background: rgba(255, 255, 255, 0.12);
  color: black;
  cursor: pointer;
}

.small-button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.clip-label {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
}

.notes-card {
  max-width: 480px;
}

.notes-card h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
}

.notes-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 1.05rem;
  line-height: 1.55;
}

.center-icon-only img {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 200px;
  height: auto;
}

.icon-only {
  padding: 0;
}

.video-action-button {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  z-index: 100;
}

.video-action-button button {
  border: 2px solid #000000;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: #000000;
  color: #ffffff;
  font-weight: 700;
}

@media (max-width: 760px) {
  .page-shell {
    display: block;
    /* padding: 0.75rem; */
  }

  .player-card {
    max-width: 390px;
    margin: 0 auto;
  }

  .notes-card {
    max-width: 390px;
    margin: 1.5rem auto 0;
  }
}

.video-action-button a {
  display: inline-flex;
  border: 2px solid #000000;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  background: #000000;
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

/********************************
END CARD
*********************************/

.end-card {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.96);
  color: #111827;
  text-align: center;
}

.end-card[hidden] {
  display: none;
}

.end-card__content {
  width: min(100%, 420px);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.end-card__title,
.end-card__text {
  margin: 0;
}

.end-card__title {
  font-size: 1.75rem;
  line-height: 1.05;
}

.end-card__text {
  font-size: 1rem;
  line-height: 1.35;
}

.end-card__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.end-card__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  border: 2px solid #163040;
  border-radius: 999px;
  background: #ffffff;
  color: #163040;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.end-card__button:hover,
.end-card__button:focus-visible {
  background: #f2f7fa;
}

.prep-folder-video.has-end-card .big-play-button {
  display: none;
}
