/* ==========================================================================
   MySusun Gallery Slider v2 - Frontend Styles
   ========================================================================== */

.msn-gs-wrapper {
    --msn-gs-radius: 16px;
    --msn-gs-transition: 600ms;
    --msn-gs-dots-gap: 24px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.msn-gs-wrapper *,
.msn-gs-wrapper *::before,
.msn-gs-wrapper *::after {
    box-sizing: border-box;
}

/* ==========================================================================
   Stage & Track
   ========================================================================== */
.msn-gs-stage {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #f3f3f3;
}

.msn-gs-full_width .msn-gs-stage,
.msn-gs-normal .msn-gs-stage {
    border-radius: 0;
}

.msn-gs-rounded .msn-gs-stage {
    border-radius: var(--msn-gs-radius);
}

.msn-gs-track {
    position: relative;
    width: 100%;
    transition: height 0.4s ease;
}

/* ==========================================================================
   Slides (crossfade)
   ========================================================================== */
.msn-gs-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--msn-gs-transition) ease,
                visibility 0s linear var(--msn-gs-transition);
    pointer-events: none;
}

.msn-gs-slide.is-active {
    opacity: 1;
    visibility: visible;
    transition: opacity var(--msn-gs-transition) ease,
                visibility 0s linear 0s;
    pointer-events: auto;
    z-index: 2;
}

.msn-gs-slide img {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}

.msn-gs-track > .msn-gs-slide:first-child {
    position: relative;
}

.msn-gs-track.is-ready > .msn-gs-slide,
.msn-gs-track.is-ready > .msn-gs-slide:first-child {
    position: absolute;
}

/* Cursor zoom on hover bila zoomable */
.msn-gs-zoomable .msn-gs-slide.is-active img {
    cursor: zoom-in;
}

/* ==========================================================================
   Navigation Arrows
   ========================================================================== */
.msn-gs-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    cursor: pointer;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    transition: background 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
    appearance: none;
    -webkit-appearance: none;
    opacity: 0.85;
}

.msn-gs-arrow:hover,
.msn-gs-arrow:focus-visible {
    background: rgba(0, 0, 0, 0.75);
    opacity: 1;
    outline: none;
}

.msn-gs-arrow:active {
    transform: translateY(-50%) scale(0.94);
}

.msn-gs-arrow svg {
    width: 22px;
    height: 22px;
    display: block;
}

.msn-gs-arrow-prev { left: 14px; }
.msn-gs-arrow-next { right: 14px; }

/* Style variants */
.msn-gs-arrow-circle  { border-radius: 50%; }
.msn-gs-arrow-square  { border-radius: 6px; }
.msn-gs-arrow-minimal {
    background: transparent;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
.msn-gs-arrow-minimal:hover,
.msn-gs-arrow-minimal:focus-visible {
    background: rgba(0,0,0,0.2);
}

/* Mobile: smaller arrows */
@media (max-width: 600px) {
    .msn-gs-arrow {
        width: 36px;
        height: 36px;
    }
    .msn-gs-arrow svg {
        width: 18px;
        height: 18px;
    }
    .msn-gs-arrow-prev { left: 8px; }
    .msn-gs-arrow-next { right: 8px; }
}

/* ==========================================================================
   Zoom Hint Icon (corner badge)
   ========================================================================== */
.msn-gs-zoom-hint {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #fff;
    pointer-events: none;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.msn-gs-zoom-hint svg {
    width: 16px;
    height: 16px;
}

.msn-gs-zoomable:hover .msn-gs-zoom-hint {
    opacity: 1;
}

@media (max-width: 600px) {
    .msn-gs-zoom-hint {
        width: 28px;
        height: 28px;
        top: 8px;
        right: 8px;
    }
    .msn-gs-zoom-hint svg {
        width: 14px;
        height: 14px;
    }
}

/* ==========================================================================
   Pagination Dots (clearly outside image)
   ========================================================================== */
.msn-gs-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: var(--msn-gs-dots-gap);
    margin-bottom: 0;
    padding: 0;
    list-style: none;
}

.msn-gs-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(0, 0, 0, 0.25);
    cursor: pointer;
    padding: 0;
    margin: 0;
    appearance: none;
    -webkit-appearance: none;
    transition: background 0.25s ease, transform 0.25s ease, width 0.25s ease;
}

.msn-gs-dot:hover,
.msn-gs-dot:focus-visible {
    background: rgba(0, 0, 0, 0.55);
    outline: none;
}

.msn-gs-dot.is-active {
    background: rgba(0, 0, 0, 0.85);
    width: 24px;
    border-radius: 5px;
}

@media (max-width: 600px) {
    .msn-gs-dot {
        width: 8px;
        height: 8px;
    }
    .msn-gs-dot.is-active {
        width: 20px;
    }
}

/* ==========================================================================
   Empty state
   ========================================================================== */
.msn-gs-empty {
    padding: 40px 24px;
    text-align: center;
    background: #f6f6f6;
    color: #888;
    border: 1px dashed #ccc;
    border-radius: 8px;
    font-size: 14px;
}

/* ==========================================================================
   Reduced motion
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .msn-gs-slide,
    .msn-gs-track,
    .msn-gs-dot,
    .msn-gs-arrow,
    .msn-gs-lightbox-img {
        transition: none !important;
    }
}

/* ==========================================================================
   LIGHTBOX
   ========================================================================== */
.msn-gs-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    background: rgba(0, 0, 0, 0.92);
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
}

.msn-gs-lightbox.is-open {
    display: block;
    animation: msnGsFade 0.2s ease;
}

@keyframes msnGsFade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.msn-gs-lightbox-stage {
    position: absolute;
    inset: 0;
    overflow: hidden;
    cursor: grab;
}

.msn-gs-lightbox-stage.is-grabbing {
    cursor: grabbing;
}

.msn-gs-lightbox-stage.is-zoomed {
    cursor: grab;
}

.msn-gs-lightbox-img {
    position: absolute;
    top: 50%;
    left: 50%;
    max-width: 95vw;
    max-height: 95vh;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
    transition: transform 0.25s ease;
    will-change: transform;
    -webkit-user-drag: none;
    user-drag: none;
    pointer-events: none; /* drag handled on stage */
}

.msn-gs-lightbox-stage.is-dragging .msn-gs-lightbox-img {
    transition: none;
}

/* Close button */
.msn-gs-lightbox-close {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.msn-gs-lightbox-close:hover,
.msn-gs-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

.msn-gs-lightbox-close svg {
    width: 22px;
    height: 22px;
}

/* Lightbox arrows */
.msn-gs-lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.msn-gs-lightbox-arrow:hover,
.msn-gs-lightbox-arrow:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

.msn-gs-lightbox-arrow svg {
    width: 26px;
    height: 26px;
}

.msn-gs-lightbox-arrow-prev { left: 20px; }
.msn-gs-lightbox-arrow-next { right: 20px; }

/* Counter */
.msn-gs-lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-radius: 100px;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    pointer-events: none;
}

/* Zoom controls */
.msn-gs-lightbox-zoom-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 2;
    display: flex;
    gap: 8px;
}

.msn-gs-lightbox-zoom-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.2s ease;
}

.msn-gs-lightbox-zoom-btn:hover,
.msn-gs-lightbox-zoom-btn:focus-visible {
    background: rgba(255, 255, 255, 0.25);
    outline: none;
}

.msn-gs-lightbox-zoom-btn svg {
    width: 18px;
    height: 18px;
}

/* Mobile lightbox */
@media (max-width: 600px) {
    .msn-gs-lightbox-arrow {
        width: 40px;
        height: 40px;
    }
    .msn-gs-lightbox-arrow-prev { left: 8px; }
    .msn-gs-lightbox-arrow-next { right: 8px; }
    .msn-gs-lightbox-arrow svg {
        width: 22px;
        height: 22px;
    }
    .msn-gs-lightbox-close {
        top: 8px;
        right: 8px;
        width: 38px;
        height: 38px;
    }
}

/* Body lock when lightbox open */
body.msn-gs-lock {
    overflow: hidden;
}
