/* ============================================================
   PopupCampaign — front.css
   ============================================================ */

/* --- Overlay --- */
.pc-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    transition: background 0.35s ease, backdrop-filter 0.35s ease;
    pointer-events: none;
}

.pc-overlay.pc-visible {
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    pointer-events: all;
}

/* --- Positions --- */
.pc-pos-center  { align-items: center;     justify-content: center;    }
.pc-pos-bottom  { align-items: flex-end;   justify-content: center;    padding-bottom: 0; }
.pc-pos-corner  { align-items: flex-end;   justify-content: flex-end;  padding: 24px;     }

/* --- Popup box --- */
.pc-popup {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.04),
        0 8px 24px rgba(0,0,0,0.12),
        0 24px 64px rgba(0,0,0,0.16);
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
}

/* Bottom bar — full width, no border radius on bottom */
.pc-pos-bottom .pc-popup {
    border-radius: 12px 12px 0 0;
    width: 100% !important;
    max-width: 100% !important;
}

/* Corner — smaller shadow */
.pc-pos-corner .pc-popup {
    box-shadow: 0 4px 24px rgba(0,0,0,0.18);
}

/* --- Animations --- */

/* Fade */
.pc-anim-fade {
    opacity: 0;
    transition: opacity 0.35s ease;
}
.pc-overlay.pc-visible .pc-anim-fade {
    opacity: 1;
}

/* Slide up */
.pc-anim-slide {
    opacity: 0;
    transform: translateY(48px);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.pc-overlay.pc-visible .pc-anim-slide {
    opacity: 1;
    transform: translateY(0);
}

/* Bounce */
.pc-anim-bounce {
    opacity: 0;
    transform: scale(0.75);
    transition: opacity 0.3s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pc-overlay.pc-visible .pc-anim-bounce {
    opacity: 1;
    transform: scale(1);
}

/* --- Close button --- */
.pc-close {
    position: absolute;
    top: 12px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.45);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s ease, transform 0.15s ease;
}

.pc-close:hover {
    background: rgba(0, 0, 0, 0.75);
    transform: scale(1.1);
}

.pc-close:active {
    transform: scale(0.95);
}

/* --- Content --- */
.pc-content {
    display: block;
    line-height: 0; /* eliminuje gap pod img */
}

/* Image popup */
.pc-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0;
}

/* WYSIWYG popup */
.pc-wysiwyg {
    padding: 32px 28px;
    line-height: 1.6;
    color: #222;
    font-size: 15px;
}

.pc-wysiwyg h1,
.pc-wysiwyg h2,
.pc-wysiwyg h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #111;
    font-weight: 700;
}

.pc-wysiwyg p {
    margin: 0 0 12px;
}

.pc-wysiwyg a {
    color: #2563eb;
    text-decoration: underline;
}

.pc-wysiwyg img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* --- Clickable popup (link on whole image) --- */
.pc-link {
    display: block;
    line-height: 0;
    cursor: pointer;
}

/* --- Scrollbar inside popup (webkit) --- */
.pc-popup::-webkit-scrollbar { width: 6px; }
.pc-popup::-webkit-scrollbar-track { background: #f1f1f1; }
.pc-popup::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }
.pc-popup::-webkit-scrollbar-thumb:hover { background: #aaa; }

/* --- Mobile --- */
@media (max-width: 640px) {
    .pc-pos-corner {
        padding: 12px;
        justify-content: center;
    }

    .pc-pos-corner .pc-popup {
        width: calc(100vw - 24px) !important;
    }

    .pc-wysiwyg {
        padding: 24px 18px;
    }
}
