.mt-user-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    font-family: inherit;
}

/* Login */

.mt-login-link {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.mt-login-link:hover {
    opacity: 0.8;
}

/* Button */

.mt-user-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #fff;
    padding: 0;
    font: inherit;
    font-weight: 700;
}

/* Avatar */

.mt-user-avatar-wrap,
.mt-user-avatar-wrap img,
.mt-user-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
    overflow: hidden;
}

.mt-user-avatar-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Name */

.mt-user-name {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.mt-user-arrow {
    color: #fff;
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.mt-user-menu.open .mt-user-arrow {
    transform: rotate(180deg);
}

/* Dropdown desktop */

.mt-user-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 220px;
    background: #111;
    border: 1px solid #333;
    border-radius: 10px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 99999;
}

.mt-user-menu.open .mt-user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mt-user-dropdown-link {
    display: block;
    padding: 0.9rem 1rem;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #222;
    width: 100%;
    background: #111;
}

.mt-user-dropdown-link:last-child {
    border-bottom: none;
}

.mt-user-dropdown-link:hover {
    background: #2a2a2a;
    color: #fff !important;
    text-decoration: none;
}

.mt-user-dropdown-link,
.mt-user-dropdown-link:visited,
.mt-user-dropdown-link:focus,
.mt-user-dropdown-link:active {
    color: #fff !important;
    text-decoration: none;
}

.mt-user-dropdown-link:hover {
    background: #2a2a2a;
    color: #fff !important;
    text-decoration: none;
}

/* Mobile menu fix */

@media (max-width: 995px) {
    .mt-user-menu {
        width: 100%;
        display: block;
        padding: 0.75rem 1.5rem;
    }

    .mt-user-toggle {
        width: 100%;
        display: flex;
        justify-content: flex-start;
        color: #111;
        gap: 0.75rem;
    }

    .mt-user-name,
    .mt-user-arrow {
        color: #111;
        display: inline-block;
    }

    .mt-user-avatar-wrap,
    .mt-user-avatar-wrap img,
    .mt-user-avatar {
        width: 42px !important;
        height: 42px !important;
        min-width: 42px;
    }

    .mt-user-dropdown {
        position: static;
        width: 100%;
        min-width: 0;
        margin-top: 0.75rem;
        background: #111;
        border-radius: 8px;
        transform: none;
    }

    .mt-user-menu.open .mt-user-dropdown {
        transform: none;
    }

    .mt-user-dropdown-link {
        color: #fff;
        background: #111;
        padding: 1rem;
    }
}

@media (max-width: 995px) {
    .mt-user-dropdown .mt-user-dropdown-link {
        color: #fff !important;
    }

    .mt-user-dropdown .mt-user-dropdown-link:hover {
        color: #fff !important;
    }
}