/* ============================================================
   Tabo Streamers Live — style v1.3
   ============================================================ */

.tabo-streamers-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    margin: 1.5rem 0;
}

.tabo-filters {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.tabo-filter {
    font-size: 12px;
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.4;
}

.tabo-filter:hover  { border-color: #22c55e; color: #22c55e; }
.tabo-filter.active { background: #22c55e; color: #fff; border-color: #22c55e; }

.tabo-last-update {
    margin-left: auto;
    font-size: 11px;
    color: #aaa;
}

.tabo-status-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 13px;
    color: #888;
}

.tabo-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    flex-shrink: 0;
    transition: background 0.3s;
}

.tabo-dot.live {
    background: #22c55e;
    animation: tabo-blink 2s ease-in-out infinite;
}

@keyframes tabo-blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.4; }
}

/* Grid */
.tabo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 14px;
}

/* Kafelek — stała wysokość, flex żeby wyrównać zawartość */
.tabo-card {
    background: #fff;
    border-radius: 14px;
    padding: 1.1rem 0.75rem 0.9rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Stała wysokość — wszystkie kafelki równe */
    height: 160px;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    transition: transform 0.18s, opacity 0.3s;
    cursor: pointer;
    border: 2px solid transparent;
}

.tabo-card:hover {
    transform: translateY(-3px);
    text-decoration: none;
    color: inherit;
}

.tabo-card.offline  { border-color: #fca5a5; opacity: 0.72; }
.tabo-card.offline:hover { opacity: 0.88; }
.tabo-card.live-card { border-color: #22c55e; opacity: 1; }

/* Avatar wrapper */
.tabo-avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.tabo-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #e8e8e8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    font-weight: 600;
    color: #777;
}

.tabo-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}

.tabo-avatar-ring {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2.5px solid #22c55e;
    animation: tabo-ring-pulse 2.2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes tabo-ring-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.5; transform: scale(1.06); }
}

.tabo-live-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #22c55e;
    border-radius: 50%;
    border: 2px solid #fff;
    z-index: 2;
}

/* Nazwa — stały margines od góry, nie rośnie */
.tabo-name {
    font-size: 12px;
    font-weight: 600;
    color: #222;
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
    max-width: 100%;
    margin-top: 8px;
    flex-shrink: 0;
}

/* Dodatkowe info (gra + widzowie) — ukryte, pokazują się tylko
   jako tooltip na hover żeby nie psuły układu */
.tabo-meta {
    display: none;
}

/* Tooltip z grą i widzami przy hover na live */
.tabo-card.live-card {
    overflow: visible;
}

.tabo-card.live-card:hover .tabo-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.88);
    color: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Strzałka tooltipa */
.tabo-card.live-card:hover .tabo-meta::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(0,0,0,0.88);
}

/* Żeby tooltip działał, card musi być relative */
.tabo-card { position: relative; }

.tabo-game    { color: #ccc; font-size: 10px; }
.tabo-viewers { color: #22c55e; font-weight: 600; font-size: 11px; }

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .tabo-card           { background: #18181b; }
    .tabo-card.offline   { border-color: #7f1d1d; opacity: 0.65; }
    .tabo-card.live-card { border-color: #22c55e; }
    .tabo-name           { color: #f0f0f0; }
    .tabo-avatar         { background: #27272a; color: #888; }
    .tabo-live-dot       { border-color: #18181b; }
    .tabo-filter         { border-color: #444; color: #aaa; }
    .tabo-filter.active  { background: #22c55e; color: #fff; border-color: #22c55e; }
}

@media (max-width: 480px) {
    .tabo-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
    .tabo-card { height: 140px; }
    .tabo-avatar-wrap,
    .tabo-avatar { width: 52px; height: 52px; }
}
