/**
 * Taste Top Posts Front-end Styles
 */

/* Grid layout for cards (4 column horizontal layout matching screenshot) */
.taste-top-posts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 0;
    padding: 0;
}

/* Tablet layout - 2 columns */
@media (max-width: 1024px) {
    .taste-top-posts-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 18px;
    }
}

/* Mobile layout - 1 column */
@media (max-width: 640px) {
    .taste-top-posts-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Very small mobile screens */
@media (max-width: 480px) {
    .taste-top-posts-grid {
        gap: 12px;
    }
}

/* Individual card styling */
.taste-top-post-card {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
}

.taste-top-post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

/* Image container */
.taste-top-post-image-container {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.taste-top-post-image-link {
    display: block;
    width: 100%;
    height: 100%;
}

.taste-top-post-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.taste-top-post-card:hover .taste-top-post-image {
    transform: scale(1.05);
}

.taste-top-post-image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 14px;
}

/* Category badge */
.taste-top-post-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
    backdrop-filter: blur(4px);
    z-index: 2;
}

/* Heart/favorite button */
.taste-top-post-favorite {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
}

.taste-top-post-heart {
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
    color: #666;
}

.taste-top-post-heart:hover {
    background: rgba(255, 255, 255, 1);
    color: #e74c3c;
    transform: scale(1.1);
}

.taste-top-post-heart.favorited {
    color: #e74c3c;
}

.taste-top-post-heart svg {
    width: 18px;
    height: 18px;
}

/* Content area */
.taste-top-post-content {
    padding: 16px;
}

/* Time indicator */
.taste-top-post-time {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
    font-size: 13px;
    margin-bottom: 4px;
}

.taste-top-post-time svg {
    width: 14px;
    height: 14px;
    opacity: 0.8;
}

/* Views counter */
.taste-top-post-views {
    color: #999;
    font-size: 12px;
    margin-top: 4px;
}

/* Title styling */
.taste-top-posts-title {
    margin: 0 0 24px 0;
    padding: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #BBD00F;
    padding-bottom: 8px;
}

/* Container */
.taste-top-posts {
    margin-bottom: 40px;
}

/* Legacy list styles for backward compatibility */
.taste-top-posts-list,
.taste-top-posts-widget-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.taste-top-post-item,
.taste-top-posts-widget-item {
    margin-bottom: 15px;
    overflow: hidden;
    display: flex;
    align-items: flex-start;
}

.taste-top-post-thumbnail,
.taste-top-posts-widget-thumbnail {
    flex: 0 0 80px;
    margin-right: 10px;
}

.taste-top-post-thumbnail img,
.taste-top-posts-widget-thumbnail img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Widget container overrides - reset any theme widget styles */
.widget_taste_top_posts,
.widget.widget_taste_top_posts,
#sidebar .widget_taste_top_posts {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    margin-bottom: 20px !important;
    padding: 0 !important;
}

.widget_taste_top_posts ul,
.widget.widget_taste_top_posts ul,
#sidebar .widget_taste_top_posts ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.widget_taste_top_posts li,
.widget.widget_taste_top_posts li,
#sidebar .widget_taste_top_posts li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: none !important;
    border: none !important;
    text-indent: 0 !important;
    position: relative !important;
}

/* Widget specific styles - using more specific selectors to prevent site override */
.widget_taste_top_posts .taste-top-posts-widget-list,
.widget.widget_taste_top_posts .taste-top-posts-widget-list,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-list {
    margin-bottom: 0 !important;
    list-style: none !important;
    padding: 0 !important;
}

.widget_taste_top_posts .taste-top-posts-widget-item,
.widget.widget_taste_top_posts .taste-top-posts-widget-item,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-item {
    margin-bottom: 12px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid #eee !important;
    list-style: none !important;
    display: flex !important;
    align-items: flex-start !important;
}

.widget_taste_top_posts .taste-top-posts-widget-item:last-child,
.widget.widget_taste_top_posts .taste-top-posts-widget-item:last-child,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-item:last-child {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
}

.widget_taste_top_posts .taste-top-posts-widget-thumbnail,
.widget.widget_taste_top_posts .taste-top-posts-widget-thumbnail,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-thumbnail {
    flex: 0 0 60px !important;
    margin-right: 10px !important;
}

.widget_taste_top_posts .taste-top-posts-widget-title,
.widget.widget_taste_top_posts .taste-top-posts-widget-title,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-title {
    font-size: 14px !important;
    line-height: 1.3 !important;
    margin-bottom: 4px !important;
    font-weight: 600 !important;
}

.widget_taste_top_posts .taste-top-posts-widget-title a,
.widget.widget_taste_top_posts .taste-top-posts-widget-title a,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-title a {
    color: #333 !important;
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.widget_taste_top_posts .taste-top-posts-widget-title a:hover,
.widget.widget_taste_top_posts .taste-top-posts-widget-title a:hover,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-title a:hover {
    color: #BBD00F !important;
}

.widget_taste_top_posts .taste-top-posts-widget-views,
.widget.widget_taste_top_posts .taste-top-posts-widget-views,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-views {
    font-size: 11px !important;
    color: #999 !important;
}

.widget_taste_top_posts .taste-top-posts-widget-content,
.widget.widget_taste_top_posts .taste-top-posts-widget-content,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-content {
    flex: 1 !important;
}

.widget_taste_top_posts .taste-top-posts-widget-category,
.widget.widget_taste_top_posts .taste-top-posts-widget-category,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-category {
    font-size: 10px !important;
    color: #666 !important;
    text-transform: uppercase !important;
    margin-bottom: 4px !important;
    font-weight: 600 !important;
}

.widget_taste_top_posts .taste-top-posts-widget-time,
.widget.widget_taste_top_posts .taste-top-posts-widget-time,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-time {
    display: flex !important;
    align-items: center !important;
    gap: 3px !important;
    color: #666 !important;
    font-size: 11px !important;
    margin-top: 4px !important;
}

.widget_taste_top_posts .taste-top-posts-widget-time svg,
.widget.widget_taste_top_posts .taste-top-posts-widget-time svg,
#sidebar .widget_taste_top_posts .taste-top-posts-widget-time svg {
    width: 10px !important;
    height: 10px !important;
    opacity: 0.8 !important;
}
