/* =================================================================== */
/*  Tourial Navigation Plugin – CSS                                     */
/*  Replicates the Vue app sidebar + mobile navbar look & feel          */
/* =================================================================== */

/* ------------------------------------------------------------------ */
/*  CSS Variables (matching the Vue app)                                */
/* ------------------------------------------------------------------ */
:root {
    --tourial-primary: #EF7E18;
    --tourial-sidebar-width: 50px;
    --tourial-sidebar-bg: #fff;
    --tourial-sidebar-shadow: 0 0 20px rgba(0, 0, 0, 0.27);
}

/* ------------------------------------------------------------------ */
/*  DESKTOP SIDEBAR                                                    */
/* ------------------------------------------------------------------ */
.tourial-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--tourial-sidebar-width);
    height: 100vh;
    background: var(--tourial-sidebar-bg);
    box-shadow: var(--tourial-sidebar-shadow);
    z-index: 9000;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 16px;
    gap: 0;
    overflow: visible;
    font-family: 'Montserrat', sans-serif;
}

/* Hide sidebar on mobile */
@media (max-width: 600px) {
    .tourial-sidebar {
        display: none !important;
    }
}

/* ---- Sidebar item (link) ---- */
.tourial-sidebar__item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 47px;
    padding: 0;
    text-decoration: none !important;
    color: inherit;
    opacity: 0.7;
    transition: all 0.25s ease;
}

.tourial-sidebar__item:hover {
    opacity: 1;
    padding-left: 8px;
}

.tourial-sidebar__item.active {
    opacity: 1;
}

/* Active indicator bar (left edge) */
.tourial-sidebar__item::after {
    content: "";
    position: absolute;
    left: -4px;
    top: 0;
    width: 10px;
    height: 100%;
    background: var(--tourial-primary);
    border-radius: 0 20px 20px 0;
    transform: translateX(-6px);
    transition: all 0.25s ease;
    z-index: 60;
}

.tourial-sidebar__item.active::after {
    transform: translateX(0);
}

/* ---- Icon wrapper ---- */
.tourial-sidebar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    height: 47px;
}

.tourial-sidebar__icon img {
    width: 32px;
    height: auto;
    display: block;
}

/* Active / inactive icon toggle */
.tourial-sidebar__item .tourial-sidebar__icon img.active {
    display: none;
}
.tourial-sidebar__item .tourial-sidebar__icon img.inactive {
    display: block;
}

.tourial-sidebar__item.active .tourial-sidebar__icon img.active {
    display: block;
}
.tourial-sidebar__item.active .tourial-sidebar__icon img.inactive {
    display: none !important;
}

/* ---- Tooltip on hover ---- */
.tourial-sidebar__tooltip {
    position: absolute;
    left: calc(var(--tourial-sidebar-width) - 8px);
    top: 50%;
    transform: translateY(-50%);
    background: #fff;
    box-shadow: 0px 0px 20px rgba(0, 0, 0, 0.27);
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
    padding: 0 10px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease, transform 0.15s ease;
    transform: translateY(-50%) translateX(-4px);
    z-index: 9001;
}

.tourial-sidebar__item:hover .tourial-sidebar__tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ------------------------------------------------------------------ */
/*  MOBILE BOTTOM NAVBAR                                               */
/* ------------------------------------------------------------------ */
.tourial-mobile-navbar {
    display: none; /* hidden on desktop */
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 600px) {
    .tourial-mobile-navbar {
        display: flex !important;
        position: fixed !important;
        bottom: 12px !important;
        left: 25px !important;
        right: 25px !important;
        top: auto !important;
        height: 66px !important;
        z-index: 99999 !important;
        background: rgba(255, 255, 255, 0.90) !important;
        -webkit-backdrop-filter: saturate(150%) blur(14px) !important;
        backdrop-filter: saturate(150%) blur(14px) !important;
        border: 1px solid rgba(0, 0, 0, 0.08) !important;
        border-radius: 24px !important;
        box-shadow: 0 14px 38px rgba(16, 24, 40, 0.25) !important;
        justify-content: space-between;
        align-items: center;
        padding: 4px 6px;
        /* Prevent parent transforms from breaking fixed positioning */
        transform: none !important;
        will-change: transform;
        contain: layout style;
    }
}

/* ---- Navbar button (link) ---- */
.tourial-mnav__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    height: 100%;
    text-decoration: none !important;
    transition: transform 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.tourial-mnav__btn:active {
    transform: scale(0.96);
}

.tourial-mnav__btn img {
    height: 24px;
    width: auto;
}

/* Active / inactive icon toggle */
.tourial-mnav__btn img.active {
    display: none;
}
.tourial-mnav__btn img.inactive {
    display: block;
    opacity: 0.95;
    filter: grayscale(1) saturate(0) brightness(1.05) contrast(0.9);
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.tourial-mnav__btn.active img.inactive {
    display: none !important;
}
.tourial-mnav__btn.active img.active {
    display: block !important;
    filter: invert(52%) sepia(86%) saturate(746%) hue-rotate(352deg) brightness(98%) contrast(103%);
    transform: scale(1.02);
    opacity: 1;
}

/* ---- Center "Explore" button ---- */
.tourial-mnav__center {
    flex: 0 0 auto;
    width: 58px;
    height: 58px;
    border-radius: 100px;
    background: var(--tourial-primary);
    margin-top: -22px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(239, 126, 24, 0.4);
    transition: transform 0.16s ease, box-shadow 0.25s ease;
}

.tourial-mnav__center:active {
    transform: scale(0.95);
}

.tourial-mnav__center img {
    filter: brightness(0) invert(1) !important;
    display: block !important;
    height: 24px;
    width: auto;
}

/* ------------------------------------------------------------------ */
/*  Utility: ensure WP theme doesn't break the fixed positioning       */
/* ------------------------------------------------------------------ */
.tourial-sidebar,
.tourial-mobile-navbar {
    box-sizing: border-box;
}

.tourial-sidebar *,
.tourial-mobile-navbar * {
    box-sizing: border-box;
}
