/* =====================================================
   ACF Project Carousel — carousel.css  v2
   Dynamic values (colours, sizes) are injected via
   apc_output_dynamic_css() in wp_head.
   ===================================================== */

/* ── Wrapper ── */
.apc-wrapper {
    position: relative;
    width: 100%;
    overflow-x: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Swiper: allow overflow so peek slides show ── */
.apc-wrapper .apc-swiper {
    overflow: visible;
    width: 100%;
}

/* ── Slides ── */
.apc-slide { display: block; }

.apc-slide img {
    display: block;
    width: 100%;
    object-fit: cover;
    object-position: center;
}

/* ── Controls bar ── */
.apc-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 0;
}

/* ── Pagination dots (bottom-left) ── */
.apc-pagination.swiper-pagination {
    position: static;
    display: flex;
    align-items: center;
    gap: 6px;
    width: auto;
    bottom: auto;
    left: auto;
}

.apc-pagination .swiper-pagination-bullet {
    border-radius: 50%;
    opacity: 1;
    margin: 0;
    transition: background 0.25s, transform 0.25s;
    cursor: pointer;
    /* size + colour set via dynamic CSS */
}

.apc-pagination .swiper-pagination-bullet-active {
    transform: scale(1.15);
    /* colour set via dynamic CSS */
}

/* ── Nav arrows (bottom-right) ── */
.apc-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.apc-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.2s, opacity 0.2s;
    flex-shrink: 0;
    /* size + colour set via dynamic CSS */
}

.apc-btn svg { display: block; }

.apc-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
    border-radius: 50%;
}

.apc-btn.swiper-button-disabled {
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

/* Hide default Swiper nav that may be injected */
.apc-swiper .swiper-button-prev,
.apc-swiper .swiper-button-next {
    display: none !important;
}

/* ── Error state ── */
.apc-error {
    color: #c00;
    font-size: 0.875rem;
    padding: 8px 0;
}

/* =====================================================
   Lightbox
   ===================================================== */

.apc-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.apc-lightbox.is-open {
    display: flex;
}

/* Stage */
.apc-lb-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
}

.apc-lb-img {
    max-width: 90vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: opacity 0.2s ease;
    border-radius: 2px;
}

/* Loader spinner */
.apc-lb-loader {
    display: none;
    position: absolute;
    width: 36px;
    height: 36px;
    border: 3px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: apc-spin 0.7s linear infinite;
}

@keyframes apc-spin {
    to { transform: rotate(360deg); }
}

/* Close button */
.apc-lb-close {
    position: fixed;
    top: 20px;
    right: 24px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    z-index: 2;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.apc-lb-close:hover { opacity: 1; }

.apc-lb-close svg {
    width: 28px;
    height: 28px;
    display: block;
}

/* Prev / Next */
.apc-lb-prev,
.apc-lb-next {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    opacity: 0.7;
    transition: opacity 0.2s;
    z-index: 2;
}

.apc-lb-prev { left: 16px; }
.apc-lb-next { right: 16px; }

.apc-lb-prev:hover,
.apc-lb-next:hover { opacity: 1; }

.apc-lb-prev svg,
.apc-lb-next svg {
    width: 36px;
    height: 36px;
    display: block;
}

/* Counter */
.apc-lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.6);
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Mobile */
@media (max-width: 599px) {
    .apc-lb-prev { left: 4px; }
    .apc-lb-next { right: 4px; }
    .apc-lb-prev svg,
    .apc-lb-next svg { width: 28px; height: 28px; }
}
