/* The audio modal (AudioPlayer.cshtml): a soft mint panel with a warm glow behind the
   illustration, "Luk" in its own row at the top and the title centred under it. Below 576px it
   fills the screen (modal-fullscreen-sm-down), the illustration takes the free space and the
   player sits at the bottom. The player bar itself is styled in
   tools/videojs-skin/src/helpii-audio.css. */
.helpii-audio-modal .modal-content {
  border: 0;
  border-radius: 2rem;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 50% 45%, rgb(255 210 130 / 0.55), transparent 45%),
    linear-gradient(160deg, #f7fbf8, #e5f0eb);
  box-shadow: 0 12px 40px rgb(41 50 74 / 0.2);
}

.helpii-audio-modal .modal-header {
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
  padding: 0 0 1.25rem;
  border: 0;
}

.helpii-audio-modal .modal-title {
  margin: 0;
  font-size: 1.5rem;
  text-align: center;
  color: var(--main-blue-color, #29324a);
}

.helpii-audio-modal .helpii-audio-close {
  display: inline-flex;
  align-self: flex-end;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1.25rem;
  font-weight: 700;
  color: var(--main-blue-color, #29324a);
  background-color: #fff;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgb(41 50 74 / 0.12);
}

.helpii-audio-modal .helpii-audio-close:hover {
  background-color: #f1f4f2;
}

.helpii-audio-modal .modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 0;
}

/* Centres the illustration. It is the card itself, so it is shown as it is, with rounded
   corners. */
.helpii-audio-art {
  display: flex;
  align-items: center;
  justify-content: center;
}

.helpii-audio-modal #image {
  display: block;
  max-width: 100%;
  max-height: 45vh;
  margin: 0;
  border-radius: 1rem;
}

/* The player spans the modal. */
.helpii-audio-modal media-i18n {
  display: block;
}

/* Full screen on phones: square edges, the illustration grows into the free space and the
   player stays at the bottom. No env(safe-area-inset-*) in the padding: the page does not set
   viewport-fit=cover, so the browser already keeps the page clear of the system bars, and some
   Android browsers still report the bars as insets, which counted them twice. */
@media (max-width: 575.98px) {
  .helpii-audio-modal .modal-content {
    border-radius: 0;
    box-shadow: none;
    padding: 1rem 1rem 1.25rem;
  }

  .helpii-audio-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible;
  }

  /* The illustration grows into the free space. The art area is a size container, so the width
     can follow whichever of its width and height runs out first. The illustrations are 200 x 320,
     so 5:8, and enlarging them softens them, so the width stops at 280px (1.4x) until larger
     illustrations come. Then remove the 280px. */
  .helpii-audio-art {
    flex: 1 1 0;
    min-height: 0;
    container-type: size;
  }

  .helpii-audio-modal #image {
    width: min(100cqw, 100cqh * 5 / 8, 280px);
    height: auto;
    max-height: 100%;
  }
}
