.hp-popup-root {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.hp-popup-root[hidden] {
    display: none !important;
}

.hp-popup-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(2px);
}

.hp-popup-dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(90vh, 720px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.25);
    padding: 1.5rem;
}

.hp-popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 50%;
    background: #fff;
    color: #0f172a;
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.18);
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.hp-popup-close:hover {
    background: #f8fafc;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.22);
    transform: scale(1.04);
}

.hp-popup-close:focus-visible {
    outline: 2px solid #0ea5e9;
    outline-offset: 2px;
}

.hp-popup-layout-full_image .hp-popup-close {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(255, 255, 255, 0.4);
}

.hp-popup-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.hp-popup-layout-image_left .hp-popup-inner,
.hp-popup-layout-image_right .hp-popup-inner {
    flex-direction: row;
    align-items: stretch;
    width: 100%;
}

.hp-popup-layout-image_right .hp-popup-inner {
    flex-direction: row-reverse;
}

.hp-popup-media img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.hp-popup-layout-full_image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #fff;
    min-height: 360px;
    padding: 0;
    overflow: hidden;
}

.hp-popup-layout-full_image .hp-popup-inner--overlay {
    min-height: 360px;
    display: flex;
    align-items: flex-end;
}

.hp-popup-layout-full_image .hp-popup-overlay-inner {
    width: 100%;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.15), rgba(15, 23, 42, 0.85));
    border-radius: 0 0 16px 16px;
    padding: 1.5rem;
}

.hp-popup-layout-full_image .hp-popup-title,
.hp-popup-layout-full_image .hp-popup-subtitle,
.hp-popup-layout-full_image .hp-popup-body {
    color: #fff;
}

.hp-popup-copy {
    width: 100%;
    text-align: center;
}

.hp-popup-layout-image_left .hp-popup-copy,
.hp-popup-layout-image_right .hp-popup-copy {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
}

.hp-popup-layout-image_left .hp-popup-media,
.hp-popup-layout-image_right .hp-popup-media {
    flex: 0 0 42%;
    max-width: 42%;
}

.hp-popup-title {
    margin: 0 0 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    width: 100%;
}

.hp-popup-subtitle {
    margin: 0 0 0.75rem;
    color: #475569;
    width: 100%;
}

.hp-popup-body {
    font-size: 0.95rem;
    color: #334155;
    line-height: 1.6;
    width: 100%;
}

.hp-popup-body img {
    max-width: 100%;
    height: auto;
}

.hp-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
    justify-content: center;
    width: 100%;
}

.hp-popup-media {
    width: 100%;
}

.hp-popup-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.25rem;
    border-radius: 999px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.hp-popup-btn-primary {
    background: #0ea5e9;
    color: #fff;
}

.hp-popup-btn-primary:hover {
    background: #0284c7;
    color: #fff;
}

.hp-popup-btn-secondary {
    background: #f1f5f9;
    color: #0f172a;
}

.hp-popup-root.hp-popup--open {
    display: flex;
}

.hp-popup-anim-fade.hp-popup-dialog {
    animation: hpPopupFade 0.28s ease;
}

.hp-popup-anim-slide_up.hp-popup-dialog {
    animation: hpPopupSlide 0.32s ease;
}

.hp-popup-anim-zoom.hp-popup-dialog {
    animation: hpPopupZoom 0.28s ease;
}

@keyframes hpPopupFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes hpPopupSlide {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes hpPopupZoom {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 767px) {
    .hp-popup-layout-image_left .hp-popup-inner,
    .hp-popup-layout-image_right .hp-popup-inner {
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-popup-anim-fade.hp-popup-dialog,
    .hp-popup-anim-slide_up.hp-popup-dialog,
    .hp-popup-anim-zoom.hp-popup-dialog {
        animation: none;
    }
}

body.hp-popup-scroll-lock {
    overflow: hidden;
}
