/* Favorites System Styles */

/* Favorites Button in Header */
#favoritesBtn {
    position: relative;
}

#favoritesBtn .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    height: 18px;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Favorite Toggle Button in Modals */
.favorite-toggle-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.favorite-toggle-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.favorite-toggle-btn svg {
    width: 20px;
    height: 20px;
}

.favorite-toggle-btn[data-favorited="true"] {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
}

/* Favorites Modal */
.favorites-modal .modal-content {
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.favorites-modal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.favorites-modal .modal-header h2 {
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Favorites Tabs */
.favorites-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.favorites-tabs .tab-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.favorites-tabs .tab-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.favorites-tabs .tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Tab Content */
.favorites-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.favorites-tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Favorites List */
.favorites-list {
    display: grid;
    gap: 15px;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 10px;
}

.favorites-list::-webkit-scrollbar {
    width: 8px;
}

.favorites-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
}

.favorites-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
}

/* Favorite Item */
.favorite-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    position: relative;
}

.favorite-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(102, 126, 234, 0.5);
    transform: translateX(5px);
}

.favorite-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.favorite-header h4 {
    margin: 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: 700;
    flex: 1;
}

.remove-favorite {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    opacity: 0.5;
    transition: all 0.3s ease;
    padding: 5px;
}

.remove-favorite:hover {
    opacity: 1;
    transform: scale(1.2);
}

.favorite-preview {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.favorite-note {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
    padding: 10px;
    border-radius: 6px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 12px;
}

.favorite-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
}

.favorite-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.5);
}

.empty-state p {
    margin: 10px 0;
    font-size: 16px;
}

.empty-state .hint {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.4);
}

/* Modal Footer */
.favorites-modal .modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    margin-top: 20px;
}

.favorites-modal .modal-footer .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
}

.favorites-modal .modal-footer .btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.favorites-modal .modal-footer .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.favorites-modal .modal-footer .btn-danger {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
}

.favorites-modal .modal-footer .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* Notification */
.notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 15px;
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .favorites-modal .modal-content {
        max-width: 95%;
        margin: 20px auto;
    }

    .favorites-tabs {
        flex-direction: column;
    }

    .favorites-tabs .tab-btn {
        width: 100%;
    }

    .favorites-modal .modal-footer {
        flex-direction: column;
    }

    .favorites-modal .modal-footer .btn {
        width: 100%;
    }

    .notification {
        left: 20px;
        right: 20px;
        bottom: 20px;
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    .favorite-item {
        background: rgba(255, 255, 255, 0.02);
    }

    .favorite-item:hover {
        background: rgba(255, 255, 255, 0.04);
    }
}
