/* ==========================================================================
   Dialog — link styles, active/locked states, footer links, member login
   ========================================================================== */

:where(.main-nav) {
    .nav-container {
        /* Base link styles */

        a {
            color: #fff;
            text-indent: initial;

            &.locked::after {
                content: "";
                width: 1.5rem;
                height: 1.5rem;
                background: url("/wp-content/themes/aana/svgs/lock-light-blue.svg") center / contain no-repeat;
                display: inline-block;
                margin-left: 0.5rem;
            }
        }

        li a {
            padding-block: 0.5rem;

            &:hover {
                text-decoration: underline;
            }

            &.active {
                text-underline-offset: 0.4rem;
                color: var(--color-brand-orange);
            }
        }

        li:has(a.active) {
            background: var(--color-brand-navy-dark-2);
        }

        @supports selector(:has(+ *)) {
            li:has(a + button) a {
                padding-right: 2rem;
            }
        }

        /* Social icons row */

        .icon-row {
            margin-top: 4rem;
            display: flex;
            gap: 1rem;
            width: 100%;
            justify-content: flex-start;
            flex-flow: row nowrap;
            padding-inline: 4rem;
            padding-bottom: 2rem;

            a {
                display: flex;
                align-items: center;
                justify-content: center;
                aspect-ratio: 1 / 1;
                padding: 1rem;
                border-radius: 50%;
                background: rgba(255, 255,255,0.4);

                &[aria-label="Youtube"] {
                    svg {
                        transform: translateY(-0.3rem);
                    }
                }
            }
            svg {
                height: 1.7rem;
                width: 1.7rem;
            }
        }

        /* Dialog footer links + member login */

        .dialog-menu-links {
            .member-login-links {
                margin-bottom: 2rem;
                display: flex;
                flex-flow: column;
                .regions-link {
                    display: flex;
                    flex-flow: row-reverse nowrap;
                    justify-content: flex-end;
                    gap: 0.5rem;
                    svg {
                        width: 1.5rem;
                        height: 1.5rem;
                        transform: translateY(-0.2rem);
                    }
                }

                a {
                    display: flex;
                    flex-flow: row nowrap;
                    gap: 0.5rem;
                    align-items: center;
                    border-radius: 0.5rem;
                    transition: all 250ms ease-in-out;
                    padding: 1rem;
                    padding-inline: 0;
                    width: 100%;
                    max-width: 100rem;
                }

                .login-link,
                .logout-link {
                    padding-left: 0;
                    display: block;
                    width: 90%;

                    svg {
                        width: 3rem;
                    }
                }

                .dashboard-link {
                    padding-inline: 0;

                    svg {
                        margin-right: 0.5rem;
                        width: 2rem;
                        height: 2rem;
                    }
                }
            }

            li {
                a {
                    font-size: 1.6rem !important;
                }
            }
        }
    }
}

@media screen and (max-width: 425px) {
    dialog.nav-container {
        .icon-row {
            padding-inline: 2rem;
            gap: 1rem;
        }
    }
}
