//
// Copyright 2022 Google LLC
// SPDX-License-Identifier: Apache-2.0
//
// [Modified by Sandlada & Kai Orion]
//
// Copyright 2025 Sandlada & Kai Orion
// SPDX-License-Identifier: MIT
//

@use 'sass:map';
@use '../../../themes';
@use '../../../tokens';

$_motion: tokens.md-sys-motion-values();

@mixin styles() {
    $tokens: tokens.md-comp-navigation-bar-values();

    @layer navigation-bar-styles {
        & {
            @each $token, $value in $tokens {
                --_#{$token}: var(--gu-navigation-bar-#{$token}, #{$value});
            }

            @include themes.md-comp-elevation-theme(
                (
                    'level': var(--_container-elevation),
                    'shadow-color': var(--_container-shadow-color),
                )
            );

            width: 100%;
        }

        & {
            display: flex;
            position: relative;
            width: 100%;
            background-color: var(--_container-color);
            border-radius: var(--_container-shape);
            height: var(--_container-height);
        }

        & [data-component='elevation'] {
            transition-duration: 280ms;
            transition-timing-function: map.get($_motion, 'emphasized-easing');
            z-index: 0;
        }

        &.ripple-unbounded [data-component='ripple'] {
            --_size: calc(var(--_container-height) + var(--_active-indicator-height));
            inset: unset !important;
            height: var(--_size);
            width: var(--_size);
            border-radius: 50% !important;
        }
    }
}
