.user-profile-tabs__menu {
    display: flex;
    flex-wrap: wrap;
    column-gap: 4rem;
    row-gap: 2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.user-profile-tabs__menu a {
    font-size: 1.0625rem;
    line-height: 1.6em;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    border-bottom: 3px solid transparent;
    transition-property: border-color;
    transition-duration: 0.3s;
    text-decoration: none;
    font-weight: 600;
}

.user-profile-tabs__menu a:is(:focus-visible, :hover) {
    border-color: currentColor;
}

.user-profile-tabs__menu .user-profile-tabs__item--active a {
    border-color: currentColor;
}

@media (max-width: 1023px) {
    .user-profile-tabs__menu {
        column-gap: 3rem;
        row-gap: 1.5rem;
    }
}

@media (max-width: 767px) {
    .user-profile-tabs__menu {
        flex-direction: column;
        gap: 0.5rem;
        background-color: var(--zm-surface-bg-variant);
        border-radius: 16px;
        padding: 24px;
        margin-top: 16px;
    }

    .user-profile-tabs__menu .menu__item a {
        width: 100%;
        border: none;
        transition: text-decoration-color 0.3s;
        text-decoration: underline;
        text-decoration-thickness: 2px;
        text-decoration-color: transparent;
    }

    .user-profile-tabs__menu .user-profile-tabs__item--active a,
    .user-profile-tabs__menu .menu__item a:is(:focus-visible, :hover) {
        text-decoration-color: currentColor;
    }
}

.user-profile-tabs__toggle[hidden] {
    display: none !important;
}

.user-profile-tabs__toggle:not([hidden]) {
    display: inline-flex;
    align-items: center;
    width: 100%;
    height: 2.75rem;
}

.user-profile-tabs__toggle-icons {
    width: 0.75rem;
    height: 0.75rem;
    position: relative;
}

.user-profile-tabs__toggle-icons::before,
.user-profile-tabs__toggle-icons::after {
    content: "";
    -webkit-mask-size: 20px;
    -webkit-mask-position: center;
    -webkit-mask-repeat: no-repeat;
    mask-size: 0.75rem;
    mask-position: center;
    mask-repeat: no-repeat;
    background-color: currentColor;
    width: 0.75rem;
    height: 0.75rem;
    background-color: currentColor;
    margin-inline-start: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    order: 1;
    position: absolute;
    top: 50%;
    left: 50%;
    translate: -50% -50%;
}

.user-profile-tabs__toggle-icons::before {
    -webkit-mask-image: url("/themes/custom/zumm/icons/zm-chevron-down-icon.svg");
    mask-image: url("/themes/custom/zumm/icons/zm-chevron-down-icon.svg");
}

.user-profile-tabs__toggle-icons::after {
    -webkit-mask-image: url("/themes/custom/zumm/icons/zm-chevron-down-icon.svg");
    mask-image: url("/themes/custom/zumm/icons/zm-chevron-down-icon.svg");
    rotate: 180deg;
}

.user-profile-tabs__toggle[aria-expanded="true"]
    .user-profile-tabs__toggle-icons::before {
    animation: chevronExit 0.2s forwards;
}

.user-profile-tabs__toggle[aria-expanded="false"]
    .user-profile-tabs__toggle-icons::after {
    animation: chevronExit 0.2s forwards;
}

.user-profile-tabs__toggle[aria-expanded="false"]
    .user-profile-tabs__toggle-icons::before {
    animation: chevronEnter 0.3s forwards;
}

.user-profile-tabs__toggle[aria-expanded="true"]
    .user-profile-tabs__toggle-icons::after {
    animation: chevronEnter 0.3s forwards;
}

.user-profile-tabs__toggle[aria-expanded="true"]
    .user-profile-tabs__toggle-icons::after {
    transform: rotate(180deg);
}

.user-profile-tabs__dropdown {
    overflow: hidden;
    height: 0;
    transition: visiblity 0.3s;
}

/* Exit animation */
@keyframes chevronExit {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
        visibility: hidden;
    }
}

/* Enter animation (already rotated) */
@keyframes chevronEnter {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}
