/* Misah Navbar Component Styles */

.misah-nav {
    background-color: #000 !important;
    padding: 0.75rem 0;
    font-family: inherit;
    position: relative;
    z-index: 1030;
}

.misah-nav-brand {
    color: #fff !important;
    font-weight: 700;
    font-size: 1.35rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    padding: 0.25rem 0;
    transition: opacity 0.2s ease;
}
.misah-nav-brand:hover {
    opacity: 0.85;
    color: #fff !important;
}

.misah-nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 0.925rem;
    padding: 0.5rem 1rem !important;
    letter-spacing: 0.01em;
    transition:
        color 0.2s ease,
        background-color 0.2s ease;
    border-radius: 6px;
    position: relative;
}
.misah-nav-link:hover,
.misah-nav-link:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08);
}
.misah-nav-link.active {
    color: #fff !important;
}
.misah-nav-link.active::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: #fff;
    border-radius: 2px;
}

/* Dropdown / Sub-menu */
.misah-nav-item.dropdown .misah-nav-link {
    padding-right: 1.5rem !important;
}
.misah-nav-item.dropdown > .misah-nav-link::before {
    content: "";
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease;
}
.misah-nav-item.dropdown.show > .misah-nav-link::before {
    transform: translateY(-50%) rotate(180deg);
}

.misah-dropdown-menu {
    background-color: #111;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.5rem 0;
    margin-top: 0.35rem !important;
    min-width: 200px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    animation: misahDropIn 0.2s ease;
}

@keyframes misahDropIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.misah-dropdown-item {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.9rem;
    font-weight: 400;
    padding: 0.5rem 1.25rem;
    transition:
        color 0.15s ease,
        background-color 0.15s ease,
        padding-left 0.15s ease;
}
.misah-dropdown-item:hover,
.misah-dropdown-item:focus {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.08);
    padding-left: 1.5rem;
}
.misah-dropdown-menu .dropdown-divider {
    border-color: rgba(255, 255, 255, 0.08);
    margin: 0.35rem 0;
}

/* Custom Hamburger Toggle */
.misah-nav-toggler {
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    padding: 0.5rem 0.65rem;
    border-radius: 6px;
    background: transparent !important;
    transition: background-color 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.misah-nav-toggler:hover {
    background-color: rgba(255, 255, 255, 0.06) !important;
}
.misah-nav-toggler:focus {
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.15);
}
.misah-toggler-bar {
    display: block;
    width: 22px;
    height: 2px;
    background-color: #fff;
    border-radius: 2px;
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
}
.misah-nav-toggler[aria-expanded="true"] .misah-toggler-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.misah-nav-toggler[aria-expanded="true"] .misah-toggler-bar:nth-child(2) {
    opacity: 0;
}
.misah-nav-toggler[aria-expanded="true"] .misah-toggler-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile */
@media (max-width: 991.98px) {
    /* Mobile menu container */
    .misah-nav .navbar-collapse {
        background-color: #000;
        padding: 1rem 0 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        margin-top: 0.75rem;
    }

    /* Full-width nav list stacked */
    .misah-nav .misah-nav-list {
        width: 100%;
        gap: 0.15rem;
    }

    /* Nav items full width */
    .misah-nav .misah-nav-item {
        width: 100%;
    }

    /* Nav links styled for mobile */
    .misah-nav .misah-nav-link {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem !important;
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.85) !important;
        font-size: 0.95rem;
    }
    .misah-nav .misah-nav-link:hover,
    .misah-nav .misah-nav-link:focus {
        background-color: rgba(255, 255, 255, 0.08);
        color: #fff !important;
    }

    /* Remove desktop underline indicator, use bg highlight instead */
    .misah-nav .misah-nav-link.active::after {
        display: none;
    }
    .misah-nav .misah-nav-link.active {
        background-color: rgba(255, 255, 255, 0.1);
        color: #fff !important;
    }

    /* Dropdown toggle in mobile */
    .misah-nav .misah-nav-item.dropdown > .misah-nav-link {
        padding-right: 2rem !important;
    }

    /* Mobile dropdown menu - indented, flat */
    .misah-nav .misah-dropdown-menu {
        background-color: rgba(255, 255, 255, 0.04);
        border: none;
        border-left: 2px solid rgba(255, 255, 255, 0.12);
        box-shadow: none;
        border-radius: 0 6px 6px 0;
        margin-top: 0.25rem !important;
        margin-left: 0.75rem;
        padding: 0.25rem 0;
        animation: none;
    }

    /* Mobile dropdown items */
    .misah-nav .misah-dropdown-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
        color: rgba(255, 255, 255, 0.75) !important;
    }
    .misah-nav .misah-dropdown-item:hover,
    .misah-nav .misah-dropdown-item:focus {
        padding-left: 1.25rem;
        color: #fff !important;
        background-color: rgba(255, 255, 255, 0.06);
    }
}

/* Editor drag hints */
.misah-nav-item.misah-drop-target {
    outline: 2px dashed rgba(59, 130, 246, 0.7);
    outline-offset: -2px;
    border-radius: 6px;
}
