/* Hamburger Menu Animation Styles */

/* Reset Bootstrap's background image for the toggler icon */
.navbar-toggler-icon {
    background-image: none !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    width: 2.25em !important;
    height: 2.25em !important;
}

/* Individual hamburger lines */
.hamburger-line {
    width: 28px;
    height: 3px;
    background-color: rgba(0, 0, 0, 0.75);
    margin: 3px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
    transform-origin: center;
}

/* Animate to X when menu is open */
.navbar-toggler.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.navbar-toggler.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.navbar-toggler.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Responsive sizing for mobile */
@media (max-width: 991px) {
    .navbar-toggler-icon {
        width: 2.25em !important;
        height: 2.25em !important;
    }
    
    .hamburger-line {
        width: 30px;
        height: 4px;
        margin: 4px 0;
    }
    
    .navbar-toggler.open .hamburger-line:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    
    .navbar-toggler.open .hamburger-line:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Focus styles for accessibility */
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0, 174, 239, 0.25);
}

/* Active rules indicator - blue border and background when rules are active */
.navbar-toggler.has-active-rules {
    border-color: #00AEEF !important;
    border-width: 2px !important;
    background-color: #e6f7ff !important;
}

/* Active Rules menu item background when rules are active - ONLY for hamburger menu */
.navbar-nav.d-lg-none .nav-item.has-active-rules {
    background-color: #e6f7ff !important;
    border-radius: 0.25rem;
}

/* Hamburger numerical badge - shows count of active rules */
.hamburger-rules-count {
    position: absolute !important;
    top: 8px !important;
    right: 25px !important;
    background-color: #00AEEF !important;
    color: white !important;
    font-size: 0.85rem !important;
    font-weight: bold !important;
    padding: 2px 6px !important;
    border-radius: 50% !important;
    text-align: center !important;
    min-width: 22px !important;
    height: 22px !important;
    line-height: 18px !important;
    z-index: 1001 !important;
    pointer-events: none !important;
    display: none !important;
}

/* Show the badge when hamburger has active rules */
.navbar-toggler.has-active-rules .hamburger-rules-count {
    display: block !important;
}