/* PCUK Ad Manager – Public Banner Styles */

.pcuk-campaign {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* ── Stack mode ─────────────────────────────────────── */
.pcuk-mode-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Banner wrapper ─────────────────────────────────── */
.pcuk-banner-wrap {
    width: 100%;
    animation: pcuk-slide-up 0.5s cubic-bezier(0.4,0,0.2,1) both;
}

.pcuk-mode-stack .pcuk-banner-wrap:nth-child(1) { animation-delay: 0.05s; }
.pcuk-mode-stack .pcuk-banner-wrap:nth-child(2) { animation-delay: 0.15s; }
.pcuk-mode-stack .pcuk-banner-wrap:nth-child(3) { animation-delay: 0.25s; }
.pcuk-mode-stack .pcuk-banner-wrap:nth-child(4) { animation-delay: 0.35s; }
.pcuk-mode-stack .pcuk-banner-wrap:nth-child(5) { animation-delay: 0.45s; }

@keyframes pcuk-slide-up {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .pcuk-banner-wrap,
    .pcuk-banner-link,
    .pcuk-banner-img {
        animation: none !important;
        transition: none !important;
    }
}

/* ── Link & image ───────────────────────────────────── */
.pcuk-banner-link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    text-decoration: none;
    outline: none;
    transition: box-shadow 0.28s ease, transform 0.28s ease;
    position: relative;
}

.pcuk-banner-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

.pcuk-banner-link:active {
    transform: translateY(0) scale(0.998);
    box-shadow: none;
}

/* WCAG 2.2 §2.4.11 – Focus Appearance */
.pcuk-banner-link:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 4px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
}

/* Never crop or distort the image */
.pcuk-banner-img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    transition: filter 0.28s ease;
}

.pcuk-banner-link:hover .pcuk-banner-img {
    filter: brightness(1.04);
}

/* ── Screen-reader only ─────────────────────────────── */
.pcuk-sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* ── Slideshow mode ─────────────────────────────────── */
.pcuk-mode-slideshow {
    position: relative;
}

.pcuk-slideshow-track {
    position: relative;
    overflow: hidden;
}

.pcuk-slide {
    animation: none;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pcuk-slide[aria-hidden="false"] {
    display: block;
    opacity: 1;
    animation: pcuk-fade-in 0.5s ease both;
}

@keyframes pcuk-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Slideshow controls ─────────────────────────────── */
.pcuk-slideshow-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 10px;
}

.pcuk-prev,
.pcuk-next {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px; height: 30px;
    border: 1px solid rgba(0,0,0,0.2);
    border-radius: 50%;
    background: #fff;
    color: #333;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}

.pcuk-prev:hover, .pcuk-next:hover {
    background: #f0f0f0;
    border-color: rgba(0,0,0,0.35);
}

.pcuk-prev:focus-visible, .pcuk-next:focus-visible,
.pcuk-dot:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 3px;
}

.pcuk-dots {
    display: flex;
    gap: 6px;
    align-items: center;
}

.pcuk-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,0.2);
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}

.pcuk-dot.active {
    background: #333;
    transform: scale(1.25);
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .pcuk-prev, .pcuk-next {
        background: #2a2a2a;
        border-color: rgba(255,255,255,0.2);
        color: #eee;
    }
    .pcuk-prev:hover, .pcuk-next:hover {
        background: #3a3a3a;
    }
    .pcuk-dot {
        background: rgba(255,255,255,0.25);
    }
    .pcuk-dot.active {
        background: #eee;
    }
    .pcuk-banner-link:focus-visible {
        outline-color: #60a5fa;
    }
}
