/* ═══════════════════════════════════════════════
   solo_video.css – Video-Detailseite (YouTube-artig)
   Nutzt ausschließlich projekt-eigene CSS-Variablen
   aus global.css / base.css
   ═══════════════════════════════════════════════ */

/* ─── 2-Spalten-Layout ─── */
.solo-video-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.solo-video-main {
    flex: 1;
    min-width: 0;
}

.solo-video-sidebar {
    width: 300px;
    flex-shrink: 0;
}

/* ─── Video-Player ─── */
.solo-video-player {
    width: 100%;
    border-radius: var(--radius-base);
    background: #000;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.solo-video-player video {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-base);
    object-fit: contain;
    display: block;
}

/* ─── Uploader-Zeile (Bild + Name + Icons) ─── */
.solo-video-uploader {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0 4px 0;
    flex-wrap: wrap;
}

.solo-video-uploader-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.solo-video-uploader-info {
    flex: 1;
    min-width: 0;
}

.solo-video-uploader-info a {
    text-decoration: none;
    color: inherit;
}

.solo-video-uploader-info a:hover {
    text-decoration: underline;
}

/* ─── Beschreibung (aufklappbar) ─── */
.solo-video-desc {
    padding: 8px 0;
    line-height: 1.5;
}

.solo-video-desc.collapsed {
    max-height: 4.5em;
    /* ca. 3 Zeilen */
    overflow: hidden;
    position: relative;
}

.solo-video-desc.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.5em;
    background: linear-gradient(transparent, var(--color-bg-light, #f4f4f4));
    pointer-events: none;
}

.solo-video-desc-toggle {
    background: none;
    border: none;
    color: var(--color-accent, #b3a600);
    cursor: pointer;
    padding: 4px 0;
    font-size: inherit;
}

.solo-video-desc-toggle:hover {
    text-decoration: underline;
}

/* ─── Sidebar Video-Karten ─── */
.sidebar-video {
    display: flex;
    gap: 8px;
    padding: 8px 0;
    text-decoration: none;
    color: inherit;
    border-radius: var(--radius-base);
    transition: background var(--transition-fast, 0.18s);
}

.sidebar-video:hover {
    background: var(--color-btn-hover-light, #e6e6e6);
}

.sidebar-thumb {
    width: 168px;
    height: 94px;
    border-radius: var(--radius-base);
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
    background: #000;
}

.sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-thumb .play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5em;
    opacity: 0;
    transition: opacity var(--transition-fast, 0.18s);
}

.sidebar-video:hover .play-overlay {
    opacity: 1;
}

.sidebar-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.sidebar-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

/* ─── Kommentare ─── */
.kommentare-section {
    margin-top: 24px;
    border-top: 1px solid var(--color-border-light, #c8c8c8);
    padding-top: 16px;
}

.kommentar-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
}

.kommentar-hidden {
    display: none;
}

.kommentar-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #eee;
}

.kommentar-body {
    flex: 1;
    min-width: 0;
}

.kommentar-meta {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}

.kommentar-delete {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 0.85em;
    padding: 0;
    margin-left: auto;
}

.kommentar-delete:hover {
    color: #d32f2f;
}

.kommentar-input-wrapper {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border-light, #c8c8c8);
}

.kommentar-textarea {
    flex: 1;
    border: none;
    border-bottom: 1px solid var(--color-border-light, #c8c8c8);
    background: transparent;
    resize: none;
    font-size: 1rem;
    font-family: inherit;
    color: inherit;
    padding: 4px 0;
    min-height: 2.5em;
    outline: none;
    transition: border-color var(--transition-fast, 0.18s);
}

.kommentar-textarea:focus {
    border-bottom-color: var(--color-focus-light, #666);
}

.kommentar-charcount {
    font-size: 0.8em;
    color: #999;
    text-align: right;
    margin-top: 2px;
}

.kommentar-login-hint {
    padding: 12px 0;
    font-style: italic;
}

/* ─── Einbetten-Dialog ─── */
.einbetten-dialog {
    max-width: 520px;
    width: 90vw;
    padding: 1.2em 1.5em;
    border-radius: 10px;
    border: none;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
    background: #f0f0f0;
    color: #222;
}

.einbetten-dialog::backdrop {
    background: rgba(0, 0, 0, 0.4);
}

.embed-code-textarea {
    width: 100%;
    font-family: monospace;
    font-size: 0.85em;
    resize: none;
    border: 1px solid var(--color-border-light, #c8c8c8);
    border-radius: var(--radius-base);
    padding: 8px;
    background: #fff;
    color: #222;
}

.embed-sizes {
    display: flex;
    gap: 12px;
    margin: 8px 0;
    flex-wrap: wrap;
}

.embed-sizes label {
    cursor: pointer;
    font-size: 0.9em;
}

.embed-preview {
    background: #000;
    border-radius: var(--radius-base);
    aspect-ratio: 16/9;
    max-width: 360px;
    margin: 12px 0;
    overflow: hidden;
}

.embed-preview video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* ─── Like-Button ─── */
.solo-like-btn {
    color: inherit;
    transition: color var(--transition-fast, 0.18s), transform var(--transition-fast, 0.18s);
}

.solo-like-btn:hover {
    color: #e53935;
}

.solo-like-btn.liked {
    color: #e53935;
}

.solo-like-btn:active {
    transform: scale(1.25);
}

/* ─── Sidebar Videodauer-Badge ─── */
.sidebar-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 0.75em;
    font-weight: 500;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1.3;
    pointer-events: none;
}

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .solo-video-layout {
        flex-direction: column;
    }

    .solo-video-sidebar {
        width: 100%;
    }

    .sidebar-thumb {
        width: 120px;
        height: 68px;
    }

    .sidebar-video {
        padding: 6px 0;
    }
}

/* ─── Dark Mode ─── */
@media (prefers-color-scheme: dark) {
    .sidebar-video:hover {
        background: var(--color-btn-hover-dark, #2a2a2a);
    }

    .kommentare-section {
        border-top-color: var(--color-border-dark, #5c5c5c);
    }

    .kommentar-input-wrapper {
        border-bottom-color: var(--color-border-dark, #5c5c5c);
    }

    .kommentar-textarea {
        border-bottom-color: var(--color-border-dark, #5c5c5c);
    }

    .kommentar-textarea:focus {
        border-bottom-color: var(--color-focus-dark, #888);
    }

    .kommentar-avatar {
        background: #444;
    }

    .solo-video-uploader-avatar {
        background: #444;
    }

    .solo-video-desc.collapsed::after {
        background: linear-gradient(transparent, var(--color-bg-dark, #0a0a0a));
    }

    .einbetten-dialog {
        background: #222;
        color: #e4e6e9;
    }

    .embed-code-textarea {
        background: #1a1a1a;
        color: #e4e6e9;
        border-color: var(--color-border-dark, #5c5c5c);
    }

    .einbetten-dialog button {
        background: #181818;
        color: #e4e6e9;
        border: 1px solid #444;
    }
}

/* ─── Focus-visible ─── */
.solo-share-btn:focus-visible,
.solo-like-btn:focus-visible,
.kommentar-delete:focus-visible,
#embedTrigger:focus-visible,
#embedCopyBtn:focus-visible,
#kommentarSenden:focus-visible,
.sidebar-video:focus-visible {
    outline: 2px solid var(--color-accent, #b3a600);
    outline-offset: 2px;
}

/* ─── reduced motion ─── */
@media (prefers-reduced-motion: reduce) {

    .sidebar-video,
    .sidebar-thumb .play-overlay,
    .kommentar-textarea,
    .solo-like-btn {
        transition: none;
    }
}