/* Estilos de Videoclips — completamente isolados */
/* Usa as variáveis CSS globais do styles.css mas não altera nada nele */

/* === BOTÃO DE TOGGLE NA BARRA EXTRA-CONTROLS === */

#vc-toggle-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--surface, rgba(26,58,82,0.4));
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 20px;
    color: var(--text-secondary, #bae6fd);
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
    padding: 6px 14px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

#vc-toggle-btn:hover,
#vc-toggle-btn.active {
    background: var(--primary-color, #0891b2);
    border-color: var(--primary-color, #0891b2);
    color: #fff;
    box-shadow: 0 0 12px rgba(8, 145, 178, 0.4);
}

#vc-toggle-btn svg {
    flex-shrink: 0;
}

/* === SECÇÃO PRINCIPAL DE VIDEOCLIPS === */

#vc-section {
    background: var(--surface, rgba(26,58,82,0.4));
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 16px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px var(--shadow, rgba(0,0,0,0.4));
    margin-top: 16px;
    overflow: hidden;
    animation: vc-slide-in 0.25s ease;
}

#vc-section.hidden {
    display: none;
}

@keyframes vc-slide-in {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* === HEADER DA SECÇÃO === */

.vc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--glass-border, rgba(103,232,249,0.1));
}

.vc-header h3 {
    color: var(--text-primary, #f0f9ff);
    font-size: 0.95rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

/* === VÍDEO PLAYER === */

.vc-player-wrap {
    padding: 14px 18px 0;
    position: relative;
}

#vc-video {
    width: 100%;
    max-height: clamp(200px, 50vh, 360px);
    border-radius: 10px;
    background: #000;
    display: block;
    outline: none;
    user-select: none;
    -webkit-user-select: none;
}

/* Overlay de buffering */
.vc-player-wrap.is-buffering::after {
    content: '';
    position: absolute;
    inset: 14px 18px 0;
    border-radius: 10px;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    animation: vc-pulse 1.2s ease-in-out infinite;
}

@keyframes vc-pulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.65; }
}

/* === NOW PLAYING === */

.vc-now-playing {
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.vc-now-info {
    flex: 1;
    min-width: 0;
}

#vc-now-title {
    color: var(--text-primary, #f0f9ff);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0;
}

#vc-now-cat {
    color: var(--text-secondary, #bae6fd);
    font-size: 0.75rem;
    display: block;
    margin-top: 2px;
}

/* Botão partilhar na área now-playing */
#vc-share-current-btn {
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s, border-color 0.2s;
}
#vc-share-current-btn:hover {
    opacity: 1;
}

/* === CONTROLOS === */

.vc-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 8px 18px 12px;
}

.vc-ctrl-btn {
    background: var(--surface-light, rgba(42,55,68,0.5));
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 50%;
    color: var(--text-secondary, #bae6fd);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.vc-ctrl-btn:hover,
.vc-ctrl-btn.active {
    background: var(--primary-color, #0891b2);
    border-color: var(--primary-color, #0891b2);
    color: #fff;
}

.vc-ctrl-btn svg {
    pointer-events: none;
}

/* === FILTRO DE CATEGORIAS === */

#vc-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 18px 12px;
}

.vc-cat-btn {
    background: var(--surface-light, rgba(42,55,68,0.5));
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 16px;
    color: var(--text-secondary, #bae6fd);
    cursor: pointer;
    font-size: 0.72rem;
    font-family: inherit;
    padding: 4px 12px;
    transition: all 0.2s ease;
}

.vc-cat-btn:hover,
.vc-cat-btn.active {
    background: var(--primary-color, #0891b2);
    border-color: var(--primary-color, #0891b2);
    color: #fff;
}

/* === LISTA DE VIDEOCLIPS === */

.vc-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 18px 6px;
    border-top: 1px solid var(--glass-border, rgba(103,232,249,0.1));
}

.vc-list-header span {
    color: var(--text-secondary, #bae6fd);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

#vc-list {
    max-height: clamp(200px, 40vh, 340px);
    overflow-y: auto;
    padding: 4px 0 8px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color, #0891b2) transparent;
    -webkit-overflow-scrolling: touch;
}

#vc-list::-webkit-scrollbar {
    width: 4px;
}
#vc-list::-webkit-scrollbar-track {
    background: transparent;
}
#vc-list::-webkit-scrollbar-thumb {
    background: var(--primary-color, #0891b2);
    border-radius: 2px;
}

.vc-empty {
    color: var(--text-secondary, #bae6fd);
    font-size: 0.82rem;
    text-align: center;
    padding: 16px;
    opacity: 0.7;
    margin: 0;
}

/* === ITEM DA LISTA === */

.vc-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 18px;
    cursor: pointer;
    border-radius: 0;
    transition: background 0.15s ease;
}

.vc-item:hover {
    background: var(--surface-light, rgba(42,55,68,0.5));
}

.vc-item.active {
    background: rgba(8, 145, 178, 0.15);
    border-left: 3px solid var(--primary-color, #0891b2);
}

.vc-item-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.vc-item-icon {
    color: var(--primary-color, #0891b2);
    font-size: 0.65rem;
    flex-shrink: 0;
    opacity: 0.7;
}

.vc-item.active .vc-item-icon {
    opacity: 1;
}

.vc-item-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.vc-item-title {
    color: var(--text-primary, #f0f9ff);
    font-size: 0.82rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vc-item.active .vc-item-title {
    color: var(--accent-bright, #67e8f9);
    font-weight: 600;
}

.vc-item-cat {
    color: var(--text-secondary, #bae6fd);
    font-size: 0.68rem;
    opacity: 0.7;
}

.vc-share-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #bae6fd);
    cursor: pointer;
    opacity: 0;
    padding: 4px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.15s ease;
    flex-shrink: 0;
}

.vc-item:hover .vc-share-btn {
    opacity: 1;
}

.vc-share-btn:hover {
    color: var(--accent, #22d3ee);
    background: rgba(34,211,238,0.1);
}

/* Em dispositivos touch não há hover — botão sempre visível */
@media (hover: none) {
    .vc-share-btn {
        opacity: 0.55;
    }
    .vc-item:active .vc-share-btn {
        opacity: 1;
    }
}

/* === MODAL DE PARTILHA === */

#vc-share-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1100;
    padding: 20px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

#vc-share-modal.hidden {
    display: none;
}

.vc-share-content {
    background: var(--ocean-dark, #0f1e30);
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 16px;
    padding: 24px;
    max-width: 380px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.vc-share-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 8px;
}

.vc-share-header h3 {
    color: var(--text-primary, #f0f9ff);
    font-size: 0.95rem;
    margin: 0;
}

#vc-share-close {
    background: none;
    border: none;
    color: var(--text-secondary, #bae6fd);
    cursor: pointer;
    padding: 0 0 0 12px;
    font-size: 1.2rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.15s;
}
#vc-share-close:hover { opacity: 1; }

#vc-share-title {
    color: var(--accent, #22d3ee);
    font-size: 0.82rem;
    display: block;
    margin-bottom: 16px;
    font-style: italic;
}

.vc-share-url-row {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

#vc-share-url {
    flex: 1;
    background: var(--surface, rgba(26,58,82,0.4));
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 8px;
    color: var(--text-primary, #f0f9ff);
    font-size: 0.72rem;
    padding: 8px 10px;
    font-family: monospace;
    min-width: 0;
}

#vc-share-copy {
    background: var(--primary-color, #0891b2);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    font-size: 0.75rem;
    font-family: inherit;
    padding: 8px 14px;
    white-space: nowrap;
    transition: background 0.2s;
}
#vc-share-copy:hover { background: var(--primary-dark, #0e7490); }

.vc-share-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.vc-soc-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    background: var(--surface-light, rgba(42,55,68,0.5));
    border: 1px solid var(--glass-border, rgba(103,232,249,0.15));
    border-radius: 10px;
    color: var(--text-secondary, #bae6fd);
    cursor: pointer;
    font-size: 0.68rem;
    font-family: inherit;
    padding: 10px 6px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s ease;
}
.vc-soc-btn:hover { background: var(--primary-color, #0891b2); color: #fff; border-color: var(--primary-color, #0891b2); }
.vc-soc-btn svg { width: 18px; height: 18px; }

/* === RESPONSIVO MOBILE === */

@media (max-width: 480px) {
    #vc-video {
        max-height: 220px;
    }
    .vc-share-buttons {
        grid-template-columns: repeat(2, 1fr);
    }
}
