.kr-popup,
.kr-popup__layer {
    --kr-popup-bg: #fff;
    --kr-popup-text: #1f2937;
    --kr-popup-accent: var(--kr-color-primary, var(--color-primary, #2271b1));
    --kr-popup-overlay: #000;
}
.kr-popup *, .kr-popup *::before, .kr-popup *::after,
.kr-popup__layer *, .kr-popup__layer *::before, .kr-popup__layer *::after { box-sizing: border-box; }
.kr-popup__trigger { appearance: none; border: 0; font: inherit; cursor: pointer; }
.kr-popup__trigger--button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; border-radius: 999px; background: var(--kr-popup-accent); color: #fff; font-weight: 700; }
.kr-popup__trigger--link { padding: 0; background: transparent; color: var(--kr-popup-accent); text-decoration: underline; text-underline-offset: .16em; }

.kr-popup__layer[hidden] { display: none !important; }
.kr-popup__layer { position: fixed !important; inset: 0 !important; z-index: 2147483646 !important; display: grid; place-items: center; padding: 24px; isolation: isolate; transform: none !important; }
.kr-popup__layer--portal { width: auto !important; max-width: none !important; margin: 0 !important; }
.kr-popup__backdrop { position: absolute; inset: 0; background: var(--kr-popup-overlay); opacity: var(--kr-popup-overlay-opacity, .66); }
.kr-popup__dialog { position: relative; z-index: 1; width: min(100%, var(--kr-popup-width, 760px)); max-height: min(90vh, 1000px); overflow: auto; border-radius: var(--kr-popup-radius, 24px); background: var(--kr-popup-bg); color: var(--kr-popup-text); box-shadow: 0 24px 80px rgba(0,0,0,.28); outline: none; display: grid; }
.kr-popup--custom-height .kr-popup__dialog,
.kr-popup__layer.kr-popup--custom-height .kr-popup__dialog { height: var(--kr-popup-height); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px); }
.kr-popup--image-left .kr-popup__dialog, .kr-popup--image-right .kr-popup__dialog { grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); }
.kr-popup--image-right .kr-popup__media { order: 2; }
.kr-popup__media { min-width: 0; }
.kr-popup__image { width: 100%; height: 100%; max-height: 420px; object-fit: cover; display: block; }
.kr-popup--image-left .kr-popup__image, .kr-popup--image-right .kr-popup__image { max-height: none; min-height: 100%; }
.kr-popup__content { padding: var(--kr-popup-padding, 40px); min-width: 0; }
.kr-popup__close { position: absolute; z-index: 3; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 999px; border: 0; background: color-mix(in srgb, var(--kr-popup-text) 9%, transparent); color: var(--kr-popup-text); font-size: 28px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.kr-popup__eyebrow { color: var(--kr-popup-accent); font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; margin: 0 0 10px; }
.kr-popup__title { margin: 0 !important; padding: 0 !important; color: var(--kr-popup-text) !important; font: inherit; font-size: clamp(1.7rem, 3vw, 3rem); line-height: 1.08; font-weight: 750; letter-spacing: -.025em; }
.kr-popup__text { margin-top: 18px; color: var(--kr-popup-text); line-height: 1.65; }
.kr-popup__text > :first-child { margin-top: 0; }
.kr-popup__text > :last-child { margin-bottom: 0; }
.kr-popup__actions { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.kr-popup__button { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 11px 20px; border-radius: 999px; text-decoration: none !important; font-weight: 700; }
.kr-popup__button--primary { background: var(--kr-popup-accent); color: #fff !important; }
.kr-popup__button--secondary { border: 1px solid color-mix(in srgb, var(--kr-popup-text) 22%, transparent); color: var(--kr-popup-text) !important; }
.kr-popup__empty { padding: 12px 14px; border-left: 3px solid #d63638; background: #fff2f2; }
body.kr-popup-lock { overflow: hidden !important; }

.kr-popup__layer:not([hidden]) .kr-popup__backdrop { animation: kr-popup-fade .22s ease both; }
.kr-popup--animation-scale .kr-popup__layer:not([hidden]) .kr-popup__dialog,
.kr-popup__layer.kr-popup--animation-scale:not([hidden]) .kr-popup__dialog { animation: kr-popup-scale .28s cubic-bezier(.2,.8,.2,1) both; }
.kr-popup--animation-slide-up .kr-popup__layer:not([hidden]) .kr-popup__dialog,
.kr-popup__layer.kr-popup--animation-slide-up:not([hidden]) .kr-popup__dialog { animation: kr-popup-slide-up .3s cubic-bezier(.2,.8,.2,1) both; }
.kr-popup--animation-fade .kr-popup__layer:not([hidden]) .kr-popup__dialog,
.kr-popup__layer.kr-popup--animation-fade:not([hidden]) .kr-popup__dialog { animation: kr-popup-fade .24s ease both; }
@keyframes kr-popup-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kr-popup-scale { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: scale(1); } }
@keyframes kr-popup-slide-up { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 700px) {
    .kr-popup__layer { padding: 14px; }
    .kr-popup--image-left .kr-popup__dialog, .kr-popup--image-right .kr-popup__dialog { grid-template-columns: 1fr; }
    .kr-popup--image-right .kr-popup__media { order: 0; }
    .kr-popup--image-left .kr-popup__image, .kr-popup--image-right .kr-popup__image { min-height: 0; max-height: 260px; }
    .kr-popup__content { padding: max(22px, calc(var(--kr-popup-padding, 40px) * .7)); }
    .kr-popup--custom-height .kr-popup__dialog,
    .kr-popup__layer.kr-popup--custom-height .kr-popup__dialog { max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px); }
}
@media (prefers-reduced-motion: reduce) {
    .kr-popup__layer:not([hidden]) .kr-popup__backdrop, .kr-popup__layer:not([hidden]) .kr-popup__dialog { animation: none !important; }
}


/* Dynamische Popup-Inhalte (Shortcode / Embed / iFrame) */
.kr-popup__shortcode,
.kr-popup__embed,
.kr-popup__iframe-wrap { width: 100%; min-width: 0; }
.kr-popup__embed > :first-child,
.kr-popup__shortcode > :first-child { margin-top: 0; }
.kr-popup__embed > :last-child,
.kr-popup__shortcode > :last-child { margin-bottom: 0; }
.kr-popup__iframe-wrap { overflow: hidden; }
.kr-popup__iframe { display: block; width: 100%; max-width: 100%; height: var(--kr-popup-iframe-height, 560px); border: 0; background: transparent; }
