/* Claims List Page Styles */

.claims-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Search Bar */
.search-bar {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border: 1px solid #ddd;
}

.search-form .search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-input-wrapper {
    flex: 1 1 auto;
    min-width: 0; /* Critical: allows flex item to shrink below content size */
}

.filter-controls {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.search-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* Form inputs */
#search-input {
    width: 100%;
    height: 36px;
    padding: 6px 10px;
    border: 1px solid #ccc;
    font-size: 13px;
}

.search-form select {
    height: 36px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    font-size: 13px;
    min-width: 100px;
    max-width: 140px;
}

.search-form button,
.search-form .btn {
    height: 36px;
    padding: 6px 12px;
    white-space: nowrap;
}

.search-form .btn-primary:hover {
    background-color: var(--primary-color);
    opacity: 0.85;
}

/* Content Grid */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

/* Claims Header */
.claims-header {
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
    text-align: center;
}

.claims-header .btn {
    width: 100%;
}

/* Claims List Container with Background */
#claims-results {
    background: white;
    border: 1px solid #ddd;
    padding: 12px 15px;
}

/* Claim Items - Hacker News Style */
.claim-item {
    display: flex;
    gap: 12px;
    padding: 6px 0;
    background: transparent;
    border: none;
    margin-bottom: 0;
    border-bottom: 1px solid #f0f0f0;
}

.claim-item:last-child {
    border-bottom: none;
}

.claim-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 40px;
    padding-top: 2px;
}

.claim-content {
    flex: 1;
    min-width: 0;
}

.claim-title {
    font-size: 12px;
    font-weight: normal;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.claim-title a {
    color: #000;
    text-decoration: none;
}

.claim-title a:hover {
    text-decoration: underline;
}

.claim-meta {
    font-size: 11px;
    color: #828282;
    margin-bottom: 6px;
}

.claim-meta span {
    margin-right: 10px;
}

.claim-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 4px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
}

.page-link {
    color: #0066cc;
    text-decoration: none;
}

.page-link:hover {
    text-decoration: underline;
}

.page-current {
    color: #666;
}

/* Sidebar */
.sidebar-section {
    background: white;
    border: 1px solid #ddd;
    padding: 15px;
    margin-bottom: 20px;
}

.sidebar-section h3 {
    font-size: 14px;
    margin: 0 0 10px 0;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

/* Active Filter Banner */
.active-filter-banner {
    background: #f0f8ff;
    border: 1px solid #4a90e2;
    border-radius: 4px;
    padding: 10px 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.active-filter-banner strong {
    color: #4a90e2;
}

.clear-filter {
    color: #666;
    text-decoration: none;
    font-size: 12px;
}

.clear-filter:hover {
    text-decoration: underline;
}

/* Search Results Info */
.search-results-info {
    padding: 8px 0;
    margin-bottom: 12px;
    font-size: 12px;
    color: #666;
}

.search-results-info strong {
    color: #000;
}

.clear-search {
    margin-left: 10px;
    color: #0066cc;
    text-decoration: none;
    font-size: 12px;
}

.clear-search:hover {
    text-decoration: underline;
}

/* Tablet Layout (768px - 1024px) */
@media (max-width: 1024px) {
    .content-grid {
        grid-template-columns: 1fr;
    }
    
    .claims-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
}

/* Mobile Layout (< 768px) */
@media (max-width: 767px) {
    .claims-container {
        padding: 0 10px;
    }
    
    .search-bar {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    /* Search form mobile layout */
    .search-form .search-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .filter-controls {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        width: 100%;
    }
    
    .search-form select {
        width: 100%;
        min-width: 0;
        max-width: none;
    }
    
    .search-actions {
        display: flex;
        gap: 8px;
        width: 100%;
    }
    
    .search-actions button,
    .search-actions .btn {
        flex: 1;
    }
    
    /* Content adjustments */
    .content-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .claims-sidebar {
        display: block;
    }
    
    .claim-item {
        padding: 8px 0;
        gap: 10px;
    }
    
    .claim-title {
        font-size: 12px;
    }
    
    .claim-meta {
        font-size: 10px;
    }
    
    .claim-meta span {
        display: inline-block;
        margin-right: 8px;
        margin-bottom: 2px;
    }
}

/* Small Mobile (< 375px) */
@media (max-width: 374px) {
    .filter-controls {
        grid-template-columns: 1fr;
    }
    
    .search-actions {
        flex-direction: column;
    }
    
    .search-actions button,
    .search-actions .btn {
        width: 100%;
    }
    
    .claim-vote {
        min-width: 32px;
    }
    
    .claim-item {
        padding: 8px 0;
        gap: 8px;
    }
}

.claim-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.claim-meta {
    font-size: 11px;
    color: #828282;
    margin-bottom: 0;  /* Remove bottom margin */
}

.claim-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 0;  /* Remove top margin */
}

/* Sorting Links - Hacker News style */
.sort-links {
    padding: 8px 10px;
    border-bottom: 1px solid #e6e6e6;
    font-size: 12px;
    color: #828282;
}

.sort-label {
    color: #828282;
    margin-right: 4px;
}

.sort-link {
    color: #828282;
    text-decoration: none;
}

.sort-link:hover {
    text-decoration: underline;
}

.sort-link.active {
    color: #000;
    font-weight: 500;
}

.sort-sep {
    color: #d0d0d0;
    margin: 0 6px;
}