/**
 * Favorites System Styles for Kora24 Theme
 * 
 * @package Kora24
 * @version 1.0.0
 */

/* ==========================================================================
   Favorite Button Styles
   ========================================================================== */

.favorite-btn {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.3s ease;
    color: #666;
    font-size: 18px;
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.favorite-btn:hover {
    background-color: rgba(255, 87, 34, 0.1);
    color: #FF5722;
    transform: scale(1.1);
}

.favorite-btn.active {
    color: #FF5722;
}

.favorite-btn.active:hover {
    color: #E64A19;
}

.favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.favorite-btn.login-required {
    opacity: 0.5;
    cursor: help;
}

.favorite-btn i {
    transition: all 0.3s ease;
}

.favorite-btn:hover i {
    transform: scale(1.2);
}

/* Favorite button in different contexts */
.match-card .favorite-btn,
.video-card .favorite-btn,
.news-card .favorite-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.match-card .favorite-btn:hover,
.video-card .favorite-btn:hover,
.news-card .favorite-btn:hover {
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ==========================================================================
   Favorites Container
   ========================================================================== */

.kora24-favorites-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin: 20px 0;
}

.favorites-header {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    padding: 20px;
    text-align: center;
}

.favorites-header h3 {
    margin: 0 0 15px 0;
    font-size: 24px;
    font-weight: 600;
}

.favorites-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
}

.filter-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: white;
    color: var(--primary-green);
    font-weight: 600;
}

/* Filter Buttons Container */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 2rem;
}

.filter-buttons .filter-btn {
    background: #fff;
    border: 2px solid #e0e0e0;
    color: #666;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-buttons .filter-btn:hover {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    transform: translateY(-2px);
}

.filter-buttons .filter-btn.active {
    background: var(--primary-green);
    border-color: var(--primary-green);
    color: white;
    font-weight: 600;
}

.filter-buttons .filter-btn i {
    font-size: 12px;
}

/* ==========================================================================
   Favorites Content
   ========================================================================== */

.favorites-content {
    padding: 20px;
}

.favorites-loading {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.favorites-loading i {
    margin-left: 10px;
    color: var(--primary-green);
}

.no-favorites {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.no-favorites p {
    font-size: 18px;
    margin: 0;
}

/* ==========================================================================
   Favorite Items
   ========================================================================== */

.favorites-list {
    display: grid;
    gap: 20px;
}

.favorite-item {
    display: flex;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.favorite-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary-green);
}

.favorite-thumbnail {
    width: 120px;
    height: 90px;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.favorite-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.favorite-item:hover .favorite-thumbnail img {
    transform: scale(1.05);
}

.favorite-thumbnail.default {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 24px;
}

.favorite-content {
    flex: 1;
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.favorite-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
}

.favorite-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.favorite-content h4 a:hover {
    color: var(--primary-green);
}

.favorite-content p {
    margin: 4px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.favorite-date {
    font-size: 12px !important;
    color: #999 !important;
    margin-top: 8px !important;
}

/* Type-specific content styles */
.match-info {
    font-weight: 600;
    color: var(--primary-green);
}

.match-score {
    font-weight: 700;
    color: #FF5722;
    font-size: 16px !important;
}

.video-info {
    color: #2196F3;
}

.stream-status {
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px !important;
    display: inline-block;
}

.stream-status.status-live {
    background: #4CAF50;
    color: white;
}

.stream-status.status-upcoming {
    background: #FF9800;
    color: white;
}

.stream-status.status-ended {
    background: #9E9E9E;
    color: white;
}

/* ==========================================================================
   Favorite Actions
   ========================================================================== */

.favorite-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    border-right: 1px solid #eee;
    background: #fafafa;
    align-items: center;
    justify-content: center;
    min-width: 60px;
}

.view-btn,
.remove-favorite-btn {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 14px;
    text-decoration: none;
}

.view-btn {
    background: var(--primary-green);
    color: white;
}

.view-btn:hover {
    background: var(--dark-green);
    transform: scale(1.1);
    color: white;
}

.remove-favorite-btn {
    background: #f44336;
    color: white;
}

.remove-favorite-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.remove-favorite-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.favorites-pagination {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.page-btn {
    background: #fff;
    border: 1px solid #ddd;
    color: #666;
    padding: 8px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-btn:hover {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

.page-btn.active {
    background: var(--primary-green);
    color: white;
    border-color: var(--primary-green);
    font-weight: 600;
}

.page-btn.prev-btn,
.page-btn.next-btn {
    padding: 8px 16px;
    font-weight: 500;
}

.pagination-dots {
    color: #999;
    padding: 0 8px;
    font-weight: 600;
}

/* ==========================================================================
   Messages
   ========================================================================== */

.favorites-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 14px;
    font-weight: 500;
    animation: slideInDown 0.3s ease;
}

.favorites-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.favorites-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.favorites-message.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.favorites-message.info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.close-message {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
    opacity: 0.7;
    transition: opacity 0.3s ease;
    padding: 0;
    margin-right: 10px;
}

.close-message:hover {
    opacity: 1;
}

/* ==========================================================================
   Favorites Count Display
   ========================================================================== */

.favorites-count {
    background: #FF5722;
    color: white;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    margin-right: 5px;
    display: inline-block;
    min-width: 18px;
    text-align: center;
}

.favorites-count:empty {
    display: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media (max-width: 768px) {
    .favorites-filters {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .favorite-item {
        flex-direction: column;
    }
    
    .favorite-thumbnail {
        width: 100%;
        height: 150px;
    }
    
    .favorite-actions {
        flex-direction: row;
        border-right: none;
        border-top: 1px solid #eee;
        padding: 10px 15px;
        justify-content: center;
        min-width: auto;
    }
    
    .pagination-wrapper {
        gap: 4px;
    }
    
    .page-btn {
        padding: 6px 10px;
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .page-btn.prev-btn,
    .page-btn.next-btn {
        padding: 6px 12px;
    }
}

@media (max-width: 480px) {
    .favorites-header {
        padding: 15px;
    }
    
    .favorites-header h3 {
        font-size: 20px;
    }
    
    .favorites-content {
        padding: 15px;
    }
    
    .favorite-content {
        padding: 12px;
    }
    
    .favorite-content h4 {
        font-size: 15px;
    }
    
    .favorite-content p {
        font-size: 13px;
    }
}

/* ==========================================================================
   Animations
   ========================================================================== */

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.favorite-item {
    animation: fadeIn 0.3s ease;
}

/* ==========================================================================
   Dark Mode Support
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    .kora24-favorites-container {
        background: #1e1e1e;
        color: #fff;
    }
    
    .favorite-item {
        background: #2d2d2d;
        border-color: #444;
    }
    
    .favorite-item:hover {
        border-color: var(--primary-green);
    }
    
    .favorite-content h4 a {
        color: #fff;
    }
    
    .favorite-content p {
        color: #ccc;
    }
    
    .favorite-actions {
        background: #333;
        border-color: #444;
    }
    
    .page-btn {
        background: #2d2d2d;
        border-color: #444;
        color: #ccc;
    }
    
    .favorites-message.success {
        background: #1b4332;
        color: #d1e7dd;
        border-color: #2d5a3d;
    }
    
    .favorites-message.error {
        background: #4a1e1e;
        color: #f8d7da;
        border-color: #5a2d2d;
    }
    
    .favorites-message.warning {
        background: #4a3c1e;
        color: #fff3cd;
        border-color: #5a4a2d;
    }
    
    .favorites-message.info {
        background: #1e3a4a;
        color: #d1ecf1;
        border-color: #2d4a5a;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .favorite-btn,
    .favorite-actions,
    .favorites-pagination,
    .favorites-filters {
        display: none !important;
    }
    
    .favorite-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .favorites-header {
        background: none !important;
        color: #000 !important;
    }
}
