.ksp-popup-root,
.ksp-popup-root * {
  box-sizing: border-box;
}

.ksp-popup-root[hidden] {
  display: none !important;
}

.ksp-popup-root {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  padding: 2.5vh 2.5vw;
  opacity: 0;
  transition: opacity 220ms ease;
}

.ksp-popup-root.is-visible {
  opacity: 1;
}

.ksp-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.72);
  backdrop-filter: blur(3px);
}

.ksp-popup {
  position: relative;
  width: 95vw;
  height: 95vh;
  height: 95dvh;
  max-height: 95vh;
  overflow: auto;
  overscroll-behavior: contain;
  border: 0;
  border-radius: 18px;
  background: #fffdf9;
  color: #26221f;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
  transform: translateY(18px) scale(0.985);
  transition: transform 220ms ease;
}

.ksp-popup-root.is-visible .ksp-popup {
  transform: translateY(0) scale(1);
}

.ksp-popup-inner {
  width: min(100%, 720px);
  min-height: 100%;
  margin: 0 auto;
  padding: clamp(54px, 8vh, 90px) clamp(22px, 6vw, 70px) 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.ksp-popup h2 {
  margin: 0 0 18px;
  color: #27211d;
  font: 700 clamp(28px, 7vw, 48px)/1.12 Georgia, 'Times New Roman', serif;
}

.ksp-popup-content {
  font-size: clamp(17px, 4.2vw, 21px);
  line-height: 1.6;
}

.ksp-popup-content > :first-child { margin-top: 0; }
.ksp-popup-content > :last-child { margin-bottom: 0; }
.ksp-popup-content img { max-width: 100%; height: auto; }

.ksp-popup-button {
  display: inline-flex;
  align-self: center;
  justify-content: center;
  margin-top: 28px;
  padding: 14px 25px;
  border-radius: 999px;
  background: #d64f45;
  color: #fff !important;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none !important;
  box-shadow: 0 8px 20px rgba(151, 49, 42, 0.22);
}

.ksp-popup-button:hover,
.ksp-popup-button:focus-visible {
  background: #b93e36;
  color: #fff !important;
}

.ksp-popup-close {
  position: sticky;
  z-index: 2;
  top: 12px;
  float: right;
  width: 44px;
  height: 44px;
  margin: 12px 12px -56px 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(38, 34, 31, 0.09);
  color: #26221f;
  font: 400 32px/40px Arial, sans-serif;
  cursor: pointer;
}

.ksp-popup-close:hover,
.ksp-popup-close:focus-visible {
  background: rgba(38, 34, 31, 0.17);
  outline: 2px solid #d64f45;
  outline-offset: 2px;
}

html.ksp-popup-open,
html.ksp-popup-open body {
  overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
  .ksp-popup-root,
  .ksp-popup { transition: none; }
}
