/* DreamDeepSky Hero Slideshow 1.0.13 */

.wp-block-dreamdeepsky-hero-slideshow.dds-hero-slideshow {
    position: relative;
    left: 50%;
    width: 100vw !important;
    max-width: none !important;
    margin-left: -50vw !important;
    margin-right: -50vw !important;
    height: calc(100vh - 68px);
    height: calc(100svh - 68px);
    min-height: 420px;
    overflow: hidden;
    background: #000;
    box-sizing: border-box;
}

.dds-hero-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1.4s ease-in-out;
    pointer-events: none;
}

.dds-hero-slide.is-active {
    opacity: 1;
    z-index: 1;
}

/*
 * Le cadre épouse exactement la zone réellement occupée par la photo.
 * Sa taille est calculée localement par front.js afin de conserver le
 * comportement "contain" sur tous les formats d'écran sans déformation.
 */
.dds-hero-image-frame {
    position: relative;
    display: block;
    flex: 0 0 auto;
    max-width: 100%;
    max-height: 100%;
    overflow: hidden;
    background: #000;
}

.dds-hero-image-frame img {
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center center;
    margin: 0;
}

/*
 * Cadre virtuel adaptatif, purement visuel :
 * gris sobre par défaut ; rouge sombre lorsque les bords de l'image
 * sont détectés comme très clairs. L'image source n'est jamais modifiée.
 */
.dds-hero-image-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    box-shadow: inset 0 0 0 1.3px rgba(170, 170, 170, 0.52);
}

.dds-hero-image-frame.dds-light-edge::after {
    box-shadow: inset 0 0 0 2px rgba(185, 42, 42, 0.88);
}

@media (max-width: 1024px) {
    .wp-block-dreamdeepsky-hero-slideshow.dds-hero-slideshow {
        height: calc(100vh - 64px);
        height: calc(100svh - 64px);
        min-height: 380px;
    }
}

@media (max-width: 600px) {
    .wp-block-dreamdeepsky-hero-slideshow.dds-hero-slideshow {
        height: calc(100vh - 60px);
        height: calc(100svh - 60px);
        min-height: 320px;
    }

}

@media (prefers-reduced-motion: reduce) {
    .dds-hero-slide {
        transition: none;
    }
}

.dds-editor-wrap {
    border: 1px solid #ddd;
    padding: 12px;
}

.dds-editor-info {
    margin: 0 0 12px;
    font-size: 13px;
}

.dds-editor-preview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
    margin-bottom: 12px;
}

.dds-editor-preview img,
.dds-editor-preview-placeholder {
    width: 100%;
    height: 100px;
    object-fit: contain;
    object-position: center;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 12px;
}
