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

.kpbm-scroll-lock {
  overflow: hidden !important;
}

.kpbm-root {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: grid;
  place-items: center;
  padding: 24px;
}

.kpbm-overlay {
  position: absolute;
  inset: 0;
  background: rgba(7, 19, 36, 0.72);
  backdrop-filter: blur(5px);
}

.kpbm-modal {
  position: relative;
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 28px;
  box-shadow: 0 28px 80px rgba(7, 19, 36, 0.3);
  background: linear-gradient(145deg, #ffffff 0%, #f7fafc 100%);
  z-index: 2;
}

.kpbm-close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  left: auto !important;
  bottom: auto !important;
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid #c82333 !important;
  border-radius: 999px !important;
  background: #dc3545 !important;
  color: #ffffff !important;
  font-size: 28px !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-align: center !important;
  cursor: pointer;
  z-index: 50 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
  box-shadow: 0 12px 28px rgba(220, 53, 69, 0.26) !important;
  appearance: none;
  -webkit-appearance: none;
  float: none !important;
  transform: none !important;
  pointer-events: auto;
  transition: transform .18s ease, background-color .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.kpbm-close:hover,
.kpbm-close:focus-visible {
  background: #c82333 !important;
  box-shadow: 0 14px 30px rgba(220, 53, 69, 0.32) !important;
  transform: scale(1.04) !important;
  outline: none;
}

.kpbm-shell {
  display: grid;
  min-height: 460px;
}

.kpbm-shell.has-media {
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.kpbm-shell.no-media {
  grid-template-columns: 1fr;
}

.kpbm-media {
  position: relative;
  min-height: 100%;
  overflow: hidden;
}

.kpbm-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 32, 55, 0.08) 0%, rgba(10, 32, 55, 0.22) 100%);
}

.kpbm-media img {
  width: 100%;
  height: 100%;
  min-height: 460px;
  object-fit: cover;
  display: block;
}

.kpbm-content {
  padding: 56px 48px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kpbm-badge {
  display: inline-flex;
  align-self: flex-start;
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(18, 72, 128, 0.08);
  border: 1px solid rgba(18, 72, 128, 0.12);
  color: #0e416f;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 16px;
}

.kpbm-content h2 {
  margin: 0;
  color: #102e4b;
  font-size: clamp(28px, 3.2vw, 42px);
  line-height: 1.15;
}

.kpbm-subtitle {
  margin: 14px 0 0;
  font-size: 18px;
  line-height: 1.5;
  color: #486177;
}

.kpbm-body {
  margin-top: 20px;
  color: #33475d;
  font-size: 16px;
  line-height: 1.75;
}

.kpbm-body p:first-child {
  margin-top: 0;
}

.kpbm-body p:last-child {
  margin-bottom: 0;
}

.kpbm-actions {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.kpbm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border-radius: 14px;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.kpbm-btn:hover {
  transform: translateY(-1px);
}

.kpbm-btn-primary {
  background: linear-gradient(135deg, #103b67 0%, #1f5b98 100%);
  color: #fff !important;
  box-shadow: 0 14px 30px rgba(16, 59, 103, 0.22);
}

.kpbm-btn-secondary {
  background: #edf3f9;
  color: #12375d !important;
  border: 1px solid #d6e2ef;
}

@media (max-width: 860px) {
  .kpbm-root {
    padding: 14px;
  }

  .kpbm-modal {
    border-radius: 22px;
    max-height: calc(100vh - 28px);
  }

  .kpbm-shell.has-media,
  .kpbm-shell.no-media {
    grid-template-columns: 1fr;
  }

  .kpbm-media img {
    min-height: 240px;
    max-height: 280px;
  }

  .kpbm-close {
    top: 12px !important;
    right: 12px !important;
    width: 40px !important;
    height: 40px !important;
    font-size: 24px !important;
  }

  .kpbm-content {
    padding: 34px 22px 26px;
  }

  .kpbm-content h2 {
    font-size: clamp(24px, 7vw, 34px);
  }

  .kpbm-subtitle {
    font-size: 16px;
  }

  .kpbm-body {
    font-size: 15px;
    line-height: 1.68;
  }

  .kpbm-actions {
    flex-direction: column;
  }

  .kpbm-btn {
    width: 100%;
  }
}
