/* SimpleStats — theme-independent styles */

.simple-stats-widget {
    margin-bottom: 24px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

.simple-stats-tabs {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.simple-stats-indicator {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #2563eb;
    transition: left 0.25s ease, width 0.25s ease;
}

.simple-stats-tab {
    appearance: none;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    font-family: inherit;
    transition: color 0.15s;
}

.simple-stats-tab:hover,
.simple-stats-tab.active {
    color: #2563eb;
}

.simple-stats-content {
    padding: 0;
}

.simple-stats-tab-content {
    display: block;
}

.simple-stats-tab-content.hidden {
    display: none;
}

.simple-stats-loading {
    text-align: center;
    padding: 32px 16px;
    color: #64748b;
}

.simple-stats-loading i {
    font-size: 24px;
    display: block;
    margin-bottom: 8px;
}

.simple-stats-empty {
    text-align: center;
    padding: 32px 16px;
    color: #64748b;
}

.simple-stats-table {
    overflow: hidden;
}

.simple-stats-table-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #475569;
}

.simple-stats-table-head .ss-col-topic { flex: 1; min-width: 0; }
.simple-stats-table-head .ss-col-stats { width: 128px; text-align: center; }
.simple-stats-table-head .ss-col-author { width: 96px; text-align: right; }
.simple-stats-table-head .ss-col-category { width: 128px; text-align: right; }

.simple-stats-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    transition: background 0.12s;
}

.simple-stats-row:last-child {
    border-bottom: none;
}

.simple-stats-row:hover {
    background: #f8fafc;
}

.simple-stats-row .ss-col-topic {
    flex: 1;
    min-width: 0;
}

.simple-stats-row .ss-col-topic a {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
}

.simple-stats-row .ss-col-topic a:hover {
    color: #2563eb;
}

.simple-stats-row .ss-col-stats {
    display: none;
    width: 128px;
    font-size: 12px;
    color: #64748b;
    text-align: center;
}

.simple-stats-row .ss-col-author {
    display: none;
    width: 96px;
    font-size: 12px;
    text-align: right;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.simple-stats-row .ss-col-category {
    display: none;
    width: 128px;
    font-size: 12px;
    text-align: right;
    color: #64748b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (min-width: 768px) {
    .simple-stats-row .ss-col-stats,
    .simple-stats-row .ss-col-author,
    .simple-stats-row .ss-col-category,
    .simple-stats-table-head .ss-col-stats,
    .simple-stats-table-head .ss-col-author,
    .simple-stats-table-head .ss-col-category {
        display: block;
    }

    .simple-stats-row .ss-col-stats {
        display: flex;
        gap: 12px;
        justify-content: center;
    }
}

.simple-stats-stat {
    text-align: center;
}

.simple-stats-stat strong {
    display: block;
    font-size: 14px;
    color: #0f172a;
}

.simple-stats-stat span {
    font-size: 10px;
    color: #94a3b8;
    text-transform: uppercase;
}

.simple-stats-load-more-wrap {
    padding: 14px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
}

.simple-stats-load-more {
    appearance: none;
    border: none;
    background: #2563eb;
    color: #fff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
}

.simple-stats-load-more:hover {
    background: #1d4ed8;
}

.simple-stats-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #dbeafe;
    color: #1d4ed8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    overflow: hidden;
    flex-shrink: 0;
}

.simple-stats-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
