/* ============================================================
   Slider With Right Thumbnail — Frontend Styles
   ============================================================ */

/* -------------------- Active slide visibility -------------------- */

.swrt-slide.active {
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
}

/* -------------------- Content overlay -------------------- */

.swrt-overlay {
    position: absolute;
    z-index: 3;
    max-width: 75%;
}

/* ---- 9 position variants ---- */

.swrt-pos-top-left {
    top: 0;
    left: 0;
}

.swrt-pos-top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.swrt-pos-top-right {
    top: 0;
    right: 0;
}

.swrt-pos-center-left {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
}

.swrt-pos-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.swrt-pos-center-right {
    top: 50%;
    right: 0;
    transform: translateY(-50%);
}

.swrt-pos-bottom-left {
    bottom: 0;
    left: 0;
}

.swrt-pos-bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.swrt-pos-bottom-right {
    bottom: 0;
    right: 0;
}

/* ---- Typography ---- */

.swrt-title {
    margin: 0 0 4px;
    font-size: 1.5rem;
    line-height: 1.2;
}

.swrt-subtitle {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

/* -------------------- Arrows -------------------- */

.swrt-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.25s ease, opacity 0.25s ease;
    padding: 0;
}

.swrt-arrow.swrt-prev {
    left: 12px;
}

.swrt-arrow.swrt-next {
    right: 12px;
}

/* -------------------- Thumbnail area -------------------- */

.swrt-thumbs-wrap {
    padding: 0 2px;
    box-sizing: border-box;
}

.swrt-thumb-up,
.swrt-thumb-down {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 6px 0;
    border: none;
    background: rgba(0, 0, 0, 0.15);
    color: #fff;
    cursor: pointer;
    transition: background-color 0.25s ease;
    flex-shrink: 0;
}

.swrt-thumb-up:hover,
.swrt-thumb-down:hover {
    background: rgba(0, 0, 0, 0.35);
}

.swrt-thumb-up:disabled,
.swrt-thumb-down:disabled {
    opacity: 0.3;
    cursor: default;
}

.swrt-thumb-vp {
    position: relative;
}

.swrt-thumb-track {
    transition: transform 0.4s ease;
}

.swrt-thumb-item {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Dark overlay on inactive thumbnails */
.swrt-thumb-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Remove overlay when active */
.swrt-thumb-item.active::after {
    opacity: 0;
}

.swrt-thumb-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid transparent;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

/* ================================================================
   RESPONSIVE — Mobile (≤767px)
   Stack layout: main image on top, horizontal thumbnail strip below
   ================================================================ */

@media (max-width: 767px) {
    .swrt {
        flex-direction: column !important;
        height: auto !important;
        min-height: 300px;
    }

    .swrt-main {
        width: 100% !important;
        height: 55vw !important;
        min-height: 200px;
        max-height: 350px;
        flex-shrink: 0;
    }

    .swrt-overlay {
        max-width: 90%;
    }

    .swrt-title {
        font-size: 1.1rem;
    }

    .swrt-subtitle {
        font-size: 0.8rem;
    }

    /* Main arrows — smaller on mobile */
    .swrt-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .swrt-arrow.swrt-prev {
        left: 8px;
    }

    .swrt-arrow.swrt-next {
        right: 8px;
    }

    /* Thumbnail area becomes horizontal row */
    .swrt-thumbs-wrap {
        width: 100% !important;
        flex-direction: row !important;
        height: auto !important;
        padding: 4px 0;
    }

    .swrt-thumb-up,
    .swrt-thumb-down {
        width: 28px;
        height: auto;
        padding: 0;
        flex-shrink: 0;
        font-size: 10px;
    }

    .swrt-thumb-vp {
        flex: 1;
        height: auto;
        overflow: hidden;
    }

    .swrt-thumb-track {
        display: flex;
        flex-direction: row !important;
    }

    .swrt-thumb-item {
        flex-shrink: 0;
        margin-bottom: 0 !important;
        margin-right: 6px !important;
        height: auto !important;
    }
}

/* ================================================================
   RESPONSIVE — Small Phones (≤480px)
   ================================================================ */

@media (max-width: 480px) {
    .swrt-main {
        height: 65vw !important;
        min-height: 180px;
        max-height: 280px;
    }

    .swrt-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
    }

    .swrt-arrow.swrt-prev {
        left: 4px;
    }

    .swrt-arrow.swrt-next {
        right: 4px;
    }

    .swrt-thumb-up,
    .swrt-thumb-down {
        width: 24px;
    }
}