/*!
 * This file is part of the Sylius package.
 *
 * (c) Sylius Sp. z o.o.
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

.navbar-vertical .navbar-collapse .sidebar.navbar-nav {
    --tblr-nav-link-color: rgba(255, 255, 255, 0.8);

    .nav-item {
        .nav-link {
            padding-top: 0.65rem;
            padding-bottom: 0.65rem;
            font-size: 0.95rem;
            font-weight: 500;

            &:active {
               transform: translateY(1px);
            }
        }

        .nav-link-icon {
            color: rgba(255, 255, 255, 0.4);
        }

        .dropdown-menu-column {
            padding-bottom: 1.3rem;

            .dropdown-item {
                padding-top: 0.3rem;
                padding-bottom: 0.3rem;
                background: transparent;
                color: $gray-500;

                &.active {
                    color: $primary;
                }

                &:active {
                    transform: translateY(1px);
                }
            }
        }

        .dropdown-toggle.show::after {
            transform: rotate(135deg) translate(2px, -2px);
        }
    }
}

.menu-search {
    .btn,
    .form-control {
        border: 1px solid transparent;
        background: transparent;
        transition: opacity 0.1s;
    }

    .btn {
        padding-left: 0.4rem;
        border-right: 0;
    }

    .form-control {
        border-left: 0;
    }

    > * {
        opacity: 0.5;
    }

    &:has(input[data-menu-search]:focus) {
        > * {
            opacity: 0.8;
        }

        .btn,
        .form-control {
            border-color: var(--tblr-navbar-border-color);
        }
    }

    [data-menu-search-clear] {
        display: none;
    }

    [data-menu-search-icon] {
        display: inherit;
    }

    &:has(input[data-menu-search]:not(:placeholder-shown)) [data-menu-search-clear] {
        display: inherit;
    }

    &:has(input[data-menu-search]:not(:placeholder-shown)) [data-menu-search-icon] {
        display: none;
    }
}
