/*
 * Modal styles for happynectar.
 *
 * Markup rendered by inc/modals.php on wp_footer; opened/closed by JS
 * in assets/js/core.js. Two style variants from the legacy theme:
 *
 *   - default (style-full-page) — full-viewport white overlay, content
 *     centered, used by tooltips like the track-info modal.
 *   - .style-modal — smaller centered card on a translucent dark overlay,
 *     used by larger modals (video player, image+text, etc.).
 *
 * Extracted from legacy withministries2023 theme.css (lines 1067-1130,
 * 3302-3366).
 */

/* ── Default style (style-full-page) ──────────────────────────────────── */

.happy_modal {
  z-index: 10000;
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.happy_modal .modal_overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
}

.happy_modal .modal_close_trigger {
  height: 36px;
  width: 36px;
  border-radius: 50%;
  border: 2px solid #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 5vh;
  right: 5vw;
  z-index: 30;
  cursor: pointer;
}

.happy_modal .modal_close_trigger svg {
  width: 16px;
}

.happy_modal .modal_inner {
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
}

.happy_modal .modal_inner .video_wrapper {
  position: relative;
  height: auto;
  overflow: hidden;
  width: 100vh;
  max-width: 90vw;
  aspect-ratio: 16 / 9;
}

.happy_modal .modal_inner .video_wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-height: unset;
  max-width: unset;
}

.happy_modal .modal_inner .content_wrapper {
  width: 100vh;
  max-width: 90vw;
}

/* ── .style-modal — smaller card variant ──────────────────────────────── */

.happy_modal.style-modal .modal_overlay {
  background: rgba(35, 42, 60, 0.5);
}

.happy_modal.style-modal .modal_close_trigger {
  border-color: #ffffff;
}

.happy_modal.style-modal .modal_close_trigger svg line {
  stroke: white;
}

.happy_modal.style-modal .modal_inner {
  position: fixed;
  top: 10%;
  left: 10%;
  width: 80%;
  height: 80%;
  background: #FAF5F2;
  border: 1px solid #000000;
  border-radius: 1em;
}

@media screen and (max-width: 781px) {
  .happy_modal.style-modal .modal_inner {
    display: block;
    overflow-y: auto;
  }
}

.happy_modal.style-modal .modal_inner .content_wrapper {
  width: 100%;
  max-width: 90vw;
  padding: 40px;
  overflow: auto;
  max-height: 100%;
}

@media screen and (max-width: 781px) {
  .happy_modal.style-modal .modal_inner .content_wrapper {
    padding: 20px;
  }
}

.happy_modal.style-modal .modal_inner .content_wrapper .wp-block-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

@media screen and (max-width: 781px) {
  .happy_modal.style-modal .modal_inner .content_wrapper .wp-block-columns {
    display: block;
    gap: 0;
  }
}
