/* ==========================================================
   BA.UI Carousel
   Version : 1.0
   ========================================================== */

:root {
    --ba-carousel-gap: 14px;
    --ba-carousel-nav-size: 36px;
    --ba-carousel-nav-bg: #fff;
    --ba-carousel-nav-border: #E4E8EF;
    --ba-carousel-nav-color: #5B6675;
    --ba-carousel-nav-shadow: 0 8px 20px rgba(15, 23, 42, .08);
}

.ba-carousel {
    position: relative;
    width: 100%;
}

.ba-carousel__viewport {
    width: 100%;
    overflow: hidden;
}

.ba-carousel__track {
    display: flex;
    gap: var(--ba-carousel-gap);
    transition: transform .28s ease;
    will-change: transform;
    align-items: stretch;
}

.ba-carousel__slide {
    flex: 0 0 auto;
    min-width: 0;
    display: flex;
    align-self: stretch;
}

.ba-carousel__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--ba-carousel-nav-size);
    height: var(--ba-carousel-nav-size);
    border: 1px solid var(--ba-carousel-nav-border);
    border-radius: 50%;
    background: var(--ba-carousel-nav-bg);
    color: var(--ba-carousel-nav-color);
    box-shadow: var(--ba-carousel-nav-shadow);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
}

    .ba-carousel__nav:hover {
        background: #F8FAFC;
    }

    .ba-carousel__nav:disabled {
        opacity: .45;
        cursor: default;
    }

.ba-carousel__nav--prev {
    left: -18px;
}

.ba-carousel__nav--next {
    right: -18px;
}

.ba-carousel__dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

.ba-carousel__dot {
    width: 8px;
    height: 8px;
    border: 0;
    border-radius: 50%;
    background: #D0D5DD;
    cursor: pointer;
    padding: 0;
}

    .ba-carousel__dot.is-active {
        background: #304FFE;
    }

.ba-carousel__nav.is-hidden,
.ba-carousel__dots.is-hidden {
    display: none;
}

.ba-carousel__campaign-card {
    min-height: 126px;
    height: 100%;
    width: 100%;
    padding: 18px 18px 16px;
    border: 1px solid #DCE3EC;
    border-radius: 16px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ba-carousel__campaign-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.ba-carousel__campaign-content {
    min-width: 0;
    flex: 1;
}

.ba-carousel__campaign-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.ba-carousel__campaign-title {
    margin: 0 0 6px;
    color: #5B6675;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.2;
}

.ba-carousel__campaign-text {
    margin: 0;
    color: #697586;
    font-size: 15px;
    line-height: 1.35;
}

.ba-carousel__campaign-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.ba-carousel__campaign-link {
    color: #2F3542;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
}

    .ba-carousel__campaign-link:hover {
        text-decoration: underline;
    }

.ba-carousel__empty {
    width: 100%;
    padding: 24px 0;
    text-align: center;
    color: #98A2B3;
    font-size: 14px;
}

@media (max-width: 767px) {
    .ba-carousel__nav--prev {
        left: -10px;
    }

    .ba-carousel__nav--next {
        right: -10px;
    }

    .ba-carousel__nav {
        display: none;
    }

    .ba-carousel__campaign-card {
        min-height: auto;
        padding: 12px 14px 10px;
        border-radius: 12px;
    }

    .ba-carousel__campaign-logo {
        width: 32px;
        height: 32px;
    }

    .ba-carousel__campaign-title {
        font-size: 14px;
        margin-bottom: 3px;
    }

    .ba-carousel__campaign-text {
        font-size: 13px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .ba-carousel__campaign-footer {
        margin-top: 8px;
    }

    .ba-carousel__campaign-link {
        font-size: 13px;
    }

    .ba-carousel__campaign-link::after {
        content: " ›";
        font-size: 16px;
        font-weight: 700;
    }

    .ba-carousel__dots {
        margin-top: 10px;
        gap: 6px;
    }

    .ba-carousel__dot {
        width: 7px;
        height: 7px;
    }
}
