/* ============================================================
   Tabo Clips — style v1.0.0
   ============================================================ */

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

/* Zakładki */
.tabo-clips-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tabo-clips-tab {
    font-size: 13px;
    padding: 6px 16px;
    border-radius: 20px;
    border: 1px solid #ddd;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.tabo-clips-tab:hover  { border-color: #9147ff; color: #9147ff; }
.tabo-clips-tab.active { background: #9147ff; color: #fff; border-color: #9147ff; }

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

.tabo-clips-loading,
.tabo-clips-empty,
.tabo-clips-error {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem;
    color: #aaa;
    font-size: 14px;
}

.tabo-clips-error { color: #b91c1c; }

/* Kafelek */
.tabo-clips-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    cursor: pointer;
    transition: transform 0.18s, box-shadow 0.18s;
}

.tabo-clips-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

/* Miniaturka */
.tabo-clips-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #111;
    overflow: hidden;
}

.tabo-clips-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}

.tabo-clips-card:hover .tabo-clips-thumb img {
    transform: scale(1.04);
}

.tabo-clips-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    background: #1a1a2e;
}

/* Przycisk play */
.tabo-clips-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    opacity: 0;
    background: rgba(0,0,0,0.4);
    transition: opacity 0.2s;
}

.tabo-clips-card:hover .tabo-clips-play-btn { opacity: 1; }

/* Info */
.tabo-clips-info {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tabo-clips-title {
    font-size: 13px;
    font-weight: 600;
    color: #222;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tabo-clips-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: #888;
}

.tabo-clips-views,
.tabo-clips-date { white-space: nowrap; }

/* ============================================================
   MODAL
   ============================================================ */

.tabo-clips-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.tabo-clips-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(4px);
}

.tabo-clips-modal-box {
    position: relative;
    width: 100%;
    max-width: 860px;
    background: #111;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0,0,0,0.6);
    z-index: 1;
}

.tabo-clips-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.tabo-clips-modal-close:hover { background: rgba(255,255,255,0.3); }

.tabo-clips-modal-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
}

.tabo-clips-modal-player iframe {
    width: 100%;
    height: 100%;
    display: block;
}

.tabo-clips-modal-info {
    padding: 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tabo-clips-modal-title {
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    line-height: 1.4;
}

.tabo-clips-modal-meta {
    font-size: 13px;
    color: #888;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
    .tabo-clips-card    { background: #18181b; border-color: #27272a; }
    .tabo-clips-title   { color: #e5e5e5; }
    .tabo-clips-tab     { border-color: #444; color: #aaa; }
    .tabo-clips-tab.active { background: #9147ff; color: #fff; border-color: #9147ff; }
}

/* Responsywność */
@media (max-width: 600px) {
    .tabo-clips-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .tabo-clips-modal { padding: 0; }
    .tabo-clips-modal-box { border-radius: 0; max-width: 100%; height: 100dvh; display: flex; flex-direction: column; }
    .tabo-clips-modal-player { flex: 1; aspect-ratio: unset; }
}

/* Fallback embed zablokowany */
.tabo-clips-embed-blocked {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #aaa;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    box-sizing: border-box;
}

.tabo-clips-open-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #9147ff;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: background 0.2s;
}

.tabo-clips-open-btn:hover { background: #7c3aed; color: #fff; }
