/* Modal Styles */

/* The modal root is relocated to <body> by the block script (z-index fix) and
   carries the `bokka-plugin` class ITSELF, so the scoped-important Tailwind
   build (`.bokka-plugin .utility`) never matches it. Every rule that targets
   the root element - including the show/hide toggle - must therefore be
   self-matching, not `.bokka-plugin`-prefixed. Child rules stay scoped: they
   are descendants of the root either way. */
.modal-component {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999999 !important;
}

.modal-component.hidden {
  display: none !important;
}

.bokka-plugin .modal-overlay {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  background-color: rgba(0, 0, 0, 0.5) !important;
}

.bokka-plugin .modal-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  overflow-y: auto !important;
  padding-top: 5rem !important;
  z-index: 99999999 !important;
}

.bokka-plugin .modal-container > div {
  display: flex !important;
  min-height: 100% !important;
  align-items: flex-end !important;
  justify-content: center !important;
  padding: 1rem !important;
  text-align: center !important;
}

@media (min-width: 640px) {
  .bokka-plugin .modal-container > div {
    align-items: center !important;
    padding: 0 !important;
  }
}

.bokka-plugin .modal-container > div > div {
  position: relative !important;
  transform: translateZ(0) !important;
  overflow: hidden !important;
  border-radius: 0.5rem !important;
  background-color: white !important;
  text-align: left !important;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
  transition: all 0.3s ease !important;
  margin: 0 1rem !important;
  width: 100% !important;
}

.bokka-plugin .modal-sm {
  max-width: 32rem !important;
}

.bokka-plugin .modal-md {
  max-width: 42rem !important;
}

@media (min-width: 768px) {
  .bokka-plugin .modal-md {
    padding-left: 40px !important;
    padding-right: 40px !important;
  }
}

.bokka-plugin .modal-lg {
  max-width: 56rem !important;
}

.bokka-plugin .modal-xl {
  max-width: 72rem !important;
}

.bokka-plugin .modal-close {
  position: absolute !important;
  right: 0.5rem !important;
  top: 0.5rem !important;
  background-color: white !important;
  border-radius: 0.375rem !important;
  cursor: pointer !important;
  padding: 0.5rem !important;
  z-index: 10 !important;
  border: none !important;
}

/* Close-button color comes from the markup's semantic tokens
   (text-muted / hover:text-heading), not a hardcoded gray. */

.bokka-plugin .modal-close svg {
  width: 1.5rem !important;
  height: 1.5rem !important;
}
