/**
 * Top Tours Navigation Component Styling
 * Production-ready horizontal scroller with chevrons
 * 
 * @package TravelerChildTheme
 */

/* Wrapper */
[data-hscroll] {
    position: relative;
}

/* The scroller itself */
[data-hscroll="scroller"] {
    height: 44px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding-inline: 40px; /* Space for 40px chevrons */
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    touch-action: pan-x;
    scrollbar-width: none;
}

/* Hide scrollbar on mobile */
@media (max-width: 767.98px) {
    [data-hscroll="scroller"]::-webkit-scrollbar {
        display: none;
    }
}

/* Minimal chevrons: no circle, no shadow */
.hscroll-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;               /* slim, but still tappable */
    height: 44px;              /* matches row height */
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary-color, #6c757d);
    opacity: .65;
    cursor: pointer;
    z-index: 2;
}

.hscroll-arrow:hover,
.hscroll-arrow:focus-visible {
    opacity: .95;
}

.hscroll-arrow:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

.hscroll-left { 
    left: 8px; 
}

.hscroll-right { 
    right: 8px; 
}

.hscroll-arrow svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

/* Edge fades behind the chevrons */
[data-hscroll]::before,
[data-hscroll]::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 48px; /* wider so the fade is noticeable */
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity .2s;
    /* adapt to theme bg */
    --bg: var(--bs-body-bg, #fff);
}

[data-hscroll]::before {
    left: 0;
    background: linear-gradient(to right, var(--bg), color-mix(in oklab, var(--bg) 0%, transparent));
}

[data-hscroll]::after {
    right: 0;
    background: linear-gradient(to left, var(--bg), color-mix(in oklab, var(--bg) 0%, transparent));
}

/* Show fades contextually */
.has-overflow::after {
    opacity: .9;
}

.scrolled-start::before {
    opacity: .9;
}

.scrolled-end::after {
    opacity: 0;
}

/* Nav items styling */
.featured-tours-nav {
    padding: 0 8px;
}

.featured-tours-nav li {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}

/* Separator dots between items */
.featured-tours-nav li + li:not(.nav-label-item)::before {
    content: "•";
    color: #d1d5db;
    font-size: 12px;
    margin: 0 8px;
}

/* Label styling */
.nav-label {
    font-weight: 600;
    font-size: 14px;
}

/* Link styling */
.featured-tours-nav .nav-link {
    font-size: 14px;
    padding: 8px 6px;
    white-space: nowrap;
}

.featured-tours-nav .nav-link:hover {
    color: #3b82f6 !important;
    text-decoration: underline !important;
}

/* Focus state for accessibility */
.featured-tours-nav .nav-link:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
    .featured-tours-nav {
        font-size: 13px !important;
        gap: 12px !important;
    }
    
    .nav-label-item {
        font-weight: 600 !important;
    }
    
    .featured-tours-nav .nav-link {
        font-size: 13px;
    }
}

/* RTL safe mode for future localization */
html[dir="rtl"] [data-hscroll="scroller"] {
    direction: ltr;
}