/**
 * Sliders Module CSS
 * Styles for the slides shortcode and slider components
 */

/* Slide Item - Parent Container */
.adsi-slide-item {
    position: relative;
    z-index: 1;
}

.splide__slide.adsi-slide-item {
    position: relative;
    z-index: 1;
}

/* Slide Item Image Container */
.adsi-slide-item-img {
    position: relative;
    width: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.adsi-slide-item-img picture {
    width: 100%;
    height: 100%;
    display: block;
}

.adsi-slide-item-img picture img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Slide Item Content */
.adsi-slide-item-content {
    position: relative;
}

/* Video Containers - Base Styles */
.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

/* FASE 2: Video Foreground - Centering (CRÍTICO) */
.acore-slides .video-foreground {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.acore-slides .video-foreground iframe,
.acore-slides .video-foreground video {
    pointer-events: none;
}

/* FASE 3: Video Cover Styles */
.acore-slides .video-background.video-cover .video-foreground iframe,
.acore-slides .video-background.video-cover .video-foreground video {
    object-fit: cover;
    width: 100%;
    height: 100%;
}

/* FASE 4: Video Contain Styles */
.acore-slides .video-background.video-contain .video-foreground {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
}

.acore-slides .video-background.video-contain .video-foreground iframe,
.acore-slides .video-background.video-contain .video-foreground video {
    object-fit: contain;
}

/* Video Fill Styles */
.acore-slides .video-background.video-fill .video-foreground iframe,
.acore-slides .video-background.video-fill .video-foreground video {
    object-fit: fill;
    width: 100%;
    height: 100%;
}

/* Video None Styles */
.acore-slides .video-background.video-none .video-foreground iframe,
.acore-slides .video-background.video-none .video-foreground video {
    object-fit: none;
    width: 100%;
    height: 100%;
}

/* Video Scale-Down Styles */
.acore-slides .video-background.video-scale-down .video-foreground {
    width: auto;
    height: auto;
    max-width: 100vw;
    max-height: 100vh;
}

.acore-slides .video-background.video-scale-down .video-foreground iframe,
.acore-slides .video-background.video-scale-down .video-foreground video {
    object-fit: scale-down;
}

/* FASE 5: Media Queries for Video Cover (aspect ratio) */
@media (min-aspect-ratio: 16/9) {
    .acore-slides .video-background.video-cover .video-foreground {
        width: 100vw;
        height: 56.25vw;
    }
}

@media (max-aspect-ratio: 16/9) {
    .acore-slides .video-background.video-cover .video-foreground {
        width: 177.77vh;
        height: 100vh;
    }
}

/* Global Logo Positioning */
.msld-global-logo {
    position: absolute;
    z-index: 10;
}

/* Centro - Dynamic positioning via inline styles in SlidersShortcodes.php */

.msld-global-logo-topo-centro {
    top: var(--slider-margin, 20px);
    left: 50%;
    transform: translateX(-50%);
}

.msld-global-logo-topo-esquerda {
    top: var(--slider-margin, 20px);
    left: var(--slider-margin, 20px);
}

.msld-global-logo-topo-direita {
    top: var(--slider-margin, 20px);
    right: var(--slider-margin, 20px);
}

.msld-global-logo-centro-esquerda {
    top: 50%;
    left: var(--slider-margin, 20px);
    transform: translateY(-50%);
}

.msld-global-logo-centro-direita {
    top: 50%;
    right: var(--slider-margin, 20px);
    transform: translateY(-50%);
}

.msld-global-logo-baixo-centro {
    bottom: var(--slider-margin, 20px);
    left: 50%;
    transform: translateX(-50%);
}

.msld-global-logo-baixo-esquerda {
    bottom: var(--slider-margin, 20px);
    left: var(--slider-margin, 20px);
}

.msld-global-logo-baixo-direita {
    bottom: var(--slider-margin, 20px);
    right: var(--slider-margin, 20px);
}

/* Slide Caption Container - Positioning System */
.adsi-slide-item-caption-container {
    position: absolute !important;
    top: var(--slider-margin, 20px) !important;
    left: var(--slider-margin, 20px) !important;
    right: var(--slider-margin, 20px) !important;
    bottom: var(--slider-margin, 20px) !important;
    display: flex !important;
    pointer-events: none; /* Allow clicks to pass through to slide */
    z-index: 100 !important;
}

.adsi-slide-item-caption {
    pointer-events: auto; /* Re-enable clicks on caption content */
    max-width: 100%;
}

/* Caption Styles - Visual Themes */
.adsi-slide-item-caption.caption-style-light {
    background: rgba(255, 255, 255, 0.9); /* Branco com 10% transparência */
    color: #333;
    padding: 30px;
    border-radius: 8px;
}

.adsi-slide-item-caption.caption-style-dark {
    background: rgba(0, 0, 0, 0.9); /* Preto com 10% transparência */
    color: #fff;
    padding: 30px;
    border-radius: 8px;
}

.adsi-slide-item-caption.caption-style-transparent {
    background: transparent;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.adsi-slide-item-caption-inside {
    width: 100%;
    margin: auto;
}

/* Vertical Alignment */
.caption-v-top {
    align-items: flex-start;
}

.caption-v-center {
    align-items: center;
}

.caption-v-bottom {
    align-items: flex-end;
}

/* Horizontal Alignment */
.caption-h-left {
    justify-content: flex-start;
}

.caption-h-center {
    justify-content: center;
}

.caption-h-right {
    justify-content: flex-end;
}

/* Caption Content Alignment */
.caption-h-left .adsi-slide-item-caption {
    text-align: left;
}

.caption-h-center .adsi-slide-item-caption {
    text-align: center;
}

.caption-h-right .adsi-slide-item-caption {
    text-align: right;
}

/* Scroll Down Button */
.slide-scroll-down {
    position: absolute;
    bottom: var(--slider-margin, 20px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.slide-scroll-down img {
    max-width: 40px;
    height: auto;
}

.slide-scroll-text {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Progress Bar */
.my-carousel-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    z-index: 10;
}

.my-carousel-progress-bar {
    height: 100%;
    background: #fff;
    transition: width 0.3s ease;
}

/* Custom Navigation Arrows */
.msld-custom-arrows {
    max-width: 50px;
    height: auto;
}

/* Full Slide Link */
.adsi-slide-full-link {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
}

/* Single Slide (no Splide) */
.acore-single-slide {
    position: relative;
}

.single-slide-content {
    position: relative;
}

/* Video styles are in adsicore.css to avoid conflicts */

/* Splide Video Plugin Styles */
.splide__video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-flow: column;
    align-content: center;
    justify-content: center;
    flex-wrap: wrap;
}

.splide__video__wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.splide__video__wrapper iframe {
    width: 100%;
    height: 100%;
}

.splide__video__play:after {
    transition: border-left-color 0.2s ease;
    border-color: transparent transparent transparent #000;
    border-left-color: rgb(0, 0, 0);
    border-style: solid;
    border-width: 13px 0 13px 25px;
    content: "";
    display: inline-block;
    margin-left: 4px;
}

.splide__video__play {
    border-radius: 150px;
    padding: 20px;
    background-color: #ffffff;
}

/* Splide Pagination */
.splide__pagination {
    padding: 0 !important;
}

/* Splide Arrows - Apenas para módulo de sliders */
.acore-slides .splide__arrow {
    background: transparent;
    background-color: transparent;
    min-width: 58px !important;
    min-height: 58px !important;
    width: 58px !important;
    height: 58px !important;
    padding: 10px;
}

.acore-slides .splide__arrow svg {
    width: 100%;
    height: 100%;
}

/* Splide Arrows - Margem Global Responsiva */
.acore-slides .splide__arrow--prev {
    left: var(--slider-margin, 20px) !important;
}

.acore-slides .splide__arrow--next {
    right: var(--slider-margin, 20px) !important;
}

/* Slide Item Video Background */
.adsi-slide-item-video {
    background-size: cover;
    background-position: center center;
}
