/* ============================================
   REDDIT-STYLE LISTINGS
   ============================================ */

.reddit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Gap between cards */
}

.reddit-row {
    display: flex;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 4px;
    /* Classic Reddit radius */
    overflow: hidden;
    transition: border-color 0.2s;
    cursor: pointer;
}

.reddit-row:hover {
    border-color: var(--gray-400);
}

/* Vote Column */
.vote-col {
    width: 40px;
    padding: 8px 4px;
    background: var(--gray-50);
    /* Light gray background for vote strip */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    border-right: 1px solid var(--gray-100);
}

.vote-btn {
    background: none;
    border: none;
    color: var(--gray-400);
    /* Inactive gray */
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
    transition: all 0.2s;
    display: flex;
    justify-content: center;
    align-items: center;
}

.vote-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--gray-600);
}

.vote-btn.upvote:hover,
.vote-btn.upvote.active {
    color: #ff4500 !important;
    /* Reddit Orange */
}

.vote-btn.downvote:hover,
.vote-btn.downvote.active {
    color: #7193ff !important;
    /* Reddit Blue */
}

.vote-score {
    font-weight: 700;
    font-size: 12px;
    color: var(--gray-900);
}

.vote-score.positive {
    color: #ff4500 !important;
}

.vote-score.negative {
    color: #7193ff !important;
}

/* Content Area */
.reddit-content {
    flex: 1;
    padding: 8px 12px;
    /* Denser padding */
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Header: Badges & Meta */
.reddit-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: 12px;
    color: var(--gray-500);
    flex-wrap: wrap;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 9999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
}

.badge-primary {
    background: var(--gray-100);
    color: var(--gray-900);
}

.badge-city {
    background: transparent;
    color: var(--gray-500);
    padding: 0;
    font-weight: 400;
    text-transform: none;
}

.badge-city:hover {
    text-decoration: underline;
}

/* Title */
.reddit-title {
    font-size: 16px;
    /* Reddit title size */
    font-weight: 600;
    /* Regular weight, not too bold */
    margin: 0 0 4px 0;
    line-height: 1.4;
    color: #222;
}

.reddit-title a {
    color: inherit;
    text-decoration: none;
}

.reddit-title a:visited {
    color: #888;
    /* Visited link color */
}

/* Snippet / Description */
.reddit-snippet {
    color: var(--gray-600);
    /* Darker gray for text */
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 8px;
    font-family: var(--font-body);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    /* Show slightly more text */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer Actions */
.reddit-actions {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #878a8c;
    /* Reddit action gray */
    font-weight: 700;
    align-items: center;
    margin-top: auto;
    /* Push to bottom */
}

.reddit-action-item {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 2px;
    cursor: pointer;
    transition: background 0.2s;
}

.reddit-action-item:hover {
    background: rgba(0, 0, 0, 0.05);
}

/* Image Thumbnail on the Right */
.reddit-thumb {
    width: 140px;
    /* Slightly larger thumb */
    height: 100px;
    /* Fixed height */
    margin: 8px 8px 8px 0;
    /* Margin on all sides except left (content handles padding) */
    border-radius: 4px;
    overflow: hidden;
    background: var(--gray-100);
    flex-shrink: 0;
    border: 1px solid var(--gray-200);
}

.reddit-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.reddit-thumb .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-300);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .reddit-thumb {
        width: 80px;
        height: 60px;
        margin: 8px;
    }

    .vote-col {
        width: 32px;
        padding: 4px 2px;
    }

    .reddit-title {
        font-size: 15px;
    }

    .reddit-snippet {
        -webkit-line-clamp: 2;
        line-clamp: 2;
        font-size: 13px;
    }
}

/* Category Scroll Bar */
.category-scroll-container {
    overflow-x: auto;
    white-space: nowrap;
    padding: 8px 0;
    margin-bottom: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* Firefox */
    flex: 1;
    min-width: 0;
}

.category-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.category-pills {
    display: inline-flex;
    gap: 8px;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 16px;
    background: #f6f7f8;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: #1c1c1c;
    cursor: pointer;
    transition: all 0.2s;
    user-select: none;
}

.category-pill:hover {
    background: #e3e6e8;
}

.category-pill.active {
    background: #0079d3;
    color: white;
    border-color: #0079d3;
}

/* Sort Tab Polish */
.sort-tabs {
    background: var(--gray-100);
    padding: 4px;
    border-radius: 999px;
    display: flex;
    gap: 4px;
}

.sort-tab {
    padding: 6px 16px;
    border-radius: 999px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-500);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.sort-tab:hover:not(.active) {
    background: rgba(0, 0, 0, 0.05);
}

.sort-tab.active {
    background: white;
    color: var(--primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}