/* ============================================================
   Pushly Ultra-Premium Navbar Styles
   ============================================================ */

/* ── Dropdown: show / hide with animation ─────────────────── */
.nav-dropdown,
.dropdown-menu {
    display: none;
    opacity: 0;
    transform: translateY(6px) scale(0.98);
    transform-origin: top end;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.nav-dropdown.is-open,
.dropdown-menu.is-open {
    display: block !important;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    animation: dropdown-reveal 0.18s ease forwards;
}

@keyframes dropdown-reveal {
    from { opacity: 0; transform: translateY(6px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0)   scale(1);    }
}

/* ── Chevron rotation when dropdown is open ───────────────── */
[data-bs-toggle="dropdown"][aria-expanded="true"] .chevron-icon {
    transform: rotate(180deg);
    opacity: 0.8;
}

/* ── Premium dropdown panel ───────────────────────────────── */
.premium-dropdown {
    border-radius: 1rem;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

/* ── Dropdown item hover: slight RTL slide + icon pop ─────── */
.dropdown-item {
    position: relative;
    transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.dropdown-item:hover {
    transform: translateX(-2px);
}
.dropdown-item:hover span[class*="h-7"] {
    transform: scale(1.1);
    transition: transform 0.15s ease;
}

/* ── Nav link layout ──────────────────────────────────────── */
.nav-link {
    position: relative;
    overflow: visible;
}

/* ── Theme toggle: sun/moon icon visibility ───────────────── */
html[data-theme="light"] #sun-icon  { display: none; }
html[data-theme="light"] #moon-icon { display: inline; }
html[data-theme="dark"]  #sun-icon  { display: inline; color: #fbbf24; }
html[data-theme="dark"]  #moon-icon { display: none; }

/* ── Theme toggle & logout: glass pill style ──────────────── */
.theme-orb,
.logout-btn {
    position: relative;
    isolation: isolate;
}

/* ── Hamburger bar animation when menu is open ────────────── */
#navbar-toggler[aria-expanded="true"] .hamburger-bar:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg);
    width: 16px;
}
#navbar-toggler[aria-expanded="true"] .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#navbar-toggler[aria-expanded="true"] .hamburger-bar:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg);
    width: 16px;
}

/* ── Navbar scroll shadow enhancement ────────────────────── */
#main-navbar {
    will-change: box-shadow;
}

/* ── Mobile menu slide-in ─────────────────────────────────── */
@media (max-width: 1023px) {
    #navbar-nav-menu {
        transition: opacity 0.2s ease, transform 0.2s ease;
    }
    #navbar-nav-menu:not(.hidden) {
        animation: mobile-menu-in 0.2s ease forwards;
    }
    @keyframes mobile-menu-in {
        from { opacity: 0; transform: translateY(-8px); }
        to   { opacity: 1; transform: translateY(0);    }
    }

    /* Mobile: full-width dropdowns inline (not floating) */
    .premium-dropdown {
        position: static !important;
        width: 100% !important;
        margin-top: 0.25rem;
        box-shadow: none !important;
        border-color: transparent !important;
        background: transparent !important;
        padding-inline-start: 1.25rem;
    }
    [data-theme="dark"] .premium-dropdown {
        background: transparent !important;
    }
}

/* ── Responsive: hide text on medium breakpoints ──────────── */
@media (max-width: 1200px) and (min-width: 1024px) {
    .nav-link span,
    .dropdown-toggle > span:not(.flex) {
        display: none;
    }
    .chevron-icon { display: none; }
}

/* ── Logout form: no extra spacing ───────────────────────── */
form.flex { margin: 0; padding: 0; }

/* ── Remove any leftover Bootstrap interference ───────────── */
.navbar-nav { gap: 0; }
.nav-item   { flex: 0 0 auto; }

/* ── Draft review count badge (sidebar) ───────────────────── */
.sidebar-draft-count {
    display: inline-flex;
    min-width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.4rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    background: #d97706;
    box-shadow: 0 1px 4px rgba(217, 119, 6, 0.35);
}

html[data-theme="dark"] .sidebar-draft-count {
    background: #f59e0b;
    color: #1c1917;
    box-shadow: 0 1px 6px rgba(245, 158, 11, 0.4);
}

/* ── Published WooCommerce count badge (sidebar) ──────────── */
.sidebar-published-count {
    display: inline-flex;
    min-width: 1.5rem;
    height: 1.5rem;
    align-items: center;
    justify-content: center;
    padding: 0 0.4rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    color: #fff;
    background: #059669;
    box-shadow: 0 1px 4px rgba(5, 150, 105, 0.35);
}

html[data-theme="dark"] .sidebar-published-count {
    background: #34d399;
    color: #052e16;
    box-shadow: 0 1px 6px rgba(52, 211, 153, 0.4);
}

/* ── Header notification count badge ─────────────────────── */
.notification-badge {
    position: absolute;
    top: -0.125rem;
    inset-inline-start: -0.125rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1rem;
    height: 1rem;
    padding: 0 0.125rem;
    border-radius: 9999px;
    font-size: 0.5625rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
    background: #f43f5e;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

html[data-theme="dark"] .notification-badge {
    box-shadow: 0 0 0 2px #09090b;
}

/* ── Notification dropdown items ─────────────────────────── */
.notification-card {
    position: relative;
}

.notification-body {
    display: flex;
    flex-direction: column;
}

.notification-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.notification-delete-btn {
    display: inline-flex;
    height: 1.5rem;
    width: 1.5rem;
    shrink: 0;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    border: 1px solid #e4e4e7;
    background: #f4f4f5;
    color: #71717a;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.notification-delete-btn:hover {
    border-color: #fecaca;
    background: #fff1f2;
    color: #e11d48;
}

.notification-delete-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

html[data-theme="dark"] .notification-delete-btn {
    border-color: #3f3f46;
    background: #27272a;
    color: #a1a1aa;
}

html[data-theme="dark"] .notification-delete-btn:hover {
    border-color: #9f1239;
    background: rgba(190, 18, 60, 0.15);
    color: #fb7185;
}
