/* RunLabs Crypto News - Public Styles */

/* ====================
   MODE LISTE (Cards)
   ==================== */

.rcn-news-list {
    max-width: 1200px;
    margin: 0 auto;
}

.rcn-no-news {
    text-align: center;
    padding: 40px;
    background: #f9f9f9;
    border-radius: 8px;
    color: #666;
}

.rcn-news-item {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: row;
}

.rcn-news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
}

.rcn-news-image {
    width: 280px;
    flex-shrink: 0;
    overflow: hidden;
}

.rcn-news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rcn-news-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.rcn-news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin-bottom: 12px;
    font-size: 13px;
}

.rcn-news-source {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 11px;
}

.rcn-source-benzinga {
    background: #ff6b35;
    color: #fff;
}

.rcn-source-cryptonewsapi {
    background: #4ecdc4;
    color: #fff;
}

.rcn-source-cryptopanic {
    background: #f7931a;
    color: #fff;
}

.rcn-source-cryptocompare {
    background: #6c5ce7;
    color: #fff;
}

.rcn-source-coindesk {
    background: #ff6b35;
    color: #fff;
}

.rcn-source-cointelegraph {
    background: #00d4aa;
    color: #fff;
}

.rcn-source-decrypt {
    background: #6c5ce7;
    color: #fff;
}

.rcn-news-coins {
    color: #f7931a;
    font-weight: 600;
}

.rcn-news-sentiment {
    font-size: 18px;
}

.rcn-news-time {
    color: #999;
    font-size: 12px;
}

.rcn-news-title {
    margin: 0 0 12px;
    font-size: 22px;
    line-height: 1.3;
}

.rcn-news-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.2s;
}

.rcn-news-title a:hover {
    color: #2271b1;
}

.rcn-news-excerpt {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
    flex: 1;
}

.rcn-news-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
}

.rcn-news-author {
    color: #666;
}

.rcn-read-more {
    color: #2271b1;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.rcn-read-more:hover {
    color: #135e96;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rcn-news-item {
        flex-direction: column;
    }
    
    .rcn-news-image {
        width: 100%;
        height: 200px;
    }
    
    .rcn-news-title {
        font-size: 18px;
    }
    
    .rcn-news-footer {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .rcn-news-item {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .rcn-news-title a {
        color: #e0e0e0;
    }
    
    .rcn-news-title a:hover {
        color: #72aee6;
    }
    
    .rcn-news-excerpt {
        color: #b0b0b0;
    }
    
    .rcn-news-footer {
        border-top-color: #333;
    }
    
    .rcn-read-more {
        color: #72aee6;
    }
    
    .rcn-read-more:hover {
        color: #4f94d4;
    }
}

/* ====================
   MODE TABLEAU (v1.0.4)
   ==================== */

.rcn-news-wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    overflow-x: auto;
}

/* Filtres Front-End */
.rcn-news-filters {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rcn-filter-container {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.rcn-filter-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rcn-filter-item label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.rcn-filter-icon {
    font-size: 18px;
}

.rcn-frontend-filter {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 180px;
    background: #fff;
}

.rcn-reset-btn {
    padding: 8px 16px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    transition: background 0.2s;
}

.rcn-reset-btn:hover {
    background: #135e96;
}

.rcn-filter-results {
    margin-top: 10px;
    font-size: 13px;
    color: #666;
}

/* Tableau de News */
.rcn-news-table-container {
    background: #fff;
    border-radius: 8px;
    overflow-x: auto;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.rcn-news-table {
    width: 100%;
    min-width: 1400px;
    border-collapse: collapse;
    table-layout: fixed;
}

.rcn-news-table thead {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.rcn-news-table thead th {
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    border-bottom: 2px solid #fff;
    white-space: nowrap;
}

.rcn-news-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s;
}

.rcn-news-table tbody tr:hover {
    background: #f9f9f9;
}

.rcn-news-table tbody tr:last-child {
    border-bottom: none;
}

.rcn-news-table tbody td {
    padding: 12px 8px;
    vertical-align: top;
    font-size: 12px;
}

/* Colonnes - largeurs fixes */
.rcn-col-title {
    width: 40%;
    min-width: 320px;
}

.rcn-col-source {
    width: 9%;
    min-width: 100px;
    text-align: center;
}

.rcn-col-sentiment,
.rcn-col-sentiment-nlp,
.rcn-col-sentiment-google,
.rcn-col-sentiment-openai {
    width: 4%;
    min-width: 38px;
    text-align: center;
}

.rcn-col-coins,
.rcn-col-coins-nlp,
.rcn-col-coins-google,
.rcn-col-coins-openai {
    width: 5%;
    min-width: 45px;
    max-width: 55px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.rcn-col-time {
    width: 4%;
    min-width: 45px;
    text-align: right;
}

/* Titre avec image */
.rcn-title-wrapper {
    display: flex;
    gap: 12px;
}

.rcn-title-image {
    flex-shrink: 0;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    overflow: hidden;
}

.rcn-title-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rcn-title-content {
    flex: 1;
}

.rcn-title {
    margin: 0 0 8px 0;
    font-size: 16px;
    line-height: 1.4;
}

.rcn-title a {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.rcn-title a:hover {
    color: #2271b1;
}

.rcn-excerpt {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 8px;
}

.rcn-author {
    font-size: 12px;
    color: #999;
}

/* Badges */
.rcn-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    white-space: nowrap;
}

.rcn-badge-benzinga {
    background: #ff6b35;
    color: #fff;
}

.rcn-badge-cryptonewsapi {
    background: #4ecdc4;
    color: #fff;
}

.rcn-badge-cryptopanic {
    background: #f7931a;
    color: #fff;
}

.rcn-badge-cryptocompare {
    background: #6c5ce7;
    color: #fff;
}

.rcn-badge-coindesk {
    background: #ff6b35;
    color: #fff;
}

.rcn-badge-cointelegraph {
    background: #00d4aa;
    color: #fff;
}

.rcn-badge-decrypt {
    background: #6c5ce7;
    color: #fff;
}

/* Sentiment Badge */
.rcn-sentiment-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.rcn-sentiment-positive {
    background: #d4edda;
    color: #155724;
}

.rcn-sentiment-negative {
    background: #f8d7da;
    color: #721c24;
}

.rcn-sentiment-neutral {
    background: #e2e3e5;
    color: #383d41;
}

/* Coins */
.rcn-coins-list {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}

.rcn-coin-tag {
    display: inline-block;
    padding: 2px 5px;
    background: #f7931a;
    color: #fff;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
}

.rcn-coin-more {
    display: inline-block;
    padding: 2px 5px;
    background: #e0e0e0;
    color: #666;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 700;
}

.rcn-coin-link {
    display: block;
    padding: 1px 3px;
    background: #f7931a;
    color: #fff !important;
    border-radius: 2px;
    font-size: 8px;
    font-weight: 700;
    text-decoration: none;
    margin-bottom: 2px;
    white-space: nowrap;
    transition: background 0.2s;
    text-align: center;
}

.rcn-coin-link:hover {
    background: #e8850f;
    color: #fff !important;
}

.rcn-coin-more {
    display: block;
    padding: 1px 3px;
    background: #e0e0e0;
    color: #666;
    border-radius: 2px;
    font-size: 8px;
    font-weight: 700;
    cursor: help;
    text-align: center;
}

.rcn-no-coins {
    color: #999;
    font-size: 9px;
}

.rcn-empty,
.rcn-sentiment-empty {
    color: #ccc;
    font-size: 9px;
}

/* Time compact */
.rcn-time-ago {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.rcn-time-label {
    display: none;
}

/* Time */
.rcn-time-ago {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.rcn-time-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 1024px) {
    .rcn-col-title {
        width: 50%;
    }
    
    .rcn-col-source,
    .rcn-col-sentiment {
        width: 15%;
    }
    
    .rcn-col-coins {
        width: 20%;
    }
    
    .rcn-title-image {
        width: 60px;
        height: 60px;
    }
    
    .rcn-title {
        font-size: 14px;
    }
    
    .rcn-excerpt {
        display: none;
    }
}

@media (max-width: 768px) {
    .rcn-filter-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rcn-filter-item {
        flex-direction: column;
        align-items: stretch;
    }
    
    .rcn-frontend-filter {
        width: 100%;
    }
    
    .rcn-news-table-container {
        overflow-x: auto;
    }
    
    .rcn-news-table {
        min-width: 700px;
    }
    
    .rcn-title-wrapper {
        flex-direction: column;
    }
    
    .rcn-title-image {
        width: 100%;
        height: 150px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .rcn-news-filters,
    .rcn-news-table-container {
        background: #1a1a1a;
    }
    
    .rcn-news-table tbody tr {
        border-color: #333;
    }
    
    .rcn-news-table tbody tr:hover {
        background: #222;
    }
    
    .rcn-title a {
        color: #e0e0e0;
    }
    
    .rcn-title a:hover {
        color: #72aee6;
    }
    
    .rcn-excerpt {
        color: #b0b0b0;
    }
    
    .rcn-frontend-filter {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .rcn-filter-item label {
        color: #e0e0e0;
    }
}

/* ====================
   PAGINATION (v1.1.5)
   ==================== */

.rcn-pagination-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #fff;
    border-top: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.rcn-pagination-info {
    font-size: 13px;
    color: #666;
}

.rcn-pagination-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.rcn-per-page {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #666;
}

.rcn-per-page select {
    padding: 5px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
}

.rcn-pagination-nav {
    display: flex;
    align-items: center;
    gap: 5px;
}

.rcn-page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    color: #333;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.rcn-page-btn:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.rcn-page-btn.active {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.rcn-page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.rcn-page-ellipsis {
    padding: 0 5px;
    color: #999;
}

/* Dark mode pagination */
@media (prefers-color-scheme: dark) {
    .rcn-pagination-wrapper {
        background: #1a1a1a;
        border-color: #333;
    }
    
    .rcn-pagination-info,
    .rcn-per-page {
        color: #b0b0b0;
    }
    
    .rcn-per-page select {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .rcn-page-btn {
        background: #2a2a2a;
        border-color: #444;
        color: #e0e0e0;
    }
    
    .rcn-page-btn:hover {
        background: #3a3a3a;
    }
    
    .rcn-page-btn.active {
        background: #2271b1;
        border-color: #2271b1;
    }
}
