

/* favorite-display.css */

/* Иконка избранного в меню */
.menu-item-favorites .notify-count.favorites-count {

    bottom: inherit;
    background: #EA9CAF !important;
    color: white;
}

.menu-item-favorites img {
    position: relative;
    top: 15px;
    width: 30px;
    height: 30px;
}

.menu-item-favorites .menu-item-label {
    display: none;
}

/* Подменю избранного */
.favorites-submenu {
    min-width: 320px;
}

.gc-account-user-submenu-bar.favorites-submenu .menu-item-training-header {
	margin-top: 20px;
}

.gc-account-user-submenu-bar.favorites-submenu .menu-item-training-header .subitem-link {
    font-weight: 500;
    background: #f5f5f5;
    cursor: default;
    pointer-events: none;
    padding-left: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gc-account-user-submenu-bar.favorites-submenu .menu-item-favorite-lesson .subitem-link {
    padding-left: 30px;
    position: relative;
    font-size: 13px;
}


.gc-account-user-submenu-bar.favorites-submenu .menu-item-training-header:hover::before {
    display: none !important;
}

.gc-account-user-submenu-bar.favorites-submenu .menu-item-training-header:hover a {
    padding-left: 20px !important;
    color: inherit !important;
    transform: none !important;
}

.gc-account-user-submenu-bar.favorites-submenu .menu-item-empty .subitem-link,
.gc-account-user-submenu-bar.favorites-submenu .menu-item-loading .subitem-link {
    color: #999;
    font-style: italic;
    cursor: default;
    pointer-events: none;
}

/* Кнопка удаления в подменю */
.menu-item-favorite-lesson {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.menu-item-favorite-lesson .lesson-link {
    flex: 1;
    padding-right: 30px;
}

.favorite-remove-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: none;
    background: none;
    color: #000;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10000;
}

.favorite-remove-btn:hover {
    background: #EA9CAF;
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.favorite-remove-btn.sending {
    opacity: 0.5;
    pointer-events: none;
}

.favorite-remove-btn.sending::after {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #EA9CAF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Блок #my-favorite */
#my-favorite {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin: 0 0 20px;
    background: white;
}

#my-favorite .favorites-block-header {
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 8px 8px 0 0;
}

#my-favorite .favorites-block-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

#my-favorite .favorites-block-empty {
    padding: 40px 20px;
    text-align: center;
    color: #999;
}

#my-favorite .favorites-block-empty p {
    margin: 0 0 10px 0;
    font-size: 16px;
}

#my-favorite .favorites-block-empty small {
    font-size: 14px;
    opacity: 0.8;
}

#my-favorite .favorites-training-group {
    border-bottom: 1px solid #eee;
}

#my-favorite .favorites-training-group:last-child {
    border-bottom: none;
}

#my-favorite .favorites-training-title {
    padding: 12px 20px;
    background: #fafafa;
    font-weight: bold;
    color: #666;
    border-left: 3px solid #EA9CAF
}

#my-favorite .favorites-training-count {
    color: #999;
    font-size: 12px;
    margin-left: 5px;
}

#my-favorite .favorites-lesson-link {
    display: flex;
    align-items: center;
    padding: 12px 20px 12px 25px;
    border-bottom: 1px solid #f0f0f0;
    text-decoration: none;
    color: #333;
    transition: background 0.2s;
    position: relative;
}

#my-favorite .favorites-lesson-link:hover {
    background: #f5f5f5;
}

#my-favorite .favorites-lesson-link:last-child {
    border-bottom: none;
}

#my-favorite .favorites-lesson-icon {
    position: absolute;
    left: 15px;
    color: #EA9CAF;
    font-size: 14px;
}

#my-favorite .favorites-lesson-name {
    flex: 1;
    font-size: 15px;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    #my-favorite .favorites-lesson-link {
        padding: 15px 20px 15px 40px;
    }
    
    #my-favorite .favorites-lesson-name {
        font-size: 14px;
    }
}

/* favorite-lessons.css */
.lesson-list li {
	position: relative;
}

.favorite-btn {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    display: inline-block;
    vertical-align: middle;
    outline: none;
    transition: transform 0.2s ease;
}

.favorite-btn:hover {
    transform: scale(1.1);
}

.favorite-btn:active {
    transform: scale(0.95);
}

.favorite-btn.active .favorite-icon {
    fill: #EA9CAF;
}

.favorite-icon {
    fill: #d1d1d1;
    transition: fill 0.2s ease;
}

/* Состояние отправки */
.favorite-btn.sending {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.favorite-btn.sending::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #EA9CAF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Скрытые iframe и формы */
.favorite-hidden-iframe {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
    left: -9999px !important;
    top: -9999px !important;
    visibility: hidden !important;
}

.favorite-hidden-form {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Уведомления */
.favorite-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 6px;
    z-index: 999997;
    font-size: 14px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: notifyIn 0.3s ease-out;
    max-width: 350px;
    font-family: Arial, sans-serif;
    color: white;
}

.favorite-notification-success {
    background: #4CAF50;
}

.favorite-notification-error {
    background: #f44336;
}

.favorite-notification-warning {
    background: #FF9800;
}

.favorite-notification-info {
    background: #2196F3;
}

/* Анимации */
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes notifyIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Дополнения для кнопок удаления */



/* Кнопка удаления в блоке #my-favorite */
.favorites-lesson-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-right: 40px;
}

.favorites-lesson-item .favorites-lesson-link {
    flex: 1;
}

.favorites-lesson-item .favorite-remove-btn {
    right: 15px;
}

/* Состояние загрузки */
.sending {
    opacity: 0.5;
    pointer-events: none;
}

/* Анимация удаления */
.fade-out {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}
