.mt-ds-lastmt-container-top {
    display: inline-block;
    position: relative;
    z-index: 99999990;
    vertical-align: top;
}
.mt-ds-lastmt-container-top.mt-ds-lastmt-container-top-z-hide {
    z-index: 1 !important;
}
.mt-ds-lastmt-container {
    /* padding: 2px 5px; */
    /* color: rgb(112 87 0) !important; */
    color: rgb(73, 73, 76) !important;
    font-weight: inherit;

    border-radius: 0.5em;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    position: relative;
    width: max-content;
}

.mt-ds-lastmt-container a {
    color: rgb(73, 73, 76) !important;
}
a:hover .mt-ds-lastmt-container,
.mt-ds-lastmt-container a:hover {
    /* background: rgb(213 197 143); */
    color: rgb(31 31 31) !important;
}

a.mt-ds-lastmt-container-item-a-fach {
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
}
a.mt-ds-lastmt-container-item-a-mttitle {
    flex: 1 1 auto;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

/* Colorful progress dot in front of the item title */
.mt-ds-lastmt-container-item-a-mttitle .mtf-ratedot {
    position: static !important;
    top: auto !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
    font-size: 0.5em;
}
.mt-ds-lastmt-container:not(.mt-ds-lastmt-container-first) {
}

.mt-ds-lastmt-container.mt-ds-lastmt-container-first {
    /* box-shadow: rgb(0 0 0 / 7%) 0 1px 8px; */

    background: hsl(0 0% 97% / 1);
    z-index: 99999991;
}
.mt-ds-lastmt-container.mt-ds-lastmt-container-first:hover {
    background: hsl(0 0% 99% / 1);
}
.mt-ds-lastmt-container-top:hover .mt-ds-lastmt-container.mt-ds-lastmt-container-first {
    /*box-shadow: rgb(0 0 0 / 7%) 0 1px 8px;*/
    box-shadow: rgb(0 0 0 / 6%) 0 2px 5px;
}

.mt-ds-lastmt-container.mt-lastfach {
    padding: 1px 5px;
}

.mt-ds-lastmt-item-after::after {
    content: "";
    position: absolute;
    bottom: 2px;
    left: 18px;
    height: 1.5px;
    width: 40%;
    background: #444;
    background: linear-gradient(45deg, rgb(71 126 160) 30%, rgb(22 88 135) 100%);
    opacity: 0;
}
.mt-ds-lastmt-item:not(.item-active):hover .mt-ds-lastmt-item-after::after {
    opacity: 0.5;
}
.item-active .mt-ds-lastmt-item-after::after {
    opacity: 1;
}

/* Dropdown items */
.mt-ds-lastmt-container-item {
    display: flex;
    align-items: center;
}

/* Keyframes for the fade-in and slide-down effect */
@keyframes fadeInDown {
    0% {
        opacity: 1;
        transform: translateY(-10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Dropdown container styling */
.mt-ds-lastmt-container-dropdown-container {
    position: absolute;
    top: 22px;
    display: none;
    opacity: 0;
    padding-top: 1px;
    z-index: 99999999;
}

.mt-ds-lastmt-container-dropdown-container-bg {
    /* Optional styling */

    border-radius: 8px;
    z-index: 1000; /* Ensure it's on top */

    /*
  background-color: white;
  box-shadow: var(--box-shadow-default); */
    display: flex;
    flex-direction: column;
    gap: 1px;
}

/* Show dropdown on hover */
.mt-ds-lastmt-container-top:hover .mt-ds-lastmt-container-dropdown-container {
    display: block;
    opacity: 1;
}

/* Dropdown items initial state */
.mt-ds-lastmt-container-dropdown-container .mt-ds-lastmt-container-item {
    opacity: 0;
    animation: fadeInDown 0.15s ease-in-out forwards;
    position: relative;
    transform: translateY(-10px);
    display: block;
}
.mt-ds-lastmt-container-item-name-container {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    /*max-width: 200px;*/
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
}
.mt-ds-lastmt-container-item-icon {
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
    flex: 0 0 auto;
    display: flex;
    height: 100%;
    left: 0;
    left: 0;
    align-items: flex-start;
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
    justify-content: left;

    position: relative;

    min-width: 60px;
}
.mt-ds-lastmt-container-item-icon-bg {
    display: flex;
    height: 100%;
    left: 0;
    align-items: center;
    border-top-left-radius: inherit;
    border-bottom-left-radius: inherit;
    justify-content: left;
}

.mt-ds-lastmt-container-item-icon:hover .mt-ds-lastmt-container-item-icon-bg {
    margin-right: 0px;
}
/*
.mt-ds-lastmt-container-item-icon .mt-ds-lastmt-container-item-icon-diag {
  display: inline-block;
  width: 0px;
}
.mt-ds-lastmt-container-item-icon:hover .mt-ds-lastmt-container-item-icon-diag { */
.mt-ds-lastmt-container-item-icon .mt-ds-lastmt-container-item-icon-diag {
    display: inline-block;
    width: 10px;
    height: 100%;

    -webkit-clip-path: polygon(0% 100%, 100% 0%, 0% 0%); /* Safari and older browsers */
    clip-path: polygon(0% 100%, 100% 0%, 0% 0%);
}

.mt-ds-lastmt-container-item-icon-img {
    vertical-align: top;
    display: flex;
    align-items: center;
    padding: 4px 3px;
}

.mt-ds-lastmt-container-item-icon-text-container {
    /* max-width: 0px; /* Start with zero width */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    transition: max-width 0.25s ease;
    font-size: 0.7em;
    line-height: 22px;
}

.mt-ds-lastmt-container-item-icon:hover .mt-ds-lastmt-container-item-icon-text-container {
    display: inline-block;
    width: 100%; /* Expands to full width on hover */
    max-width: 100%; /* Ensures the text can expand fully */
    overflow: visible; /* Allow text to show */
    text-overflow: clip; /* Remove ellipsis */
}
/*
.mt-ds-lastmt-container-item-icon-text {
  max-width: 1px; 
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
  transition: max-width 0.2s ease; 
}
*/
.mt-ds-lastmt-container-item-icon-text {
    display: none;
}
.mt-ds-lastmt-container-item-icon:hover .mt-ds-lastmt-container-item-icon-text {
    display: inline-block;
}

.mt-ds-lastmt-container-item-icon:hover .mt-ds-lastmt-container-item-icon-text-container {
    max-width: 200px; /* Set a max-width value for the expanded state */
    overflow: visible;
    text-overflow: clip; /* Remove the ellipsis when expanded */
}

.mt-ds-lastmt-container-item-icon-text-short {
    opacity: 1;
    min-width: 22px;
    display: inline-block;
    color: #7d7d7d;
}
.mt-ds-lastmt-container-item-icon:hover .mt-ds-lastmt-container-item-icon-text-short {
    position: absolute;
    opacity: 0;
}

.mt-ds-lastmt-container-item-text {
    flex: 0 1 auto; /* Allow shrinking but not growing */
    max-width: 100%; /* Set maximum width */
    min-width: 0; /* Allow ellipsis to work as a flex child */
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide overflowing text */
    text-overflow: ellipsis; /* Add ellipsis when text overflows */
    display: inline-block; /* Allow width restrictions */
    vertical-align: top;
    padding-left: 2px;
    padding-right: 8px;
    font-size: 0.9em;
}
.mt-ds-lastmt-container-dropdown-container .mt-ds-lastmt-container-item .hide {
    position: absolute;
}

/* Staggered animation delays */
.mt-ds-lastmt-container-dropdown-container .mt-ds-lastmt-container-item:nth-child(1) {
    animation-delay: 0s;
}

.mt-ds-lastmt-container-dropdown-container .mt-ds-lastmt-container-item:nth-child(2) {
    animation-delay: 0.03s;
}

.mt-ds-lastmt-container-dropdown-container .mt-ds-lastmt-container-item:nth-child(3) {
    animation-delay: 0.06s;
}

.mt-ds-lastmt-container-dropdown-container .mt-ds-lastmt-container-item:nth-child(4) {
    animation-delay: 0.09s;
}

/* Continue adding for additional items */

.mt-ds-lastmt-container img {
    width: 14px;
    height: auto;
    min-width: 14px;
}

/* Mobile: keep icon, title and colorful dot vertically centered on one line */
@media screen and (max-width: 900px) {
    .mt-ds-lastmt-container,
    .mt-ds-lastmt-container-item-name-container,
    a.mt-ds-lastmt-container-item-a-mttitle {
        align-items: center;
    }
    .mt-ds-lastmt-container-item-a-mttitle .mtf-ratedot {
        font-size: 0.6em;
    }
}
