/* ==========================================================================
   AccessibleSliderHorizontal — Lightbox overlay (zoom)
   Lo slider orizzontale eredita gli stili di HorizontalCycleSlider.
   ========================================================================== */

.ash-overlay {
    position: fixed;
    inset: 0;
    z-index: 10500;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 0, 0, 0.92);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.ash-overlay.ash-open {
    opacity: 1;
    visibility: visible;
}

.ash-overlay.ash-open .ash-lb-content {
    transform: scale(1);
}

.ash-lb-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 90vh;
    transform: scale(0.95);
    transition: transform 0.3s ease;
    touch-action: pan-y pinch-zoom;
    user-select: none;
    -webkit-user-select: none;
}

.ash-lb-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    max-height: calc(90vh - 4rem);
}

.ash-lb-image {
    display: block;
    max-width: 100%;
    max-height: calc(90vh - 4rem);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 0.25rem;
    pointer-events: none;
    -webkit-user-drag: none;
}

.ash-lb-btn {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.ash-lb-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.ash-lb-btn:focus-visible {
    outline: none;
    border-color: #0d6efd;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.5);
}

.ash-lb-btn svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: currentColor;
}

.ash-lb-close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1;
}

.ash-lb-prev {
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.ash-lb-next {
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
}

.ash-lb-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;
}

@media (max-width: 767px) {
    .ash-lb-btn {
        width: 2.5rem;
        height: 2.5rem;
    }

    .ash-lb-btn svg {
        width: 1.25rem;
        height: 1.25rem;
    }

    .ash-lb-prev  { left: 0.5rem; }
    .ash-lb-next  { right: 0.5rem; }
    .ash-lb-close { top: 0.5rem; right: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ash-overlay,
    .ash-lb-content,
    .ash-lb-btn {
        transition: none;
    }
}

@media (forced-colors: active) {
    .ash-lb-btn {
        border: 2px solid currentColor;
    }
}
