/* Кнопка сердечка в меню */
.mdigital-favorite-button {
    position: absolute;
    left: 7px;
    top: 50%;
    height: 25px;
    width: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    z-index: 9;
    transform: translateY(-50%);
}

.mdigital-favorite-button svg {
    fill: transparent;
    stroke: black;
    stroke-width: 1px;
}

.mdigital-favorite-button:hover svg {
    transform: scale(1.1);
}

.mdigital-favorite-button.favorited svg path {
    fill: #ff0000;
}

/* Сдвиг текста в меню */
._course_item_uh9hy_1 ._course_item_title_uh9hy_1 {
    white-space: normal;
    padding-left: 30px !important;
    display: inline-block;
    vertical-align: middle;
    font-size: 16px;
}

/* Кнопка-счетчик в шапке */
.favorite-counter-button {
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 16px;
    padding: 0 10px;
    transition: all 0.3s;
}

.favorite-counter-button svg {
    fill: #ff5d5d;
}

.favorite-counter-button:hover {
    background: rgba(24, 144, 255, .08);
}

/* Попап со списком избранного */
.favorites-list-popup {
    position: absolute;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    padding: 8px 12px;
    max-width: 320px;
    max-height: 500px;
    overflow-y: auto;
    z-index: 10000;
    display: none;
}

.favorites-list-popup a {
    display: block;
    margin-bottom: 6px;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorites-list-popup a:hover {
    text-decoration: underline;
}

.favorites-list-popup.show {
    display: block;
}

@media screen and (max-width: 480px) {
    .favorites-list-popup.show {
        max-width: 280px !important;
    }
}