/* ===================================
   SIDEBAR NAVIGATION
   =================================== */

/* ---- SIDEBAR ANIMATION KEYFRAMES ---- */
@keyframes sb-nav-item-in {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes sb-icon-bounce {
    0%, 100% { transform: translateY(0) scale(1); }
    40%       { transform: translateY(-4px) scale(1.15); }
    70%       { transform: translateY(2px) scale(0.95); }
}

@keyframes sb-avatar-pop {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
    50%       { box-shadow: 0 0 0 6px rgba(255,255,255,0.10); }
}

/* Fixed left sidebar with brand teal gradient */
.rpv-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    /* Responsive width: shrinks from 260px at large screens down to 200px
       at 992px so the content area stays usable without collapsing the sidebar. */
    width: 260px;
    width: clamp(200px, 22vw, 260px);
    height: 100vh;
    /* background: linear-gradient(rgb(0, 130, 131) 0%, rgb(0, 103, 104) 100%); */
    background: linear-gradient(var(--brand-secondary) 0%, var(--brand-dark) 100%);
    z-index: 1040;
    display: flex;
    flex-direction: column;
    /* No shadow – flush with page edge */
    box-shadow: none;
    /* Animate both slide (mobile) and width collapse (desktop) – spring bounce */
    transition: width 0.45s cubic-bezier(0.34, 1.25, 0.64, 1),
        transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1),
        box-shadow 0.35s ease;
    overflow: hidden;
}

/* Mobile: sidebar hidden by default, slides in on open */
@media (max-width: 991px) {
    .rpv-sidebar {
        transform: translateX(-100%);
        height: 100vh;
        height: 100dvh;
        overflow: hidden;
    }

    .sidebar-nav {
        flex: 1 1 0;
        min-height: 0;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .rpv-sidebar.is-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.22);
    }

    /* Stagger-in nav items when sidebar opens on mobile */
    .rpv-sidebar.is-open .sidebar-nav-item {
        animation: sb-nav-item-in 0.38s cubic-bezier(0.34, 1.3, 0.64, 1) both;
    }

    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(1)  > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(1)  { animation-delay: 0.05s; }
    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(2)  > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(2)  { animation-delay: 0.10s; }
    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(3)  > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(3)  { animation-delay: 0.15s; }
    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(4)  > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(4)  { animation-delay: 0.18s; }
    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(5)  > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(5)  { animation-delay: 0.21s; }
    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(6)  > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(6)  { animation-delay: 0.24s; }
    .rpv-sidebar.is-open .sidebar-nav > li:nth-child(n+7) > .sidebar-nav-item,
    .rpv-sidebar.is-open .sidebar-nav > .sidebar-nav-item:nth-child(n+7) { animation-delay: 0.27s; }
}

/* ── Phone-specific: compress everything to fit without scroll ── */
@media (max-width: 767px) {
    /* Wider sidebar: covers ~85% of the screen so the background white
       space on the right is minimised and text wraps less aggressively */
    .rpv-sidebar {
        width: 85vw;
        max-width: 300px;
    }

    /* Prevent the page from scrolling horizontally on mobile phones */
    body,
    .container-fluid {
        overflow-x: hidden;
        max-width: 100vw;
    }

    /* Shrink header height — JS syncs it to the navbar height which can
       be large on mobile; cap it so the nav has enough vertical room */
    .sidebar-header {
        height: 50px !important;
        min-height: 50px !important;
    }

    /* Nav area: no scroll — items must fit */
    .sidebar-nav {
        overflow: hidden;
        flex: 1 1 0;
        min-height: 0;
        padding: 4px 0;
    }

    /* Compact nav items */
    .sidebar-nav-item {
        padding: 7px 12px;
        font-size: 12.5px;
        gap: 8px;
    }

    .sidebar-nav-item i {
        font-size: 14px;
        width: 18px;
    }

    /* Compact submenu items */
    .sidebar-submenu-item {
        padding: 6px 12px 6px 38px;
        font-size: 12px;
    }

    /* Compact dividers */
    .sidebar-divider {
        margin: 3px 0;
    }

    /* Compact footer */
    .sidebar-footer {
        padding: 7px 12px 8px;
    }

    .sidebar-user-card {
        padding: 4px 0 6px;
    }

    .sidebar-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 15px;
    }

    .sidebar-user-name {
        font-size: 13px;
    }

    .sidebar-profile-link {
        font-size: 11px;
    }

    .sidebar-logout-btn {
        padding: 5px 8px;
        font-size: 13px;
        margin-top: 2px;
    }
}

/* Desktop: sidebar always visible, push content right */
@media (min-width: 992px) {
    .rpv-sidebar {
        transform: translateX(0);
    }

    /* Offset navbar and main content to the right of the expanded sidebar.
       Uses the same clamp() as the sidebar width so margin always tracks it. */
    body.has-sidebar nav.navbar,
    body.has-sidebar #main-content,
    body.has-sidebar nav.footer,
    body.has-sidebar .uat-notification-class {
        margin-left: 260px;
        margin-left: clamp(200px, 22vw, 260px);
        transition: margin-left 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
    }

    /* Collapsed state: shrink sidebar to icon-strip and shift content accordingly */
    body.has-sidebar.sidebar-collapsed nav.navbar,
    body.has-sidebar.sidebar-collapsed #main-content,
    body.has-sidebar.sidebar-collapsed nav.footer,
    body.has-sidebar.sidebar-collapsed .uat-notification-class {
        /* margin-left: 60px; */
        margin-left: 44px;
        margin-right: -15px;
        top: -3px;
        border-radius: 1px;
        transition: margin-left 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
    }

    /* Remove any top gap – navbar must be flush with the top of the page.
       Also zero out Bootstrap's container-fluid horizontal padding so the
       navbar bar itself has no left/right breathing room relative to the
       sidebar edge. */
    body.has-sidebar nav.navbar {
        margin-left: calc(clamp(200px, 22vw, 260px) - 20px);
        margin-right: -15px;
        top: -3px;
        border-radius: 1px;
    }

    /* Remove outer container-fluid padding that creates a gap on the left */
    body.has-sidebar nav.navbar>.container-fluid {
        padding-left: 0;
        padding-right: 0;
    }

    /* Taller navbar inner container – flex row, vertically centered */
    body.has-sidebar nav.navbar .container-fluid>#bs-example-navbar-collapse-1 {
        display: flex;
        align-items: center;
        justify-content: space-between;
        min-height: 60px;
        padding: 0 12px 0 0;
        margin: 0;
    }

    /* Search container fills remaining horizontal space */
    body.has-sidebar .searchBarContainer {
        display: flex !important;
        flex: 1;
        align-items: center;
        justify-content: flex-end;
        float: none !important;
        margin: 0 !important;
        padding: 0 8px 0 0 !important;
    }

    body.has-sidebar .searchBarContainer .search-bar-wrapper {
        width: 100%;
        max-width: 680px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    body.has-sidebar .searchBarContainer .search-bar-wrapper form {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        margin: 0 !important;
        padding: 0;
        justify-content: end;
    }

    /* Taller search input – fills available space */
    body.has-sidebar #navbar-keyword-input {
        flex: 1;
        min-width: 0 !important;
        width: 35rem !important;
        height: 44px !important;
        font-size: 15px;
        border-radius: 6px;
        border: 1px solid #ddd;
        padding: 0 14px !important;
    }

    /* Taller FIND button to match input height */
    body.has-sidebar .searchBarContainer .search-bar-wrapper button,
    body.has-sidebar .searchBarContainer .search-bar-wrapper input[type="submit"] {
        height: 44px;
        padding: 0 24px;
        border-radius: 6px;
        font-size: 15px;
        white-space: nowrap;
    }

    /* ---- Logo fix: prevent logo column from being squeezed out ----
       At 992-1009px the search bar (flex:1) was collapsing the logo ul
       to zero. Force the logo side to hold its natural size. */

    /* Logo nav-ul: don't shrink, don't float */
    body.has-sidebar nav.navbar ul.nav.navbar-nav:first-child {
        flex: 0 0 auto;
        float: none;
        margin: 0;
        padding: 0;
    }

    /* Always show the desktop logo; override the inline left:-15px offset */
    body.has-sidebar #header-logo {
        display: flex !important;
        align-items: center;
        width: auto;
        left: 0 !important;
        margin: 0;
        padding: 0;
    }

    /* Align the logo image vertically with the hamburger button */
    body.has-sidebar #header-logo img.menu-logo-agency,
    body.has-sidebar #header-logo img.menu-logo {
        display: block;
        max-height: 40px;
        width: auto;
        vertical-align: middle;
    }

    /* The container row: flex, no extra padding */
    body.has-sidebar .container-menu-logo {
        display: flex !important;
        align-items: center;
        gap: 12px;
        padding: 0 12px;
        margin: 0 !important;
        width: auto;
    }

    /* Keep mobile logo hidden on desktop */
    body.has-sidebar #mobile-logo {
        display: none !important;
    }
}

/* Mobile backdrop overlay – fades in/out smoothly */
#sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1039;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#sidebar-overlay.is-active {
    opacity: 1;
    pointer-events: auto;
}

/* Sidebar header: holds collapse toggle (desktop) and mobile close button.
   Height matches the navbar (≈50px) so the sidebar aligns flush with it. */
.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    /* Match the navbar height */
    height: 60px;
    min-height: 71px;
    flex-shrink: 0;
    gap: 6px;
}

/* Desktop collapse/expand toggle – white hamburger icon */
.sidebar-collapse-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    border-radius: 4px;
    transition: background 0.25s ease, transform 0.4s cubic-bezier(0.34, 1.6, 0.64, 1), box-shadow 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    /* Fixed container so the two stacked icons don't shift layout */
    position: relative;
    width: 36px;
    height: 36px;
}

.sidebar-collapse-btn:hover {
    background: rgba(255, 255, 255, 0.22);
    transform: scale(1.12);
    box-shadow: 0 0 10px rgba(255,255,255,0.2);
}

/* Hamburger SVG icon (menu.svg) – shown when sidebar is collapsed */
.collapse-icon-hamburger {
    position: absolute;
    width: 22px;
    filter: brightness(0) invert(1);
    display: none;
}

/* X icon – shown when sidebar is expanded */
.collapse-icon-close {
    position: absolute;
    font-size: 20px;
    display: block;
    -webkit-text-stroke: 0.75px currentColor;
}

.collapse-icon-close-mb {
    font-size: 20px;
    display: block;
    -webkit-text-stroke: 0.75px currentColor;
    margin-top: 8px;
    margin-right: 5px;
}

/* Swap icons when sidebar collapses */
.rpv-sidebar.is-collapsed .collapse-icon-hamburger {
    display: block;
}

.rpv-sidebar.is-collapsed .collapse-icon-close {
    display: none;
}

/* Hide desktop collapse button on mobile (mobile uses the navbar hamburger) */
@media (max-width: 991px) {
    .sidebar-collapse-btn {
        display: none;
    }
}

/* Mobile close button – only shown on mobile */
.sidebar-close-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    padding: 0 2px;
    transition: color 0.2s;
}

.sidebar-close-btn:hover {
    color: #fff;
}

@media (min-width: 992px) {
    .sidebar-close-btn {
        display: none;
    }
}

/* Scrollable nav area */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
}

/* Individual nav link – allow text to wrap so long labels are not clipped */
.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    color: #fff !important;
    text-decoration: none !important;
    font-family: 'Nunito', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    transition: background 0.22s ease,
                transform 0.25s cubic-bezier(0.34, 1.5, 0.64, 1),
                box-shadow 0.22s ease;
    /* Allow wrapping – prevents 'Customer Relationship Management' being cut */
    white-space: normal;
    word-break: break-word;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    line-height: 1.3;
}

/* Keep the icon from shrinking when the label wraps */
.sidebar-nav-item i:first-child {
    flex-shrink: 0;
}

.sidebar-nav-item:hover,
.sidebar-nav-item.active {
    background: rgba(255, 255, 255, 0.20);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateX(4px);
    box-shadow: inset 3px 0 0 rgba(255,255,255,0.6);
}

.sidebar-nav-item i {
    font-size: 16px;
    width: 20px;
    flex-shrink: 0;
    text-align: center;
    transition: transform 0.35s cubic-bezier(0.34, 1.6, 0.64, 1);
}

.sidebar-nav-item:hover i:first-child {
    animation: sb-icon-bounce 0.45s cubic-bezier(0.34, 1.5, 0.64, 1) both;
}

/* Animated caret for collapsible sections */
.sidebar-caret {
    margin-left: auto;
    font-size: 11px;
    transition: transform 0.4s cubic-bezier(0.34, 1.5, 0.64, 1);
    flex-shrink: 0;
}

.sidebar-nav-item[aria-expanded="true"] .sidebar-caret {
    transform: rotate(180deg);
}

/* Submenu – slightly darker tint of the same gradient so it stays on-brand */
.sidebar-submenu {
    background: rgba(0, 100, 130, 0.12);
}

/* Submenu individual link */
.sidebar-submenu-item {
    display: block;
    padding: 8px 16px 8px 46px;
    color: rgba(255, 255, 255, 0.92) !important;
    text-decoration: none !important;
    font-size: 13px;
    transition: background 0.22s ease,
                transform 0.28s cubic-bezier(0.34, 1.5, 0.64, 1),
                box-shadow 0.22s ease;
    white-space: normal;
    word-break: break-word;
    line-height: 1.35;
}

.sidebar-submenu-item:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff !important;
    text-decoration: none !important;
    transform: translateX(4px);
    box-shadow: inset 3px 0 0 rgba(255,255,255,0.45);
}

/* Thin divider between menu groups */
.sidebar-divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 5px 0;
}

/* Disabled menu item wrapper */
.sidebar-item-disabled {
    opacity: 0.80;
    position: relative;
    pointer-events: auto !important;
    cursor: no-drop;
}

.sidebar-item-disabled>.sidebar-nav-item,
.sidebar-item-disabled>.sidebar-submenu-item {
     opacity: 0.52;
    cursor: not-allowed !important;
    pointer-events: none !important;
}

.sidebar-item-disabled .upgrade-tooltip {
    visibility: hidden;
    width: 190px;
    background-color: rgba(75, 75, 75, 0.96);
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 7px 12px;
    position: absolute;
    z-index: 10001;
    left: 50%;
    bottom: calc(100% + 7px);
    transform: translateX(-50%);

    opacity: 0;
    transition: opacity 0.25s, background-color 0.2s;
    font-size: 12px;
    line-height: 1.4;
    white-space: normal;
    pointer-events: auto;
    cursor: pointer;
}

.sidebar-item-disabled .upgrade-tooltip:hover {
    background-color: rgba(40, 40, 40, 0.98);
    text-decoration: underline;
}

.sidebar-item-disabled .upgrade-tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px;
    border-style: solid;
    border-color: rgba(75, 75, 75, 0.96) transparent transparent transparent;
}

.sidebar-item-disabled:hover .upgrade-tooltip {
    visibility: visible;
    opacity: 1;
}

/* When the sidebar is collapsed the upgrade tooltip is rendered via the
   shared #sidebar-icon-tooltip (position:fixed). Hide the absolute one
   so it doesn't clip inside overflow:hidden. */
.rpv-sidebar.is-collapsed .sidebar-item-disabled .upgrade-tooltip {
    display: none !important;
}

/* Sidebar footer: user card + logout */
.sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 10px 14px 12px;
    flex-shrink: 0;
    font-family: 'Nunito', sans-serif;
}

/* Clickable user card – links to profile */
.sidebar-user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none !important;
    padding: 6px 0 8px;
    border-radius: 6px;
    transition: background 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.5, 0.64, 1);
    overflow: hidden;
}

.sidebar-user-card:hover {
    background: none;
    transform: none;
}

/* Avatar circle – holds photo or icon */
.sidebar-user-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 18px;
    flex-shrink: 0;
    overflow: hidden;
}

/* Profile photo inside avatar */
.sidebar-user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Text block next to avatar */
.sidebar-user-text {
    overflow: hidden;
}

.sidebar-user-name {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Nunito', sans-serif;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-profile-link {
    color: rgba(255, 255, 255, 0.80) !important;
    font-size: 12px;
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    text-decoration: none !important;
    display: flex;
    align-items: center;
    gap: 3px;
}

.sidebar-profile-link i {
    font-size: 10px;
}

/* Logout row */
.sidebar-logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 7px 10px;
    margin-top: 2px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff !important;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.5, 0.64, 1), box-shadow 0.25s ease;
    cursor: pointer;
}

.sidebar-logout-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    color: #fff !important;
    transform: translateX(4px);
    box-shadow: inset 3px 0 0 rgba(255,255,255,0.5);
}

/* Hamburger toggle button in the top navbar (mobile only) */
#sidebar-toggle-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 0px;
    margin-right: 4px;
    display: flex;
    align-items: center;
    margin-top: 12px;
}

#sidebar-toggle-btn img {
    width: 24px;
    filter: brightness(0) invert(1);
}

@media (min-width: 992px) {
    #sidebar-toggle-btn {
        display: none;
    }
}

/* ===================================
   SIDEBAR COLLAPSED STATE (desktop)
   Width shrinks to 60px; only icons
   remain visible.
   =================================== */

@media (min-width: 992px) {
    .rpv-sidebar.is-collapsed {
        width: 60px;
        transition: width 0.45s cubic-bezier(0.34, 1.25, 0.64, 1),
                    transform 0.45s cubic-bezier(0.34, 1.25, 0.64, 1);
    }

    /* Stagger icons back in after collapsing */
    .rpv-sidebar.is-collapsed .sidebar-nav-item {
        animation: sb-nav-item-in 0.32s cubic-bezier(0.34, 1.3, 0.64, 1) both;
        animation-delay: 0.1s;
    }

    /* Center icons, hide the text label span */
    .rpv-sidebar.is-collapsed .sidebar-nav-item {
        justify-content: center;
        gap: 0;
        padding: 11px 0;
    }

    /* Hide animated caret arrows */
    .rpv-sidebar.is-collapsed .sidebar-caret {
        display: none;
    }

    /* Hide any open submenus */
    .rpv-sidebar.is-collapsed .sidebar-submenu {
        display: none !important;
    }

    /* Text labels (wrapped via JS) – hidden when collapsed */
    .rpv-sidebar.is-collapsed .sidebar-label {
        display: none;
    }

    /* Footer: center elements */
    .rpv-sidebar.is-collapsed .sidebar-footer {
        padding: 10px 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    /* Hide text block inside user card */
    .rpv-sidebar.is-collapsed .sidebar-user-card .sidebar-user-text {
        display: none;
    }

    /* Center the avatar in the collapsed footer */
    .rpv-sidebar.is-collapsed .sidebar-user-card {
        justify-content: center;
        padding: 6px 0;
    }

    /* Logout button: icon only, circular */
    .rpv-sidebar.is-collapsed .sidebar-logout-btn {
        justify-content: center;
        width: 40px;
        height: 40px;
        padding: 0;
        border-radius: 50%;
        margin-top: 4px;
    }

    .rpv-sidebar.is-collapsed .sidebar-logout-btn .sidebar-label {
        display: none;
    }

    /* Collapse button centered when sidebar is collapsed */
    .rpv-sidebar.is-collapsed .sidebar-header {
        justify-content: center;
    }
}

/* ===================================
   COLLAPSED SIDEBAR ICON TOOLTIPS
   Single shared div appended to body,
   positioned via JS on mouseenter.
   =================================== */
#sidebar-icon-tooltip {
    position: fixed;
    background: rgba(75, 75, 75, 0.96);
    color: #fff;
    font-family: 'Nunito', sans-serif;
    font-size: 12px;
    font-weight: 400;
    white-space: normal;
    max-width: 190px;
    text-align: center;
    line-height: 1.4;
    padding: 7px 12px;
    border-radius: 6px;
    z-index: 9999;
    pointer-events: none;
    transform: translateY(-50%);
    opacity: 0;
    transition: opacity 0.25s ease;
}

#sidebar-icon-tooltip.is-visible {
    opacity: 1;
}

/* Upgrade-link variant: hoverable and clickable */
#sidebar-icon-tooltip.is-upgrade-link {
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.25s ease, background-color 0.2s ease;
}

#sidebar-icon-tooltip.is-upgrade-link:hover {
    background-color: rgba(40, 40, 40, 0.98);
    text-decoration: underline;
}

/* Small left-pointing arrow */
#sidebar-icon-tooltip::before {
    content: '';
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-right-color: rgba(75, 75, 75, 0.96);
}