@use "sass:color";
@use "vars";

.nav-inner {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 14px 8px;
}
@media (min-width: 769px) {
    .nav-inner {
        justify-content: center;
    }
}

nav {
    top: 0;
    z-index: 999;
    width: 100%;
    background: var(--color-secondary-700);
    position: relative;
}
nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 16px;
}
nav a:first-child {
    margin: 0;
    padding: 0;
    border: none;
}

nav a:hover,
nav a.active {
    color: var(--color-primary);
    text-decoration: underline;
}

#network {
    position: relative;
    width: auto;
    color: var(--color-secondary-700);
    background: var(--color-secondary-100);
    margin: 0;
    margin-right: 12px;
    font-size: 12px;
    z-index: 1;
}
#network[boltz-theme="pro"] {
    color: var(--color-secondary-700);
    background: var(--color-primary);
}

#languages {
    position: relative;
    z-index: 1;
}

#languages > a {
    margin-left: 13px;
    padding-left: 13px;
    border-left: 1px solid var(--color-white-30);
}
#languages > a.globe {
    margin-left: 0;
    border: none;
}

#languages .lang {
    display: block;
    padding: 10px 20px;
    cursor: pointer;
}

#languages .lang:hover {
    background-color: var(--color-primary);
    color: var(--color-secondary-700);
}

#languages .dropdown {
    display: none;
    position: absolute;
    top: 0px;
    right: 0px;
    background: var(--color-secondary-800);
}
#languages.active .dropdown {
    display: block;
}

#logo img {
    width: 100%;
    max-width: 165px;
    padding-right: 21px;
    padding-left: 8px;
}
#logo-mask {
    display: inline-block;
    width: 165px;
    height: 38px;
    margin-left: -6px;
    margin-right: 7px;
    background: linear-gradient(
        180deg,
        var(--color-primary-lighter) 10%,
        var(--color-primary) 90%
    );
    mask: url("../assets/boltz.svg") no-repeat center;
    mask-size: contain;

    /* For Safari */
    -webkit-mask: url("../assets/boltz.svg") no-repeat center;
    -webkit-mask-size: contain;
}
#logo-mask[boltz-theme="pro"] {
    background: linear-gradient(
        180deg,
        var(--color-secondary-200) 10%,
        var(--color-secondary-300) 90%
    );
}
#logo {
    z-index: 1;
}

#hamburger {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 400ms;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    z-index: 1000;
    margin-left: auto;
}

#hamburger.active {
    transform: rotate(45deg);
}

#hamburger .line {
    fill: none;
    transition:
        stroke-dasharray 400ms,
        stroke-dashoffset 400ms;
    stroke: var(--color-secondary-100);
    stroke-width: 5.5;
    stroke-linecap: round;
}

#hamburger .top {
    stroke-dasharray: 40 121;
}

#hamburger .bottom {
    stroke-dasharray: 40 121;
}

#hamburger.active .top {
    stroke-dashoffset: -68px;
}

#hamburger.active .bottom {
    stroke-dashoffset: -68px;
}

#collapse {
    display: none;
}
#collapse a {
    display: block;
}

@media (max-width: 769px) {
    #collapse.active {
        display: flex;
        position: fixed;
        background: var(--color-secondary-600);
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        align-items: center;
        justify-content: center;
        flex-direction: column;
    }

    #collapse.active a {
        display: block;
        padding: 6px 24px;
        font-size: 26px;
    }

    #collapse.active a.external svg {
        width: 30px;
        height: 36px;
    }
}

@media (min-width: 768px) {
    #hamburger {
        display: none;
    }

    #collapse {
        display: flex;
    }

    #collapse > :first-child {
        border-left: none;
    }

    #collapse a {
        margin-left: 13px;
        padding-left: 13px;
        border-left: 1px solid var(--color-white-30);
        display: inline;
    }
}

.banner {
    background: var(--color-error-500);
    font-size: 18px;
    padding: 5px;
    position: relative;
    z-index: 9999;
}

.banner-yellow {
    background: var(--color-primary);
    color: var(--color-secondary-600);

    a {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;

        text-decoration: underline;
        text-transform: uppercase;
        color: currentColor;
    }

    a:hover {
        color: currentColor;
    }
}
