/**
 * Likes Module - Styles
 * Beğeni sistemi stilleri
 * 
 * @package News_Theme
 * @since 1.0.0
 */

/* ======================
   Like Button
   ====================== */

.like-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    color: #666;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.like-button:hover {
    border-color: #e74c3c;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.05);
    transform: translateY(-2px);
}

.like-button .like-icon {
    width: 20px;
    height: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.like-button .like-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.like-button:hover .like-icon {
    transform: scale(1.15);
}

/* Liked State */
.like-button.is-liked {
    border-color: #e74c3c;
    background: #e74c3c;
    color: #fff;
}

.like-button.is-liked .like-icon {
    fill: currentColor;
    animation: heartBeat 0.5s ease;
}

.like-button.is-liked:hover {
    background: #c0392b;
    border-color: #c0392b;
}

/* Loading State */
.like-button.is-loading {
    pointer-events: none;
    opacity: 0.6;
}

.like-button.is-loading .like-icon {
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.25); }
    100% { transform: scale(1); }
}

/* Like Count */
.like-count {
    font-variant-numeric: tabular-nums;
    min-width: 20px;
    text-align: center;
}

/* ======================
   Button Styles
   ====================== */

/* Minimal Style */
.like-style-minimal {
    padding: 6px 12px;
    font-size: 13px;
}

.like-style-minimal .like-icon {
    width: 16px;
    height: 16px;
}

/* Icon Only Style */
.like-style-icon {
    padding: 0 !important;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    max-width: 40px !important;
    max-height: 40px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
}

.like-style-icon .like-icon {
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}

.like-style-icon .like-count {
    display: none !important;
}

/* ======================
   Post Likes Count Display
   ====================== */

.post-likes-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #e74c3c;
    font-weight: 500;
}

.post-likes-count svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* ======================
   Most Liked Posts Widget
   ====================== */

.most-liked-posts {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.liked-post-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.liked-post-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateX(4px);
}

.liked-post-thumb {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
}

.liked-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.liked-post-item:hover .liked-post-thumb img {
    transform: scale(1.1);
}

.liked-post-content {
    flex: 1;
    min-width: 0;
}

.liked-post-title {
    font-size: 14px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.liked-post-title a {
    color: #333;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.liked-post-title a:hover {
    color: #e74c3c;
}

.liked-post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    color: #999;
}

.no-liked-posts {
    padding: 20px;
    text-align: center;
    color: #999;
    background: #f8f9fa;
    border-radius: 8px;
}

/* ======================
   In Post Meta
   ====================== */

.post-meta .like-button,
.post-card-meta .like-button {
    padding: 6px 12px;
    font-size: 13px;
}

.post-meta .like-button .like-icon,
.post-card-meta .like-button .like-icon {
    width: 16px;
    height: 16px;
}

.post-meta .post-likes-count,
.post-card-meta .post-likes-count {
    font-size: 13px;
}

.post-meta .post-likes-count svg,
.post-card-meta .post-likes-count svg {
    width: 14px;
    height: 14px;
}

/* ======================
   Notification
   ====================== */

.like-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999999;
    opacity: 0;
    transform: translateX(100px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 300px;
}

.like-notification.show {
    opacity: 1;
    transform: translateX(0);
}

.like-notification-success {
    border-left: 4px solid #27ae60;
}

.like-notification-error {
    border-left: 4px solid #e74c3c;
}

/* ======================
   Dark Mode
   ====================== */

body.dark-mode .like-button {
    border-color: #4a5568;
    color: #e2e8f0;
}

body.dark-mode .like-button:hover {
    border-color: #fc8181;
    color: #fc8181;
    background: rgba(252, 129, 129, 0.1);
}

body.dark-mode .like-button.is-liked {
    background: #fc8181;
    border-color: #fc8181;
    color: #fff;
}

body.dark-mode .like-button.is-liked:hover {
    background: #f56565;
    border-color: #f56565;
}

body.dark-mode .post-likes-count {
    color: #fc8181;
}

body.dark-mode .liked-post-item {
    background: #2d3748;
    border-color: #4a5568;
}

body.dark-mode .liked-post-title a {
    color: #e2e8f0;
}

body.dark-mode .liked-post-title a:hover {
    color: #fc8181;
}

body.dark-mode .liked-post-meta {
    color: #a0aec0;
}

body.dark-mode .no-liked-posts {
    background: #2d3748;
    color: #a0aec0;
}

body.dark-mode .like-notification {
    background: #2d3748;
    color: #e2e8f0;
}

/* ======================
   Responsive
   ====================== */

@media (max-width: 768px) {
    .like-button {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .like-button .like-icon {
        width: 18px;
        height: 18px;
    }
    
    .like-style-icon {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        min-height: 36px !important;
        max-width: 36px !important;
        max-height: 36px !important;
        padding: 0 !important;
    }
    
    .like-style-icon .like-icon {
        width: 16px !important;
        height: 16px !important;
    }
    
    .liked-post-thumb {
        width: 60px;
        height: 60px;
    }
    
    .liked-post-title {
        font-size: 13px;
    }
    
    .like-notification {
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .like-button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .like-button .like-icon {
        width: 16px;
        height: 16px;
    }
    
    .like-style-icon {
        width: 32px !important;
        height: 32px !important;
        min-width: 32px !important;
        min-height: 32px !important;
        max-width: 32px !important;
        max-height: 32px !important;
        padding: 0 !important;
    }
    
    .like-style-icon .like-icon {
        width: 14px !important;
        height: 14px !important;
    }
    
    .liked-post-thumb {
        width: 50px;
        height: 50px;
    }
}

/* ======================
   Animation Effects
   ====================== */

@keyframes likeAdded {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1);
    }
}

.like-button.just-liked {
    animation: likeAdded 0.5s ease;
}

/* Floating hearts effect (optional) */
@keyframes floatHeart {
    0% {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(0);
        opacity: 0;
    }
}

.floating-heart {
    position: absolute;
    font-size: 20px;
    color: #e74c3c;
    animation: floatHeart 1s ease-out;
    pointer-events: none;
}