/**
 * Language Preference Modal – layout styles
 *
 * Design philosophy:
 *   - Layout and structure only. No brand colours, no font choices.
 *   - Low specificity throughout so themes can override any rule easily.
 *   - The [hidden] attribute is the single source of truth for visibility;
 *     JS toggles it rather than toggling a CSS class.
 *   - Supports prefers-reduced-motion for the entrance animation.
 *
 * Class reference:
 *   .wlpm-overlay       Full-viewport dimmed backdrop
 *   .wlpm-modal         Centered dialog container
 *   .wlpm-modal-inner   Inner padding wrapper
 *   .wlpm-close         × dismiss button (top-right)
 *   .wlpm-heading       <h2> modal title
 *   .wlpm-body          <p> modal description
 *   .wlpm-buttons       Button row
 *   .wlpm-btn-yes       Primary CTA ("Yes")
 *   .wlpm-btn-no        Secondary dismiss ("No thanks")
 */


.wlpm-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  padding: 1rem;
  box-sizing: border-box;
}

.wlpm-overlay[hidden] {
  display: none;
}

.wlpm-modal {
  position: relative;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.24);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  outline: none; 
  animation: wlpm-slide-in 0.2s ease-out;
}

.wlpm-modal:focus-visible {
  outline: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .wlpm-modal {
    animation: none;
  }
}

@keyframes wlpm-slide-in {
  from {
    opacity: 0;
    transform: translateY(-12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wlpm-modal-inner {
  padding: 2rem 2rem 1.5rem;
}

.wlpm-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem 0.5rem;
  color: inherit;
  opacity: 0.6;
}

.wlpm-close:hover,
.wlpm-close:focus-visible {
  opacity: 1;
}

.wlpm-heading {
  margin: 0 0 0.75rem;
  font-size: 1.25rem;
  line-height: 1.3;
  padding-right: 2rem; 
}

.wlpm-body {
  margin: 0 0 1.5rem;
  line-height: 1.5;
}

.wlpm-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.wlpm-btn-yes,
.wlpm-btn-no {
  cursor: pointer;
  padding: 0.6rem 1.25rem;
  border-radius: 3px;
  font-size: 1rem;
  line-height: 1.2;
  border: 1px solid currentColor;
  background: none;
}

.wlpm-btn-yes {
  font-weight: 600;
}

@media (max-width: 480px) {
  .wlpm-modal-inner {
    padding: 1.5rem 1.25rem 1.25rem;
  }

  .wlpm-buttons {
    flex-direction: column;
  }

  .wlpm-btn-yes,
  .wlpm-btn-no {
    width: 100%;
    text-align: center;
  }
}