/*
 * Travel Mart Homepage Banner Manager
 * v1.0.3 mobile arrow positioning fix for the custom Travel theme.
 * The parent theme remains the source of truth for banner design/responsiveness.
 */

.tm-home-banner-source-hidden {
    display: none !important;
}

.tm-home-banner-carousel {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.tm-home-banner-track {
    position: relative;
    width: 100%;
}

/*
 * The parent theme has the more-specific rule `section.gl-ban { display:flex; }`.
 * Therefore inactive cloned slides must be hidden with an equally targeted rule.
 */
section.gl-ban.tm-home-banner-slide {
    display: none !important;
    width: 100%;
    margin: 0;
}

/* Keep the exact original flex layout when a slide is active. */
section.gl-ban.tm-home-banner-slide.is-active {
    display: flex !important;
}

.tm-home-banner-arrow {
    position: absolute;
    top: 50%;
    z-index: 20;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    background: rgba(59, 48, 113, .45);
    color: #fff;
    font-size: 25px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color .2s ease, opacity .2s ease;
}

.tm-home-banner-prev { left: 24px; }
.tm-home-banner-next { right: 24px; }

.tm-home-banner-arrow:hover,
.tm-home-banner-arrow:focus-visible {
    background: rgba(59, 48, 113, .8);
    outline: none;
}

.tm-home-banner-dots {
    position: absolute;
    left: 50%;
    bottom: 18px;
    z-index: 20;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tm-home-banner-dot {
    width: 9px;
    height: 9px;
    min-width: 9px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .95);
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    cursor: pointer;
}

.tm-home-banner-dot.is-active {
    background: #fff;
}

@media (max-width: 767px) {
    /* Keep carousel controls away from banner heading/text on phones. */
    .tm-home-banner-arrow {
        top: auto;
        bottom: 14px;
        transform: none;
        width: 36px;
        height: 36px;
        font-size: 20px;
    }

    .tm-home-banner-prev { left: 10px; }
    .tm-home-banner-next { right: 10px; }
    .tm-home-banner-dots { bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    .tm-home-banner-arrow {
        transition: none;
    }
}
