/* Mobile Menu Block Styles */
.bb-mobile-menu-wrapper {
    position: relative;
    z-index: 1000;

    /* Hamburger Button */
    .bb-mobile-hamburger {
        display: none;
        background: none;
        border: none;
        cursor: pointer;
        padding: 10px;
        flex-direction: column;
        gap: 5px;
        width: 50px;
        height: 50px;
        align-items: center;
        justify-content: center;
        border-radius: 8px;
        transition: all 0.3s ease;

        &:hover {
            background: rgba(0, 0, 0, 0.05);
        }

        span {
            width: 30px;
            height: 3px;
            background: var(--hamburger-color, #333);
            border-radius: 2px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: center;
        }

        &.active {
            span:nth-child(1) {
                transform: rotate(45deg) translate(7px, 7px);
            }

            span:nth-child(2) {
                opacity: 0;
                transform: scale(0);
            }

            span:nth-child(3) {
                transform: rotate(-45deg) translate(7px, -7px);
            }
        }

        @media (max-width: 768px) {
            display: flex;
        }
    }
}

/* Mobile Overlay */
.bb-mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 2147483647;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;

    &.active {
        opacity: 1;
        visibility: visible;
    }

    .bb-mobile-content {
        background: var(--overlay-bg, #ffffff);
        width: 100vw;
        height: 100vh;
        position: relative;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex;
        flex-direction: column;
        overflow: hidden;
        z-index: 2147483647;
    }

    &.active .bb-mobile-content {
        transform: translateX(0);
    }

    .bb-mobile-header {
        padding: 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: space-between;
        align-items: center;
        background: var(--overlay-bg, #ffffff);
        flex-shrink: 0;
        z-index: 2147483647;

        .mobile-menu-title {
            margin: 0;
            font-size: 1.2rem;
            color: var(--link-color, #333);
            font-weight: 600;
        }

        .bb-close-btn {
            background: none;
            border: none;
            font-size: 24px;
            cursor: pointer;
            color: var(--link-color, #333);
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            z-index: 2147483647;

            &:hover {
                background: rgba(0, 0, 0, 0.1);
                transform: scale(1.1);
            }
        }
    }

    .bb-mobile-nav {
        flex: 1;
        overflow-y: auto;
        padding: 0;
        z-index: 2147483647;

        ul {
            list-style: none;
            margin: 0;
            padding: 0;

            li {
                margin: 0;

                a {
                    display: block;
                    padding: 15px 20px;
                    text-decoration: none;
                    color: var(--link-color, #333);
                    font-weight: 500;
                    font-size: 1.1rem;
                    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
                    transition: all 0.2s ease;
                    position: relative;
                    z-index: 2147483647;

                    &:hover {
                        background: rgba(217, 192, 126, 0.1);
                        color: var(--link-hover-color, #d9c07e);
                        padding-left: 25px;
                    }
                }

                &:last-child a {
                    border-bottom: none;
                }

                /* Submenu styles */
                &.menu-item-has-children {
                    >a {
                        position: relative;

                        &::after {
                            content: '▼';
                            position: absolute;
                            right: 20px;
                            font-size: 0.8rem;
                            transition: transform 0.3s ease;
                            z-index: 2147483647;
                        }
                    }

                    &.submenu-open>a::after {
                        transform: rotate(180deg);
                    }

                    .sub-menu {
                        max-height: 0;
                        overflow: hidden;
                        background: rgba(0, 0, 0, 0.03);
                        transition: max-height 0.3s ease;
                        z-index: 2147483647;

                        &.open {
                            max-height: 100%;
                        }

                        a {
                            padding: 12px 40px;
                            font-size: 1rem;
                            font-weight: 400;
                            color: rgba(51, 51, 51, 0.8);
                            z-index: 2147483647;

                            &:hover {
                                padding-left: 45px;
                            }
                        }
                    }
                }
            }
        }
    }
}

/* Body scroll lock */
body.bb-mobile-menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* ===================================
   LANGUAGE FLAGS STYLES
   =================================== */

.bb-mobile-nav .bb-menu-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
    z-index: 2147483647;
}

.bb-mobile-nav .bb-menu-flag.bb-flag-emoji {
    font-style: normal;
    line-height: 1;
}

.bb-mobile-nav .bb-flag-svg {
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    z-index: 2147483647;
}

.bb-mobile-nav a:hover .bb-menu-flag {
    transform: scale(1.1);
}

.bb-mobile-nav a:hover .bb-flag-svg {
    border-color: var(--link-hover-color, #d9c07e);
    box-shadow: 0 2px 8px rgba(217, 192, 126, 0.3);
}

/* Flag positioning for mobile menu */
.bb-mobile-menu-wrapper[data-flag-position="right"] .bb-menu-flag {
    margin-left: 10px;
    margin-right: 0;
    order: 2;
}