/* ===================================
   Smart Image Slider - Frontend Styles
   =================================== */

/* ---- Wrapper ---- */
.sis-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #111;
    font-family: inherit;
    line-height: 1;
    -webkit-user-select: none;
    user-select: none;
}

/* ---- Track ---- */
.sis-track {
    position: relative;
    width: 100%;
    height: 500px; /* default; overridden by inline style */
}

/* ---- Slides ---- */
.sis-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.7s ease;
    pointer-events: none;
}

.sis-slide.sis-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 2;
}

/* Slide transition — "slide" type */
.sis-transition-slide .sis-slide {
    transform: translateX(100%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1), opacity 0s 0.6s;
    opacity: 1;
}
.sis-transition-slide .sis-slide.sis-active {
    transform: translateX(0);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.18, 1);
    z-index: 2;
}
.sis-transition-slide .sis-slide.sis-leaving {
    transform: translateX(-100%);
    z-index: 1;
}
.sis-transition-slide .sis-slide.sis-entering-right {
    transform: translateX(100%);
}
.sis-transition-slide .sis-slide.sis-entering-left {
    transform: translateX(-100%);
}

/* ---- Overlay ---- */
.sis-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

/* ---- Content layer ---- */
.sis-content {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    padding: 24px 32px;
    box-sizing: border-box;
}

/* ---- Text box ---- */
.sis-text-box {
    max-width: 640px;
    word-break: break-word;
    border-radius: 4px;
}

.sis-title {
    margin: 0 0 0.4em;
    padding: 0;
    line-height: 1.15;
    letter-spacing: -0.01em;
}

.sis-text {
    margin: 0 0 0.8em;
    padding: 0;
    line-height: 1.5;
}

.sis-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 24px;
    border-radius: 3px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border: 2px solid rgba(255,255,255,0.6);
    transition: background 0.2s, border-color 0.2s;
}
.sis-btn:hover {
    border-color: #fff;
    background: rgba(255,255,255,0.3) !important;
}

/* ---- Arrows ---- */
.sis-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0,0,0,0.4);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
}
.sis-arrow:hover { background: rgba(0,0,0,0.7); }
.sis-arrow svg {
    width: 22px;
    height: 22px;
    stroke: #fff;
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.sis-prev { left: 16px; }
.sis-next { right: 16px; }

/* ---- Dots ---- */
.sis-dots {
    position: absolute;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 8px;
    align-items: center;
}
.sis-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, transform 0.2s;
}
.sis-dot:hover { background: rgba(255,255,255,0.8); }
.sis-dot-active {
    background: #fff;
    transform: scale(1.3);
}

/* ---- Empty notice ---- */
.sis-no-slides {
    padding: 24px;
    background: #f5f5f5;
    border: 2px dashed #ccc;
    color: #666;
    text-align: center;
    border-radius: 4px;
}

/* ============================
   Responsive text scaling
   ============================ */
@media (max-width: 1024px) {
    .sis-content { padding: 18px 20px; }
    .sis-arrow { width: 36px; height: 36px; }
    .sis-arrow svg { width: 18px; height: 18px; }
}

@media (max-width: 600px) {
    .sis-content { padding: 12px 14px; }
    .sis-text-box { max-width: 100%; }
    .sis-arrow { width: 30px; height: 30px; }
    .sis-arrow svg { width: 15px; height: 15px; }
    .sis-prev { left: 8px; }
    .sis-next { right: 8px; }
    .sis-dots { bottom: 8px; }
    .sis-dot { width: 8px; height: 8px; }
}

/* ============================
   Gutenberg editor preview
   ============================ */
.wp-block-smart-image-slider-slider .sis-slider {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

/* ============================
   Full Width / Wide alignment
   (Astra + Gutenberg)
   ============================ */

/* Gutenberg full/wide align — break out of content column */
.wp-block-smart-image-slider-slider.alignfull,
.wp-block-smart-image-slider-slider.alignwide {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.wp-block-smart-image-slider-slider.alignwide {
    width: calc(100vw - 60px);
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

/* Astra theme specific — neutralise container padding on full width */
.ast-page-builder-template .wp-block-smart-image-slider-slider.alignfull,
.ast-full-width-layout .wp-block-smart-image-slider-slider.alignfull {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
    max-width: 100%;
}

/* Make sure the slider itself fills the wrapper */
.alignfull .sis-slider,
.alignwide .sis-slider {
    width: 100%;
}
