/* ============================================================
   wpForo Media Vault — slider.css + chunks.css + media-comments.css
   ============================================================ */

/* ═══════════════════════════════════════════════════════════════
   SLIDER
═══════════════════════════════════════════════════════════════ */
.wpfa-slider-wrap {
    position: relative;
    margin: 14px 0;
    border-radius: 14px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 8px 32px rgba(0,0,0,.55);
    container-type: inline-size;
}

/* Main swiper */
.wpfa-swiper-main {
    width: 100%;
    aspect-ratio: 16/9;
    max-height: 520px;
    background: #000;
}
.wpfa-slide { position: relative; overflow: hidden; }
.wpfa-slide-img-wrap { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.wpfa-slide-img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; cursor: zoom-in; transition: transform .25s; }
.wpfa-slide-img:hover { transform: scale(1.015); }

/* Counter badge */
.wpfa-slide-counter {
    position: absolute;
    top: 10px;
    left: 14px;
    background: rgba(0,0,0,.6);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 9999px;
    z-index: 10;
    font-variant-numeric: tabular-nums;
}

/* Nav arrows */
.wpfa-swiper-main .swiper-button-prev,
.wpfa-swiper-main .swiper-button-next {
    width: 36px; height: 36px;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    color: #fff;
    --swiper-navigation-size: 16px;
    transition: background .15s;
}
.wpfa-swiper-main .swiper-button-prev:hover,
.wpfa-swiper-main .swiper-button-next:hover { background: rgba(59,130,246,.7); }

/* Fullscreen btn */
.wpfa-fullscreen-btn {
    position: absolute;
    top: 10px; right: 10px;
    z-index: 20;
    background: rgba(0,0,0,.55);
    border: none;
    border-radius: 6px;
    padding: 6px 8px;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(4px);
    display: flex; align-items: center;
    transition: background .15s;
}
.wpfa-fullscreen-btn:hover { background: rgba(59,130,246,.7); }

/* Slide overlay buttons */
.wpfa-slide-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 8px 10px;
    display: flex;
    gap: 6px;
    background: linear-gradient(transparent, rgba(0,0,0,.65));
    opacity: 0;
    transition: opacity .2s;
    z-index: 10;
}
.wpfa-slide:hover .wpfa-slide-overlay { opacity: 1; }

.wpfa-mc-btn,
.wpfa-share-moment-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px;
    color: #fff;
    font-size: 11px;
    cursor: pointer;
    transition: background .15s;
}
.wpfa-mc-btn:hover       { background: rgba(59,130,246,.55); }
.wpfa-share-moment-btn:hover { background: rgba(245,158,11,.55); }
.wpfa-share-moment-btn.copied { background: rgba(34,197,94,.6); }

.wpfa-mc-count { font-weight: 700; }

/* Thumbs strip */
.wpfa-swiper-thumbs {
    height: 60px;
    padding: 4px 6px;
    background: #0c0c0c;
    box-sizing: border-box;
}
.wpfa-thumb-slide {
    width: 80px !important;
    height: 52px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    opacity: .55;
    transition: opacity .15s;
    position: relative;
}
.wpfa-swiper-thumbs .swiper-slide-thumb-active { opacity: 1; outline: 2px solid #3b82f6; }
.wpfa-thumb-img { width: 100%; height: 100%; object-fit: cover; }
.wpfa-thumb-badge {
    position: absolute;
    top: 2px; right: 2px;
    background: #3b82f6;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    border-radius: 9999px;
    padding: 1px 4px;
    line-height: 1.3;
}

/* ═══════════════════════════════════════════════════════════════
   MEDIA COMMENTS PANEL (shared by slider + video)
═══════════════════════════════════════════════════════════════ */
.wpfa-mc-panel {
    background: #0f172a;
    border-top: 1px solid #1e293b;
    border-radius: 0 0 14px 14px;
    max-height: 320px;
    display: flex;
    flex-direction: column;
}
.wpfa-mc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid #1e293b;
    flex-shrink: 0;
}
.wpfa-mc-panel-title { font-size: 13px; font-weight: 600; color: #e2e8f0; }
.wpfa-mc-panel-close {
    background: none; border: none;
    color: #64748b; font-size: 16px;
    cursor: pointer; padding: 2px 6px;
    border-radius: 4px;
    transition: color .15s;
}
.wpfa-mc-panel-close:hover { color: #f8fafc; }

.wpfa-mc-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wpfa-mc-loading { color: #64748b; font-size: 12px; text-align: center; padding: 16px; }
.wpfa-mc-empty   { color: #475569; font-size: 12px; text-align: center; padding: 16px; }

.wpfa-mc-item {
    display: flex;
    gap: 8px;
    align-items: flex-start;
}
.wpfa-mc-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}
.wpfa-mc-content { flex: 1; min-width: 0; }
.wpfa-mc-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #64748b;
    flex-wrap: wrap;
    margin-bottom: 3px;
}
.wpfa-mc-meta strong { color: #94a3b8; font-weight: 600; }
.wpfa-mc-ctx-label {
    background: #1e293b;
    border-radius: 4px;
    padding: 1px 5px;
    font-size: 10px;
    color: #7dd3fc;
}
.wpfa-mc-delete { background: none; border: none; color: #64748b; cursor: pointer; font-size: 11px; padding: 0; }
.wpfa-mc-delete:hover { color: #ef4444; }
.wpfa-mc-share-link { color: #64748b; font-size: 11px; text-decoration: none; }
.wpfa-mc-share-link:hover { color: #3b82f6; }

.wpfa-mc-body { font-size: 13px; color: #cbd5e1; line-height: 1.5; word-break: break-word; }

.wpfa-mc-form {
    padding: 10px 14px;
    border-top: 1px solid #1e293b;
    display: flex;
    gap: 8px;
    align-items: flex-end;
    flex-shrink: 0;
}
.wpfa-mc-input {
    flex: 1;
    background: #1e293b;
    border: 1px solid #334155;
    border-radius: 8px;
    padding: 7px 10px;
    color: #e2e8f0;
    font-size: 12px;
    resize: none;
    font-family: inherit;
}
.wpfa-mc-input::placeholder { color: #475569; }

/* Video comment button inline */
.wpfa-mc-video-btn {
    background: rgba(59,130,246,.15);
    border: 1px solid rgba(59,130,246,.3);
    color: #93c5fd;
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 11px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background .15s;
}
.wpfa-mc-video-btn:hover { background: rgba(59,130,246,.35); }
.wpfa-ts-display { font-variant-numeric: tabular-nums; }

/* ═══════════════════════════════════════════════════════════════
   CHUNKED UPLOAD DROP ZONE
═══════════════════════════════════════════════════════════════ */
.wpfa-dropzone {
    margin: 10px 0;
    border: 2px dashed #334155;
    border-radius: 12px;
    background: #0f172a;
    transition: border-color .2s, background .2s;
    overflow: hidden;
}
.wpfa-dropzone.drag-over {
    border-color: #3b82f6;
    background: rgba(59,130,246,.07);
}
.wpfa-dz-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    gap: 6px;
    text-align: center;
}
.wpfa-dz-icon { color: #334155; }
.wpfa-dz-title { margin: 0; font-size: 14px; font-weight: 600; color: #94a3b8; }
.wpfa-dz-sub   { margin: 0; font-size: 12px; color: #475569; }
.wpfa-dz-browse {
    margin-top: 6px;
    cursor: pointer;
}

.wpfa-upload-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.wpfa-upload-row {
    padding: 10px 14px;
    border-top: 1px solid #1e293b;
    background: #0c1422;
}
.wpfa-upload-info {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-bottom: 6px;
}
.wpfa-upload-name { color: #94a3b8; font-weight: 500; word-break: break-all; }
.wpfa-upload-size { color: #475569; flex-shrink: 0; margin-left: 8px; }
.wpfa-upload-progress-wrap {
    height: 4px;
    background: #1e293b;
    border-radius: 9999px;
    overflow: hidden;
    margin-bottom: 4px;
}
.wpfa-upload-bar {
    height: 100%;
    background: #3b82f6;
    border-radius: 9999px;
    transition: width .2s;
}
.wpfa-upload-status { font-size: 10px; color: #475569; font-variant-numeric: tabular-nums; }
.wpfa-upload-thumb { margin-top: 4px; }

/* ═══════════════════════════════════════════════════════════════
   TOAST NOTIFICATIONS
═══════════════════════════════════════════════════════════════ */
#wpfa-toasts {
    position: fixed;
    bottom: 24px; right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}
.wpfa-toast {
    background: #1e293b;
    border: 1px solid #334155;
    border-left: 3px solid #22c55e;
    color: #e2e8f0;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13px;
    box-shadow: 0 4px 16px rgba(0,0,0,.4);
    opacity: 0;
    transform: translateX(30px);
    transition: opacity .25s, transform .25s;
    font-family: system-ui, sans-serif;
}
.wpfa-toast.show { opacity: 1; transform: none; }

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════════ */
@container (max-width: 480px) {
    .wpfa-swiper-thumbs { height: 48px; }
    .wpfa-thumb-slide { width: 60px !important; height: 40px; }
    .wpfa-slide-overlay { opacity: 1; }
}
