/**
 * Asset Vault V2 - Enhancement Styles
 * Unified Compact Pill Dashboard + Bulk Actions
 */

/* ══════════════════════════════════════════════════════════
   UNIFIED PILL DASHBOARD
   ══════════════════════════════════════════════════════════ */
.enh-dashboard {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 0.5rem 1rem;
    background: rgba(10, 10, 10, 0.5);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

.enh-pill-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.enh-divider {
    width: 1px;
    height: 18px;
    background: var(--glass-border);
    margin: 0 0.125rem;
    flex-shrink: 0;
}

.enh-spacer {
    flex: 1;
}

/* Status pills injected into header */
.enh-header-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    margin-left: auto;
}

/* ── Compact Pill ── */
.enh-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.625rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 9999px;
    font-size: 0.6875rem;
    white-space: nowrap;
    transition: all 0.2s;
    user-select: none;
}

.enh-pill.filterable {
    cursor: pointer;
}

.enh-pill.filterable:hover {
    transform: translateY(-1px);
    border-color: var(--glass-hover);
    background: rgba(255, 255, 255, 0.04);
}

.enh-pill.no-hover {
    cursor: default;
}

.enh-pill.total {
    cursor: pointer;
}

.enh-pill-label {
    color: var(--text-muted);
}

.enh-pill-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* ── Color Variants ── */
.enh-pill.green  { color: var(--accent-green);  border-color: rgba(0, 255, 136, 0.25); }
.enh-pill.green .enh-pill-value { color: var(--accent-green); }

.enh-pill.blue   { color: var(--accent-blue);   border-color: rgba(0, 210, 255, 0.25); }
.enh-pill.blue .enh-pill-value { color: var(--accent-blue); }

.enh-pill.cyan   { color: #00e6d2;   border-color: rgba(0, 230, 210, 0.25); }
.enh-pill.cyan .enh-pill-value { color: #00e6d2; }

.enh-pill.purple { color: var(--accent-purple); border-color: rgba(157, 80, 187, 0.25); }
.enh-pill.purple .enh-pill-value { color: var(--accent-purple); }

.enh-pill.teal   { color: #00b4a0;  border-color: rgba(0, 180, 160, 0.25); }
.enh-pill.teal .enh-pill-value { color: #00b4a0; }

.enh-pill.yellow { color: #fabe28;  border-color: rgba(250, 190, 40, 0.25); }
.enh-pill.yellow .enh-pill-value { color: #fabe28; }

.enh-pill.indigo { color: #5064dc;  border-color: rgba(80, 100, 220, 0.25); }
.enh-pill.indigo .enh-pill-value { color: #5064dc; }

.enh-pill.sky    { color: #64b4ff;  border-color: rgba(100, 180, 255, 0.25); }
.enh-pill.sky .enh-pill-value { color: #64b4ff; }

.enh-pill.amber  { color: #ffb428;  border-color: rgba(255, 180, 40, 0.25); }
.enh-pill.amber .enh-pill-value { color: #ffb428; }

.enh-pill.red    { color: #ff3c3c;  border-color: rgba(255, 60, 60, 0.25); }
.enh-pill.red .enh-pill-value { color: #ff3c3c; }

.enh-pill.muted  { color: var(--text-muted); }
.enh-pill.muted .enh-pill-value { color: var(--text-secondary); }

/* ── ACTIVE PILL: "Alive" Effect ── */
.enh-pill.active {
    background: rgba(0, 210, 255, 0.08);
    border-color: rgba(0, 210, 255, 0.5);
    animation: pillPulse 2.8s ease-in-out infinite, pillShake 4s ease-in-out infinite;
}

.enh-pill.active .enh-pill-value {
    color: #fff !important;
    text-shadow: 0 0 8px rgba(0, 210, 255, 0.3);
}

.enh-pill.active .enh-pill-label {
    color: rgba(0, 210, 255, 0.85);
}

.enh-pill.active i {
    animation: pillIconGlow 2.8s ease-in-out infinite;
}

.enh-pill.active:hover {
    animation-play-state: paused;
    box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.7),
                0 0 14px rgba(0, 210, 255, 0.2);
}

/* Breathing glow */
@keyframes pillPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 210, 255, 0.2),
                    0 0 6px rgba(0, 210, 255, 0.05);
    }
    50% {
        box-shadow: 0 0 0 1px rgba(0, 210, 255, 0.5),
                    0 0 14px rgba(0, 210, 255, 0.12);
    }
}

/* Sub-pixel micro-shake */
@keyframes pillShake {
    0%, 100% { transform: translate(0, 0); }
    20% { transform: translate(0.3px, -0.2px); }
    40% { transform: translate(-0.2px, 0.2px); }
    60% { transform: translate(0.2px, 0.2px); }
    80% { transform: translate(-0.3px, -0.1px); }
}

/* Icon brightness */
@keyframes pillIconGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
}

/* ══════════════════════════════════════════════════════════
   BULK ACTIONS BAR
   ══════════════════════════════════════════════════════════ */
.bulk-actions-bar {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150px);
    background: rgba(0, 210, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    box-shadow: 0 8px 32px rgba(0, 210, 255, 0.4);
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.bulk-actions-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.bulk-info {
    color: #000;
    font-weight: 700;
    font-size: 0.875rem;
}

.bulk-actions {
    display: flex;
    gap: 0.5rem;
}

.bulk-btn {
    padding: 0.625rem 1rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.bulk-btn.primary { background: #000; color: #fff; }
.bulk-btn.secondary { background: rgba(0, 0, 0, 0.15); color: #000; }
.bulk-btn:hover { transform: scale(1.05); }
.bulk-btn:active { transform: scale(0.98); }

/* ══════════════════════════════════════════════════════════
   BULK SELECT MODE
   ══════════════════════════════════════════════════════════ */
.asset-checkbox {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    z-index: 10;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.bulk-mode .asset-checkbox { display: flex; }
.asset-checkbox:hover { border-color: var(--accent-blue); background: rgba(0, 210, 255, 0.2); }
.asset-checkbox.checked { background: var(--accent-blue); border-color: var(--accent-blue); }
.bulk-mode .asset-card { cursor: pointer; }
.bulk-mode .asset-card.selected { opacity: 0.7; }

/* ══════════════════════════════════════════════════════════
   HOVER PREVIEW (TRAILER)
   ══════════════════════════════════════════════════════════ */
.asset-thumbnail .hover-preview {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    background: var(--bg-surface);
}

.asset-thumbnail .hover-preview.playing {
    opacity: 1;
}

/* Hide play btn & duration while preview plays */
.asset-thumbnail:has(.hover-preview.playing) .play-btn,
.asset-thumbnail:has(.hover-preview.playing) .duration {
    opacity: 0 !important;
}

/* Subtle progress bar at bottom of preview */
.asset-thumbnail .preview-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 2px;
    background: var(--accent-blue);
    z-index: 3;
    transition: width 0.3s linear;
    pointer-events: none;
}

/* ══════════════════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .enh-dashboard { padding: 0.375rem 0.5rem; }
    .enh-pill { padding: 0.25rem 0.5rem; font-size: 0.625rem; }
    .enh-pill-row { gap: 0.25rem; }

    .bulk-actions-bar { flex-direction: column; gap: 0.75rem; padding: 1rem; }
    .bulk-actions { width: 100%; }
    .bulk-btn { flex: 1; justify-content: center; }
}
