.wpsvm-library {
    --wpsvm-bg: #0f0f0f;
    --wpsvm-panel: #181818;
    --wpsvm-panel-hover: #272727;
    --wpsvm-line: #303030;
    --wpsvm-text: #f1f1f1;
    --wpsvm-muted: #aaa;
    --wpsvm-red: #ff0033;
    height: calc(100vh - 62px);
    min-height: 0;
    width: 100vw;
    margin: 0 0 0 calc(50% - 50vw);
    color: var(--wpsvm-text);
    background: var(--wpsvm-bg);
    font-family: Arial, sans-serif;
}

body:has(.wpsvm-library) {
    overflow: hidden;
}

body:has(.wpsvm-library) header.wp-block-template-part {
    position: sticky;
    top: var(--wp-admin--admin-bar--height, 0px);
    z-index: 20;
}

body:has(.wpsvm-library) header.wp-block-template-part,
body:has(.wpsvm-library) header.wp-block-template-part .wp-block-group {
    color: #f1f1f1;
    background: #0f0f0f !important;
}

body:has(.wpsvm-library) .actcon-site-header {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: clamp(12px, 2vw, 28px);
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

body:has(.wpsvm-library) .actcon-site-header > .wp-block-group {
    flex: 0 0 auto;
    min-width: 0;
}

.wpsvm-library.is-header-controls .wpsvm-topbar {
    display: none;
}

body:has(.wpsvm-library) header.wp-block-template-part a {
    color: #f1f1f1;
}

body:has(.wpsvm-library) .wp-site-blocks,
body:has(.wpsvm-library) main.wp-block-group {
    max-width: none;
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
}

body.wpsvm-modal-open {
    overflow: hidden;
}

.wpsvm-shell {
    position: relative;
    display: flex;
    width: 100%;
    max-width: none;
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    overflow: hidden;
}

.wpsvm-sidebar {
    box-sizing: border-box;
    width: 216px;
    flex: 0 0 216px;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px 12px;
    background: #0f0f0f;
    transition: width .2s ease, flex-basis .2s ease, padding .2s ease;
}

.wpsvm-library.is-sidebar-collapsed .wpsvm-sidebar {
    width: 0;
    flex-basis: 0;
    padding-right: 0;
    padding-left: 0;
}

.wpsvm-nav a,
.wpsvm-sidebar__links {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 40px;
    padding: 0 13px;
    border-radius: 8px;
    color: var(--wpsvm-text);
    font-size: 13px;
    text-decoration: none;
}

.wpsvm-nav a:hover,
.wpsvm-nav a.is-active {
    background: #272727;
}

.wpsvm-nav a span,
.wpsvm-sidebar__links span {
    width: 16px;
    color: #ddd;
    font-size: 17px;
    text-align: center;
}

.wpsvm-sidebar__line {
    height: 1px;
    margin: 22px 12px;
    background: var(--wpsvm-line);
}

.wpsvm-sidebar__title {
    padding: 0 13px;
    color: var(--wpsvm-muted);
    font-size: 12px;
}

.wpsvm-app {
    box-sizing: border-box;
    min-width: 0;
    flex: 1;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 0 24px 56px;
    background: var(--wpsvm-bg);
}

.wpsvm-topbar {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 76px;
}

.wpsvm-menu {
    display: grid;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    place-items: center;
    padding: 0;
    border: 1px solid #3d3d3d;
    border-radius: 8px;
    color: var(--wpsvm-text);
    background: transparent;
    font-size: 22px;
    cursor: pointer;
}

.actcon-site-header .wpsvm-menu {
    color: #f1f1f1;
}

.wpsvm-menu:hover {
    background: #272727;
}

.wpsvm-search {
    display: flex;
    width: min(620px, 100%);
    height: 40px;
    margin: 0 auto;
    min-width: 0;
    border: 1px solid #3d3d3d;
    border-radius: 22px;
    background: #121212;
    overflow: hidden;
}

.wpsvm-search input {
    min-width: 0;
    flex: 1;
    padding: 0 18px;
    border: 0;
    outline: 0;
    color: var(--wpsvm-text);
    background: transparent;
    font-size: 14px;
}

.wpsvm-search input::placeholder {
    color: #8d8d8d;
}

.wpsvm-search button {
    width: 54px;
    border: 0;
    border-left: 1px solid #3d3d3d;
    color: var(--wpsvm-text);
    background: #252525;
    font-size: 23px;
    cursor: pointer;
}

body:has(.wpsvm-library) .actcon-site-header .wpsvm-search {
    flex: 0 1 620px;
    width: auto;
    max-width: 620px;
}

.wpsvm-account { position: relative; flex: 0 0 auto; margin-left: auto; }
.wpsvm-account__toggle { position: relative; display: block; width: 40px; height: 40px; padding: 0; border: 1px solid #484848; border-radius: 50%; color: #f1f1f1; background: #252525; cursor: pointer; }
.wpsvm-account__toggle:hover, .wpsvm-account__toggle[aria-expanded="true"] { border-color: #ff6a6a; background: #363636; }
.wpsvm-account__toggle svg { position: absolute; top: 50%; left: 50%; display: block; width: 20px; height: 20px; transform: translate(-50%, -50%); fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.wpsvm-account__panel { position: absolute; top: calc(100% + 10px); right: 0; z-index: 50; box-sizing: border-box; width: min(320px, calc(100vw - 32px)); padding: 18px; border: 1px solid #3d3d3d; border-radius: 12px; color: #f1f1f1; background: #212121; box-shadow: 0 14px 32px #0009; }
.wpsvm-account__panel[hidden], .wpsvm-account__form[hidden] { display: none; }
.wpsvm-account__title, .wpsvm-account__identity strong { display: block; margin-bottom: 12px; font-size: 16px; }
.wpsvm-account__identity { display: grid; gap: 3px; overflow-wrap: anywhere; padding-bottom: 12px; border-bottom: 1px solid #3d3d3d; }
.wpsvm-account__identity strong { margin-bottom: 0; }
.wpsvm-account__identity span { font-size: 13px; }
.wpsvm-account__identity small { color: #aaa; }
.wpsvm-account__form { display: grid; gap: 7px; margin: 10px 0; }
.wpsvm-account__form label { font-size: 12px; }
.wpsvm-account__form input { box-sizing: border-box; width: 100%; min-height: 36px; padding: 7px 9px; border: 1px solid #555; border-radius: 6px; color: #fff; background: #111; }
.wpsvm-account__form button { min-height: 36px; margin-top: 7px; border: 0; border-radius: 6px; color: #fff; background: #d9002b; font-weight: 700; cursor: pointer; }
.wpsvm-account__form button:disabled { opacity: .6; cursor: wait; }
.wpsvm-account__action, .wpsvm-account__help { display: block; width: 100%; padding: 9px 0; border: 0; color: #f1f1f1; background: transparent; font-size: 13px; text-align: left; text-decoration: none; cursor: pointer; }
.wpsvm-account__action:hover, .wpsvm-account__help:hover { color: #ff6a6a; }
.wpsvm-account__message { margin: 8px 0 0; color: #ff9d9d; font-size: 12px; }
.wpsvm-account__message:empty { display: none; }

.wpsvm-library__heading {
    margin: 8px 0 16px;
}

.wpsvm-eyebrow {
    color: #ff6a6a;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.wpsvm-library h1 {
    margin: 8px 0 0;
    color: var(--wpsvm-text);
    font-size: 28px;
    line-height: 1.15;
}

.wpsvm-chips {
    display: flex;
    gap: 10px;
    margin: 0 0 22px;
    overflow-x: auto;
    scrollbar-width: none;
}

.wpsvm-chips::-webkit-scrollbar {
    display: none;
}

.wpsvm-chips button {
    flex: 0 0 auto;
    padding: 9px 14px;
    border: 0;
    border-radius: 8px;
    color: var(--wpsvm-text);
    background: #272727;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

.wpsvm-chips button:hover,
.wpsvm-chips button.is-active {
    color: #111;
    background: #f1f1f1;
}

.wpsvm-library__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    color: var(--wpsvm-text);
    font-size: 13px;
}

.wpsvm-library__bar span {
    color: var(--wpsvm-muted);
    font-size: 12px;
}

.wpsvm-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 34px 18px;
}

.wpsvm-card {
    min-width: 0;
    border-radius: 9px;
    background: transparent;
    transition: transform .18s ease;
}

.wpsvm-card:hover {
    transform: translateY(-3px);
}

.wpsvm-card__media {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 9px;
    background: #292929;
}

.wpsvm-card__media img,
.wpsvm-card__fallback {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wpsvm-card__preview {
    position: absolute;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    pointer-events: none;
}

.wpsvm-card__fallback {
    background: linear-gradient(135deg, #27374a, #c04d4d);
}

.wpsvm-card__duration {
    position: absolute;
    bottom: 6px;
    z-index: 2;
    padding: 3px 5px;
    border-radius: 3px;
    color: #fff;
    background: rgba(0, 0, 0, .8);
    font-size: 11px;
}

.wpsvm-card__play {
    position: absolute;
    left: 6px;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    border: 0;
    color: transparent;
    background: transparent;
    cursor: pointer;
}

.wpsvm-card__play::before {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 0, 51, .92);
    opacity: 0;
    transform: translate(-50%, -50%) scale(.8);
    transition: opacity .18s ease, transform .18s ease;
}

.wpsvm-card:hover .wpsvm-card__play::before,
.wpsvm-card__play:focus::before {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.wpsvm-card__body {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 12px 2px 0;

}

.wpsvm-card__avatar {
    display: grid;
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #4d5d75;
    font-size: 13px;
    font-weight: 700;
}

.wpsvm-card__details {
    flex: 1 1 auto;
    min-width: 0;
    text-align: left;
}

.wpsvm-card h2 {
    display: -webkit-box;
    overflow: hidden;
    margin: 0 0 5px;
    color: var(--wpsvm-text);
    font-size: 15px;
    line-height: 1.3;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.wpsvm-card p {
    overflow: hidden;
    margin: 0;
    color: var(--wpsvm-muted);
    font-size: 12px;
    line-height: 1.45;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpsvm-card p span {
    padding: 0 3px;
}

.wpsvm-message {
    padding: 34px 20px;
    border: 1px dashed #555;
    border-radius: 8px;
    color: var(--wpsvm-muted);
    text-align: center;
    background: var(--wpsvm-panel);
}

.wpsvm-message-error {
    color: #ff8a8a;
}

.wpsvm-no-results {
    display: none;
    margin: 28px 0;
    color: var(--wpsvm-muted);
    text-align: center;
}

.wpsvm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.wpsvm-modal.is-open {
    display: flex;
}

.wpsvm-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .84);
}

.wpsvm-modal__dialog {
    position: relative;
    z-index: 1;
    width: min(100%, 980px);
    padding: 18px;
    border-radius: 10px;
    background: #181818;
    box-shadow: 0 20px 80px #000;
}

.wpsvm-modal__dialog h2 {
    margin: 0 0 14px;
    color: #fff;
    font-size: 16px;
}

.wpsvm-modal__close {
    position: absolute;
    top: 7px;
    right: 10px;
    border: 0;
    color: #fff;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.wpsvm-modal__player {
    overflow: hidden;
    aspect-ratio: 16 / 9;
    border-radius: 6px;
    background: #000;
}

.wpsvm-modal__player iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 1100px) {
    .wpsvm-sidebar {
        width: 76px;
        flex-basis: 76px;
        padding-inline: 8px;
    }
    .wpsvm-nav a:not(.is-active)::after,
    .wpsvm-nav a {
        font-size: 0;
    }
    .wpsvm-nav a {
        justify-content: center;
        gap: 0;
        padding-inline: 0;
    }
    .wpsvm-nav a span {
        font-size: 19px;
    }
    .wpsvm-sidebar__title,
    .wpsvm-sidebar__links {
        justify-content: center;
        padding-inline: 0;
        font-size: 0;
    }
    .wpsvm-sidebar__links span {
        font-size: 17px;
    }
}

@media (max-width: 720px) {
    body:has(.wpsvm-library) .actcon-site-header {
        gap: 10px;
        padding-right: 14px !important;
        padding-left: 14px !important;
    }
    body:has(.wpsvm-library) .actcon-site-header .wpsvm-search {
        flex: 1 1 auto;
    }
    body:has(.wpsvm-library) .actcon-site-header .wpsvm-search button {
        width: 40px;
        flex: 0 0 40px;
    }
    .wpsvm-sidebar {
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 10;
        width: 0;
        flex-basis: 0;
        padding: 0;
        box-shadow: 12px 0 28px rgba(0, 0, 0, .45);
    }

    .wpsvm-library.is-sidebar-collapsed .wpsvm-sidebar {
        width: 0;
        flex-basis: 0;
        padding: 0;
    }

    .wpsvm-library:not(.is-sidebar-collapsed) .wpsvm-sidebar {
        width: 216px;
        flex-basis: 216px;
        padding: 20px 12px;
    }
    .wpsvm-app {
        padding: 0 14px 42px;
    }
    .wpsvm-menu {
        display: block;
    }
    .wpsvm-topbar {
        gap: 10px;
        height: 62px;
    }
    .wpsvm-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px 10px;
    }
    .wpsvm-card__body {
        gap: 7px;
    }
    .wpsvm-card__avatar {
        width: 28px;
        height: 28px;
        flex-basis: 28px;
        font-size: 11px;
    }
    .wpsvm-card h2 {
        font-size: 13px;
    }
}

@media (max-width: 460px) {
    body:has(.wpsvm-library) .actcon-site-header .wp-block-site-title {
        display: none;
    }
    body:has(.wpsvm-library) .actcon-site-header .wpsvm-search input {
        padding: 0 10px;
    }
    .wpsvm-grid {
        grid-template-columns: 1fr;
    }
    .wpsvm-card h2 {
        font-size: 15px;
    }
}
/* Biblioteca em tela cheia: somente sidebar e conteudo principal rolam. */
html:has(.wpsvm-library),
body:has(.wpsvm-library) {
    height: 100%;
    overflow: hidden;
}
body:has(.wpsvm-library) .wp-site-blocks,
body:has(.wpsvm-library) main.wp-block-group {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
body:has(.wpsvm-library) .entry-content,
body:has(.wpsvm-library) .wp-block-post-content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}
.wpsvm-library {
    width: 100%;
    height: 100%;
    min-height: 0;
    margin: 0;
    overflow: hidden;
}
.wpsvm-shell,
.wpsvm-sidebar,
.wpsvm-app {
    min-height: 0;
}
.wpsvm-sidebar {
    overscroll-behavior: contain;
}
.wpsvm-app {
    overscroll-behavior: contain;
}
.wpsvm-topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--wpsvm-bg);
}

/* Página individual de vídeo público. */
.wpsvm-card h2 a { color: inherit; text-decoration: none; }
.wpsvm-card h2 a:hover { text-decoration: underline; }
.wpsvm-library--watch .wpsvm-app { padding-top: 16px; }
.wpsvm-watch { width: 100%; }
.wpsvm-watch__layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 32%); gap: 24px; align-items: start; }
.wpsvm-watch__primary, .wpsvm-watch__suggestions { min-width: 0; }
.wpsvm-watch__player { display: grid; width: 100%; aspect-ratio: 16 / 9; place-items: center; overflow: hidden; border-radius: 12px; color: #ddd; background: #000; }
.wpsvm-watch__player iframe { width: 100%; height: 100%; border: 0; }
.wpsvm-watch__player .wpsvm-message { width: 100%; box-sizing: border-box; }
.wpsvm-watch__primary h1 { margin: 14px 0 12px; font-size: clamp(20px, 2vw, 26px); line-height: 1.3; }
.wpsvm-watch__meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px; }
.wpsvm-watch__channel { display: flex; align-items: center; gap: 10px; min-width: 0; }
.wpsvm-watch__channel > span:last-child { display: grid; gap: 3px; min-width: 0; }
.wpsvm-watch__channel strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.wpsvm-watch__channel small { color: #aaa; font-size: 12px; }
.wpsvm-watch__share { min-height: 36px; padding: 8px 16px; border: 0; border-radius: 20px; color: #f1f1f1; background: #303030; font-size: 13px; font-weight: 700; cursor: pointer; }
.wpsvm-watch__share:hover { background: #454545; }
.wpsvm-watch__description { margin: 18px 0 30px; padding: 14px; border-radius: 10px; color: #ddd; background: #242424; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }
.wpsvm-watch__suggestions h2 { margin: 0 0 14px; color: #f1f1f1; font-size: 16px; }
.wpsvm-watch__suggestion { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; color: #f1f1f1; text-decoration: none; }
.wpsvm-watch__suggestion:hover strong { text-decoration: underline; }
.wpsvm-watch__thumb { position: relative; display: block; flex: 0 0 48%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: linear-gradient(135deg, #27374a, #526884); }
.wpsvm-watch__thumb img { width: 100%; height: 100%; object-fit: cover; }
.wpsvm-watch__thumb .wpsvm-card__preview { height: calc(100% + 46px); }
.wpsvm-watch__thumb small { position: absolute; z-index: 2; right: 5px; bottom: 5px; padding: 2px 4px; border-radius: 3px; color: #fff; background: #000c; font-size: 11px; }
.wpsvm-watch__suggestion-text { display: grid; gap: 5px; min-width: 0; }
.wpsvm-watch__suggestion-text strong { display: -webkit-box; overflow: hidden; font-size: 13px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.wpsvm-watch__suggestion-text small { color: #aaa; font-size: 12px; }
.wpsvm-watch__unavailable { padding: 40px 24px; color: #f1f1f1; text-align: center; }
.wpsvm-watch__unavailable a { color: #f1f1f1; }
@media (max-width: 900px) {
    .wpsvm-watch__layout { grid-template-columns: 1fr; }
    .wpsvm-watch__suggestions { margin-top: 10px; }
    .wpsvm-watch__suggestion { max-width: 680px; }
}
@media (max-width: 600px) {
    .wpsvm-library--watch .wpsvm-app { padding: 8px 12px 36px; }
    .wpsvm-watch__layout { gap: 18px; }
    .wpsvm-watch__player { border-radius: 6px; }
    .wpsvm-watch__thumb { flex-basis: 44%; }
}
