/* VideoHub Manager Pro — Mini tema interno (independente do tema do site) */

:root {
    --vhm-bg: #f5f6f8;
    --vhm-surface: #ffffff;
    --vhm-text: #1a1a1a;
    --vhm-muted: #6b7280;
    --vhm-border: #e5e7eb;
    --vhm-accent: #ff3b30;
    --vhm-radius: 10px;
}

body.vhm-dark-mode {
    --vhm-bg: #0f1115;
    --vhm-surface: #1a1d24;
    --vhm-text: #f3f4f6;
    --vhm-muted: #9aa0a6;
    --vhm-border: #2a2e37;
}

.vhm-body {
    background: var(--vhm-bg);
    color: var(--vhm-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
}

.vhm-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.vhm-header {
    background: var(--vhm-surface);
    border-bottom: 1px solid var(--vhm-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.vhm-header-inner {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 14px 20px;
}

.vhm-logo {
    font-weight: 700;
    font-size: 18px;
    color: var(--vhm-text);
    text-decoration: none;
    white-space: nowrap;
}

.vhm-logo span { color: var(--vhm-accent); }

.vhm-search-form {
    position: relative;
    flex: 1;
    display: flex;
}

.vhm-search-form input {
    flex: 1;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--vhm-border);
    background: var(--vhm-bg);
    color: var(--vhm-text);
}

.vhm-search-form button {
    border: none;
    background: transparent;
    cursor: pointer;
    margin-left: -40px;
}

.vhm-search-results {
    position: absolute;
    top: 110%;
    left: 0;
    right: 0;
    background: var(--vhm-surface);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    max-height: 320px;
    overflow-y: auto;
    display: none;
    z-index: 60;
}

.vhm-search-results.is-open { display: block; }

.vhm-search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    text-decoration: none;
    color: var(--vhm-text);
}

.vhm-search-result img { width: 48px; height: 32px; object-fit: cover; border-radius: 4px; }

.vhm-theme-toggle {
    border: 1px solid var(--vhm-border);
    background: var(--vhm-surface);
    border-radius: 999px;
    width: 38px;
    height: 38px;
    cursor: pointer;
}

/* Hamburger (menu mobile) */
.vhm-hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    width: 38px;
    height: 38px;
    border: 1px solid var(--vhm-border);
    background: var(--vhm-surface);
    border-radius: 8px;
    cursor: pointer;
    flex-shrink: 0;
}

.vhm-hamburger span {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--vhm-text);
    transition: transform .2s ease, opacity .2s ease;
}

.vhm-hamburger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.vhm-hamburger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.vhm-hamburger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.vhm-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 90;
}

.vhm-sidebar-overlay.is-open { display: block; }

/* Botão de fechar do menu mobile: só aparece dentro do painel deslizante,
   já que nesse breakpoint o próprio hamburguer do cabeçalho fica coberto
   pela sidebar aberta e não pode ser usado para fechá-la. */
.vhm-sidebar-close {
    display: none;
    margin-left: auto;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: var(--vhm-bg, transparent);
    border: 1px solid var(--vhm-border);
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    color: var(--vhm-text, inherit);
    cursor: pointer;
}
.vhm-sidebar-close:hover { background: var(--vhm-border); }

/* Breadcrumb */
.vhm-breadcrumb {
    padding: 12px 20px;
    font-size: 13px;
    color: var(--vhm-muted);
}
.vhm-breadcrumb a { color: var(--vhm-muted); text-decoration: none; }

/* Layout */
.vhm-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 28px;
    padding: 20px 20px 60px;
    align-items: start;
}

.vhm-main {
    min-width: 0;
}

.vhm-sidebar {
    background: var(--vhm-surface);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    padding: 18px 14px;
    align-self: start;
}

.vhm-sidebar-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--vhm-border);
}

.vhm-sidebar-icon {
    color: var(--vhm-accent);
    font-size: 20px;
    line-height: 1;
}

.vhm-sidebar h3 {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--vhm-muted);
    margin: 0;
}

.vhm-category-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.vhm-category-list li { margin-bottom: 0; }

.vhm-category-list a,
.vhm-cat-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--vhm-text);
    font-size: 14px;
    transition: background .2s ease, color .2s ease, transform .15s ease;
}

.vhm-category-list a .dashicons,
.vhm-cat-link .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    color: var(--vhm-muted);
    transition: color .2s ease;
}

.vhm-category-list a:hover,
.vhm-cat-link:hover {
    background: var(--vhm-bg);
    color: var(--vhm-accent);
    transform: translateX(2px);
}
.vhm-category-list a:hover .dashicons,
.vhm-cat-link:hover .dashicons { color: var(--vhm-accent); }

.vhm-category-list a.is-active,
.vhm-cat-link.is-active {
    background: var(--vhm-accent);
    color: #fff;
    font-weight: 600;
}
.vhm-category-list a.is-active .dashicons,
.vhm-cat-link.is-active .dashicons { color: #fff; }

.vhm-cat-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vhm-cat-count {
    background: var(--vhm-bg);
    color: var(--vhm-muted);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    min-width: 22px;
    text-align: center;
}

.vhm-category-list a.is-active .vhm-cat-count,
.vhm-cat-link.is-active .vhm-cat-count {
    background: rgba(255,255,255,.25);
    color: #fff;
}

.vhm-cat-empty {
    color: var(--vhm-muted);
    font-size: 13px;
    padding: 8px 10px;
    font-style: italic;
}

.vhm-archive-content {
    background: var(--vhm-bg);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    padding: 24px 28px 28px;
}

.vhm-archive-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 16px;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--vhm-border);
}

.vhm-page-title {
    margin: 0;
    font-size: 24px;
    line-height: 1.3;
    color: var(--vhm-text);
}

.vhm-archive-count {
    font-size: 13px;
    color: var(--vhm-muted);
    white-space: nowrap;
}

.vhm-no-results {
    text-align: center;
    color: var(--vhm-muted);
    font-size: 14px;
    padding: 60px 0;
}

/* Grid de vídeos */
.vhm-video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.vhm-card {
    background: var(--vhm-surface);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    overflow: hidden;
    transition: transform .15s ease;
}
.vhm-card:hover { transform: translateY(-3px); }

.vhm-card-thumb {
    position: relative;
    display: block;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
}

.vhm-card-img { width: 100%; height: 100%; object-fit: cover; display: block; }

.vhm-card-placeholder {
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 32px; color: var(--vhm-muted);
}

.vhm-card-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 28px;
    background: rgba(0,0,0,0.15);
    opacity: 0; transition: opacity .15s ease;
}
.vhm-card:hover .vhm-card-play { opacity: 1; }

.vhm-card-body { padding: 12px 14px; }
.vhm-card-category {
    font-size: 11px; text-transform: uppercase; color: var(--vhm-accent); font-weight: 700;
}
.vhm-card-title { font-size: 15px; margin: 6px 0 0; line-height: 1.35; }
.vhm-card-title a { color: var(--vhm-text); text-decoration: none; }

/* Player responsivo */
.vhm-single-video {
    background: var(--vhm-surface);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    padding: 24px 28px 28px;
}

.vhm-video-title {
    margin: 0 0 10px;
    font-size: 26px;
    line-height: 1.3;
    color: var(--vhm-text);
}

.vhm-video-meta {
    color: var(--vhm-muted);
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--vhm-border);
}

.vhm-video-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.vhm-video-cat-tag {
    display: inline-flex;
    align-items: center;
    color: var(--vhm-accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .3px;
    background: var(--vhm-bg);
    border: 1px solid var(--vhm-border);
    border-radius: 999px;
    padding: 4px 12px;
    transition: background .2s ease, color .2s ease;
}
.vhm-video-cat-tag:hover {
    background: var(--vhm-accent);
    color: #fff;
    border-color: var(--vhm-accent);
}

.vhm-video-content { margin-top: 4px; }

.vhm-player-wrapper { margin: 0 0 20px; }
.vhm-player-aspect {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: var(--vhm-radius);
    overflow: hidden;
    box-shadow: 0 2px 14px rgba(0,0,0,.08);
}
.vhm-player-iframe {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: 0;
}
.vhm-player-unavailable {
    display: flex; align-items: center; justify-content: center;
    aspect-ratio: 16/9; background: var(--vhm-bg); color: var(--vhm-muted);
    border-radius: var(--vhm-radius);
}

.vhm-related-videos {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--vhm-border);
}
.vhm-related-videos h2 {
    font-size: 17px;
    font-weight: 700;
    margin: 0 0 16px;
    color: var(--vhm-text);
}

/* Paginação */
.vhm-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 34px;
    flex-wrap: wrap;
}
.vhm-pagination a, .vhm-pagination span {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--vhm-border);
    text-decoration: none;
    color: var(--vhm-text);
    font-size: 14px;
    background: var(--vhm-surface);
    transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.vhm-pagination a:hover { background: var(--vhm-bg); border-color: var(--vhm-accent); color: var(--vhm-accent); }
.vhm-pagination .current { background: var(--vhm-accent); color: #fff; border-color: var(--vhm-accent); }

.vhm-loading-more { text-align: center; color: var(--vhm-muted); padding: 24px 0; font-size: 13px; }

/* Footer */
.vhm-footer {
    border-top: 1px solid var(--vhm-border);
    padding: 24px 0;
    color: var(--vhm-muted);
    font-size: 13px;
    text-align: center;
}

/* Responsivo */
@media (max-width: 900px) {
    .vhm-hamburger { display: flex; }

    .vhm-layout { grid-template-columns: 1fr; }

    .vhm-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 260px;
        max-width: 80vw;
        background: var(--vhm-surface);
        border-right: 1px solid var(--vhm-border);
        padding: 20px;
        overflow-y: auto;
        z-index: 100;
        transform: translateX(-100%);
        transition: transform .25s ease;
    }

    .vhm-sidebar.is-open {
        transform: translateX(0);
    }

    .vhm-sidebar-close {
        display: flex;
        position: absolute;
        top: 14px;
        right: 14px;
    }

    .vhm-sidebar h3:first-of-type { margin-top: 44px; }
}

@media (max-width: 600px) {
    .vhm-header-inner { flex-wrap: wrap; }
    .vhm-video-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .vhm-single-video { padding: 18px 16px 20px; }
    .vhm-video-title { font-size: 21px; }
    .vhm-archive-content { padding: 18px 16px 20px; }
}

/* ==========================================================================
   Comentários (markup padrão do comments_template() do WordPress)
   ========================================================================== */
.vhm-comments {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--vhm-border);
}

.vhm-comments h2,
.vhm-comments h3,
.vhm-comments .comments-title,
.vhm-comments .comment-reply-title {
    font-size: 20px;
    margin: 0 0 20px;
    color: var(--vhm-text);
}
.vhm-comments .comment-reply-title small a {
    font-size: 13px;
    color: var(--vhm-muted);
    margin-left: 8px;
}

/* Lista de comentários */
.vhm-comments .comment-list {
    list-style: none;
    margin: 0 0 30px;
    padding: 0;
}
.vhm-comments .comment-list .children {
    list-style: none;
    margin: 0;
    padding-left: 28px;
}
.vhm-comments .comment-list > li + li,
.vhm-comments .comment-list .children > li {
    margin-top: 18px;
}

.vhm-comments .comment-body {
    background: var(--vhm-surface);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    padding: 16px 18px;
}

.vhm-comments .comment-author {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}
.vhm-comments .comment-author .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: block;
}
.vhm-comments .comment-author .fn {
    font-weight: 600;
    font-style: normal;
    color: var(--vhm-text);
}
.vhm-comments .comment-author .says { display: none; }

.vhm-comments .comment-metadata {
    font-size: 12px;
    color: var(--vhm-muted);
    margin-bottom: 10px;
}
.vhm-comments .comment-metadata a {
    color: var(--vhm-muted);
    text-decoration: none;
}
.vhm-comments .comment-metadata a:hover { text-decoration: underline; }

.vhm-comments .comment-content p {
    margin: 0 0 10px;
    color: var(--vhm-text);
    line-height: 1.6;
    font-size: 14px;
}
.vhm-comments .comment-content p:last-child { margin-bottom: 0; }

.vhm-comments .reply {
    margin-top: 10px;
}
.vhm-comments .comment-reply-link {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    color: var(--vhm-accent);
    text-decoration: none;
    border: 1px solid var(--vhm-border);
    border-radius: 999px;
    padding: 4px 12px;
}
.vhm-comments .comment-reply-link:hover {
    background: var(--vhm-accent);
    border-color: var(--vhm-accent);
    color: #fff;
}

.vhm-comments .comment-awaiting-moderation {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    font-style: italic;
    color: var(--vhm-muted);
}

.vhm-comments .comment-navigation {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    font-size: 13px;
}
.vhm-comments .comment-navigation a { color: var(--vhm-accent); text-decoration: none; }

.vhm-comments .no-comments {
    color: var(--vhm-muted);
    font-size: 14px;
    margin-bottom: 24px;
}

/* Formulário de comentário */
.vhm-comments #respond,
.vhm-comments .comment-respond {
    background: var(--vhm-surface);
    border: 1px solid var(--vhm-border);
    border-radius: var(--vhm-radius);
    padding: 20px;
}

.vhm-comments .comment-notes,
.vhm-comments .logged-in-as {
    font-size: 13px;
    color: var(--vhm-muted);
    margin: 0 0 16px;
}
.vhm-comments .logged-in-as a { color: var(--vhm-accent); }

.vhm-comments .comment-form-comment,
.vhm-comments .comment-form-author,
.vhm-comments .comment-form-email,
.vhm-comments .comment-form-url,
.vhm-comments .comment-form-cookies-consent {
    margin-bottom: 14px;
}

.vhm-comments label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--vhm-text);
    margin-bottom: 6px;
}

.vhm-comments textarea#comment,
.vhm-comments input#author,
.vhm-comments input#email,
.vhm-comments input#url {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px 12px;
    font-size: 14px;
    font-family: inherit;
    color: var(--vhm-text);
    background: var(--vhm-bg);
    border: 1px solid var(--vhm-border);
    border-radius: 8px;
    transition: border-color .15s ease;
}
.vhm-comments textarea#comment {
    min-height: 110px;
    resize: vertical;
}
.vhm-comments textarea#comment:focus,
.vhm-comments input#author:focus,
.vhm-comments input#email:focus,
.vhm-comments input#url:focus {
    outline: none;
    border-color: var(--vhm-accent);
}

.vhm-comments .comment-form-cookies-consent {
    display: flex;
    align-items: center;
    gap: 8px;
}
.vhm-comments .comment-form-cookies-consent label {
    margin: 0;
    font-weight: 400;
    font-size: 12px;
    color: var(--vhm-muted);
}

.vhm-comments .form-submit {
    margin: 6px 0 0;
}
.vhm-comments #submit {
    background: var(--vhm-accent);
    color: #fff;
    border: 0;
    border-radius: 999px;
    padding: 10px 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .15s ease;
}
.vhm-comments #submit:hover { opacity: .9; }

@media (max-width: 600px) {
    .vhm-comments .comment-list .children { padding-left: 14px; }
}