/**
 * Vídeo "Flow PMC + MCP": a IA aplicando o tema da PMC no projeto do usuário.
 * Segundo vídeo da série (irmão de css/login-tema-portal.css): reaproveita a base .pmcSim
 * (palco 1280x840, brilhos, janela, legendas, selo) e acrescenta só o que é novo.
 * Escopo: .mcpSim (usado junto de .pmcSim). Todo movimento é feito por flow-mcp.js a partir do tempo t.
 */

/* ============================================================
 * TOKENS (cores, tipografia, espaçamento, raio). Nada solto abaixo.
 * ============================================================ */
.mcpSim {
    /* marca (herdadas de .pmcSim: --pmc-primary, --pmc-accent, --pmc-soft...) */
    --mcp-ok: #2f9e5b;
    --mcp-glass: rgba(10, 21, 34, 0.82);
    --mcp-glass-line: rgba(255, 255, 255, 0.14);
    --mcp-on-dark: rgba(255, 255, 255, 0.88);
    --mcp-on-dark-2: rgba(255, 255, 255, 0.62);
    --mcp-line: rgba(127, 169, 227, 0.55);

    /* projeto genérico (sem identidade) */
    --gen-bg: #ececec;
    --gen-head: #e1e1e1;
    --gen-line: #c4c4c4;
    --gen-surface: #f5f5f5;
    --gen-text: #555555;
    --gen-muted: #8c8c8c;
    --gen-link: #5f6f95;
    --gen-btn: #dcdcdc;
    --gen-control: #9a9a9a;
    --gen-font: Arial, Helvetica, sans-serif;

    /* tema PMC claro */
    --lt-bg: #f4f7f6;
    --lt-head: #ffffff;
    --lt-surface: #ffffff;
    --lt-input: #ffffff;
    --lt-text: #202121;
    --lt-text2: #666666;
    --lt-brand: #004f9f;
    --lt-line: #e8e8e8;
    --lt-chip: #e5eef8;

    /* tema PMC escuro (mesmos tokens do modo-escuro.css da Identidade Visual) */
    --dk-bg: #0f0e0e;
    --dk-head: #0f0e0e;
    --dk-surface: #22252b;
    --dk-input: #16181d;
    --dk-text: #ffffff;
    --dk-text2: #b7b7be;
    --dk-brand: #7fa9e3;
    --dk-line: #343840;
    --dk-chip: #0c1c2e;

    /* escala de espaçamento e raios (estáticos) */
    --sp-1: 8px;
    --sp-2: 16px;
    --sp-3: 24px;
    --sp-4: 32px;
    --sp-5: 48px;
    --r-sm: 8px;
    --r-md: 16px;
    --r-lg: 28px;
    --r-pill: 999px;

    /* tipografia */
    --fs-hero: 104px;
    --fs-sub: 32px;
    --fs-label: 20px;
    --fs-small: 14px;
    --font-mono: Consolas, "Courier New", monospace;
}

.mcpSim .mcpScene {
    position: absolute;
    inset: 0;
    display: none;
    pointer-events: none;
}

/* a janela é única e viaja entre as cenas por transform (origem no canto) */
.mcpSim .mcpWin {
    left: 0;
    top: 0;
    width: 1100px;
    height: 650px;
    transform-origin: 0 0;
    display: none;
}

/* ============================================================
 * CENA 3: CONEXÃO (Projeto <-> IA <-> MCP)
 * ============================================================ */

.mcpGraph {
    position: absolute;
    left: 0;
    top: 0;
    width: 1280px;
    height: 840px;
    transform-origin: 0 0;
}

.mcpLines {
    position: absolute;
    left: 0;
    top: 0;
    width: 1280px;
    height: 840px;
    overflow: visible;
}

.mcpLines path {
    fill: none;
    stroke-linecap: round;
}

.mcpLine__base {
    stroke: var(--mcp-line);
    stroke-width: 3;
    opacity: 0.35;
}

.mcpLine__draw {
    stroke: var(--pmc-accent);
    stroke-width: 3;
}

.mcpPulse {
    position: absolute;
    left: -7px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 16px 5px var(--pmc-accent);
    opacity: 0;
}

.mcpPulse--back {
    background: var(--pmc-green-light);
    box-shadow: 0 0 16px 5px var(--pmc-green);
}

.mcpNode__lbl {
    position: absolute;
    text-align: center;
    color: var(--mcp-on-dark);
    font-family: var(--font-b);
    font-size: var(--fs-label);
    line-height: 26px;
}

.mcpNode__lbl small {
    display: block;
    margin-top: 4px;
    font-family: var(--font-r);
    font-size: var(--fs-small);
    color: var(--mcp-on-dark-2);
}

.mcpAi {
    position: absolute;
    left: 545px;
    top: 305px;
    width: 190px;
    height: 190px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(61, 165, 244, 0.28), rgba(0, 79, 159, 0.5));
    border: 2px solid var(--pmc-accent);
    box-shadow: 0 0 60px rgba(61, 165, 244, 0.45);
}

.mcpAi__ring {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--pmc-accent);
    opacity: 0;
}

.mcpAi svg {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 92px;
    height: 92px;
    margin: -46px 0 0 -46px;
    color: #fff;
}

.mcpMcp {
    position: absolute;
    left: 950px;
    top: 305px;
    width: 280px;
    height: 190px;
    border-radius: var(--r-lg);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45), 0 0 50px rgba(61, 165, 244, 0.35);
}

.mcpMcp img {
    /* logoFlowPmcPreta.svg é ~2,1:1: 120px de largura = ~56px de altura, centralizada no espaço acima da legenda */
    position: absolute;
    left: 80px;
    top: 48px;
    width: 120px;
    height: auto;
}

.mcpMcp__tag {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 26px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--pmc-primary);
}

.mcpMsg {
    position: absolute;
    left: 0;
    top: 0;
    width: 164px;
    height: 34px;
    line-height: 32px;
    text-align: center;
    border-radius: var(--r-pill);
    background: var(--mcp-glass);
    border: 1px solid var(--mcp-glass-line);
    color: var(--mcp-on-dark);
    font-family: var(--font-mono);
    font-size: 14px;
    white-space: nowrap;
}

/* selo "Conectado" (reaproveita .sim-seal; só reposiciona) */
.mcpSim .mcpSeal {
    top: 150px;
    margin-left: -140px;
    width: 280px;
}

.mcpSim .mcpSeal b {
    font-size: 21px;
}

/* ============================================================
 * CENA 4: PEDIDO À IA E TOOLS
 * ============================================================ */

.mcpPrompt {
    position: absolute;
    left: 50%;
    top: 360px;
    width: 780px;
    height: 84px;
    margin-left: -390px;
    border-radius: 24px;
    background: var(--mcp-glass);
    border: 1.5px solid var(--mcp-glass-line);
    /* realce de borda superior (reflexo do vidro) + sombra */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 24px 60px rgba(0, 0, 0, 0.4);
}

.mcpPrompt__ico {
    position: absolute;
    left: var(--sp-3);
    top: 24px;
    width: 36px;
    height: 36px;
    color: var(--pmc-accent);
}

.mcpPrompt__txt {
    position: absolute;
    left: 78px;
    top: 0;
    right: 90px;
    line-height: 84px;
    font-size: 28px;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
}

.mcpPrompt__caret {
    display: inline-block;
    width: 2px;
    height: 30px;
    margin-left: 3px;
    vertical-align: -5px;
    background: var(--pmc-accent);
}

.mcpPrompt__send {
    position: absolute;
    right: var(--sp-2);
    top: 18px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--pmc-primary);
    color: #fff;
}

.mcpPrompt__send svg {
    position: absolute;
    left: 12px;
    top: 12px;
    width: 24px;
    height: 24px;
}

.mcpPrompt__lbl {
    position: absolute;
    left: 50%;
    top: 322px;
    width: 780px;
    margin-left: -390px;
    font-size: 16px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--mcp-on-dark-2);
}

.mcpTool {
    position: absolute;
    left: 0;
    top: 0;
    width: 372px;
    height: 74px;
    border-radius: var(--r-md);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
    color: var(--lt-text);
    transform-origin: 0 0;
}

.mcpTool__name {
    position: absolute;
    left: 20px;
    top: 14px;
    font-family: var(--font-mono);
    font-size: 17px;
    color: var(--pmc-primary);
}

.mcpTool__desc {
    position: absolute;
    left: 20px;
    top: 42px;
    font-size: 15px;
    color: var(--lt-text2);
}

.mcpTool__st {
    position: absolute;
    right: 18px;
    top: 21px;
    width: 32px;
    height: 32px;
}

.mcpTool__spin {
    position: absolute;
    inset: 4px;
    border-radius: 50%;
    border: 3px solid var(--lt-chip);
    border-top-color: var(--pmc-primary);
}

.mcpTool__ok {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--mcp-ok);
}

.mcpTool__ok svg {
    position: absolute;
    inset: 6px;
    width: 20px;
    height: 20px;
}

/* ============================================================
 * CENA 5/6: PROJETO (genérico -> PMC claro/escuro)
 * ============================================================ */

.mcpPg,
.mcpPgB {
    position: absolute;
    left: 0;
    top: 44px;
    width: 1100px;
    height: 606px;
    overflow: hidden;
    background: var(--gen-bg);
}

.mcpCmp__after .mcpPgB {
    top: 0;
}

.mcpPg > *,
.mcpPgB > * {
    position: absolute;
}

.mcpPg span,
.mcpPg b,
.mcpPg em,
.mcpPg i,
.mcpPgB span,
.mcpPgB b,
.mcpPgB em,
.mcpPgB i {
    position: absolute;
    white-space: nowrap;
    font-style: normal;
    font-weight: normal;
}

.mcpPg u,
.mcpPgB u {
    text-decoration: none;
}

.mcpHd {
    z-index: 4;
}

.mcpCdChev {
    position: absolute;
}

/* cabeçalho */
.mcpH {
    left: 0;
    top: 0;
    width: 1100px;
    height: 72px;
    z-index: 3;
}

.mcpH__strip {
    left: 0;
    top: 0;
    height: 4px;
    width: 0;
    background: var(--lt-brand);
}

.mcpLogoG {
    left: 36px;
    top: 14px;
    width: 104px;
    height: 44px;
    line-height: 42px;
    text-align: center;
    border: 1px dashed var(--gen-control);
    color: var(--gen-muted);
    font-family: var(--gen-font);
    font-size: 13px;
}

.mcpLogoP {
    left: 36px;
    top: 14px;
    width: 145px;
    height: 44px;
    border-radius: var(--r-sm);
}

.mcpLogoP img {
    position: absolute;
    left: 0;
    top: 0;
    width: 145px;
    height: 44px;
}

.mcpBrandG,
.mcpBrandP {
    left: 220px;
    top: 0;
    line-height: 72px;
}

.mcpBrandG {
    font-family: var(--gen-font);
    font-size: 15px;
    color: var(--gen-text);
}

.mcpBrandP {
    font-family: var(--font-r);
    font-size: 17px;
}

.mcpNvG,
.mcpNvP {
    top: 0;
    line-height: 72px;
}

.mcpNvG {
    font-family: var(--gen-font);
    font-size: 14px;
    color: var(--gen-link);
    text-decoration: underline;
}

.mcpNvP {
    font-family: var(--font-r);
    font-size: 16px;
}

.mcpNvUl {
    top: 50px;
    height: 3px;
    border-radius: 2px;
    background: var(--lt-brand);
    transform-origin: 0 50%;
}

.mcpAv {
    right: 36px;
    top: 18px;
    width: 36px;
    height: 36px;
    background: var(--gen-line);
}

.mcpAv b {
    left: 0;
    top: 0;
    width: 36px;
    line-height: 36px;
    text-align: center;
    font-family: var(--font-b);
    font-size: 13px;
    color: #fff;
}

/* abas */
.mcpTabs {
    left: 0;
    top: 92px;
    width: 1100px;
    height: 44px;
}

.mcpTbBox {
    top: 0;
    height: 40px;
    border: 1px solid var(--gen-line);
    background: var(--gen-surface);
}

.mcpTbG,
.mcpTbP {
    top: 0;
    height: 40px;
    line-height: 40px;
    text-align: center;
}

.mcpTbG {
    font-family: var(--gen-font);
    font-size: 14px;
    color: var(--gen-text);
}

.mcpTbP {
    font-family: var(--font-r);
    font-size: 16px;
}

.mcpTbUl {
    top: 38px;
    height: 3px;
    border-radius: 2px;
    background: var(--lt-brand);
}

.mcpTbLine {
    left: 36px;
    top: 41px;
    height: 1px;
}

/* título */
.mcpTtG,
.mcpTtP {
    left: 36px;
    top: 156px;
}

.mcpTtG {
    font-family: var(--gen-font);
    font-size: 28px;
    line-height: 34px;
    font-weight: bold;
    color: var(--gen-text);
}

.mcpTtP {
    font-family: var(--font-b);
    font-size: 38px;
    line-height: 46px;
    letter-spacing: -0.4px;
}

.mcpSubP {
    left: 36px;
    top: 204px;
    font-family: var(--font-r);
    font-size: 17px;
    line-height: 24px;
}

/* campo de busca e botão */
.mcpIn {
    border-style: solid;
    border-color: var(--gen-control);
    background: #fff;
}

.mcpIn svg {
    position: absolute;
    left: 18px;
    top: 12px;
    width: 22px;
    height: 22px;
}

.mcpInG,
.mcpInP {
    top: 0;
}

.mcpInG {
    font-family: var(--gen-font);
    font-size: 14px;
    color: var(--gen-muted);
}

.mcpInP {
    font-family: var(--font-r);
    font-size: 16px;
}

.mcpBt {
    overflow: hidden;
    background: var(--gen-btn);
    border: 1px solid var(--gen-control);
}

.mcpBtG,
.mcpBtP {
    left: 0;
    top: 0;
    width: 100%;
    text-align: center;
}

.mcpBtG {
    font-family: var(--gen-font);
    font-size: 14px;
    color: #222;
}

.mcpBtP {
    font-family: var(--font-b);
    font-size: 17px;
    color: #fff;
}

/* cards */
.mcpCd {
    border-style: solid;
    border-color: var(--gen-line);
    background: var(--gen-surface);
}

.mcpCdG,
.mcpCdP {
    white-space: nowrap;
}

.mcpCdG {
    left: 14px;
    top: 14px;
    font-family: var(--gen-font);
    font-size: 17px;
    font-weight: bold;
    color: var(--gen-text);
}

.mcpCdGd {
    left: 14px;
    top: 42px;
    font-family: var(--gen-font);
    font-size: 13px;
    color: var(--gen-muted);
}

.mcpCdP {
    left: 24px;
    top: 86px;
    font-family: var(--font-b);
    font-size: 22px;
    line-height: 28px;
}

.mcpCdPd {
    left: 24px;
    top: 120px;
    font-family: var(--font-r);
    font-size: 15px;
}

.mcpCdIco {
    left: 24px;
    top: 22px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.mcpCdIco svg {
    position: absolute;
    inset: 13px;
    width: 26px;
    height: 26px;
}

.mcpCdChev {
    right: 24px;
    top: 30px;
    width: 18px;
    height: 18px;
}

/* indicador "aplicado" */
.mcpOk {
    left: 0;
    top: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--mcp-ok);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28), 0 0 0 3px #fff;
    z-index: 15;
}

.mcpOk svg {
    position: absolute;
    inset: 6px;
    width: 16px;
    height: 16px;
}

/* assistente de IA que percorre os componentes */
.mcpAgent {
    position: absolute;
    left: 0;
    top: 0;
    height: 36px;
    padding: 0 var(--sp-2) 0 44px;
    line-height: 36px;
    border-radius: var(--r-pill);
    background: var(--pmc-primary);
    color: #fff;
    font-family: var(--font-b);
    font-size: 15px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4), 0 0 24px rgba(61, 165, 244, 0.7);
    z-index: 40;
    white-space: nowrap;
}

.mcpAgent svg {
    position: absolute;
    left: 10px;
    top: 7px;
    width: 22px;
    height: 22px;
}

/* selo do MCP que origina os tokens */
.mcpBadge {
    position: absolute;
    left: 0;
    top: 0;
    height: 48px;
    width: 232px;
    border-radius: var(--r-pill);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 0 30px rgba(61, 165, 244, 0.4);
    z-index: 35;
}

.mcpBadge img {
    /* altura fixa (26px) dentro do selo de 48px; a largura segue a proporção ~2,1:1 */
    position: absolute;
    left: 20px;
    top: 11px;
    height: 26px;
    width: auto;
}

.mcpBadge span {
    position: absolute;
    left: 98px;
    top: 0;
    line-height: 48px;
    font-family: var(--font-b);
    font-size: 15px;
    color: var(--pmc-primary);
}

/* tokens em voo */
.mcpTok {
    position: absolute;
    left: 0;
    top: 0;
    height: 56px;
    padding: 0 var(--sp-3) 0 62px;
    line-height: 56px;
    border-radius: var(--r-md);
    background: var(--mcp-glass);
    border: 1px solid var(--mcp-glass-line);
    color: #fff;
    font-size: 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16), 0 0 28px rgba(61, 165, 244, 0.5);
    white-space: nowrap;
    z-index: 38;
}

.mcpTok__ico {
    position: absolute;
    left: 10px;
    top: 10px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--lt-chip);
    color: var(--pmc-primary);
    overflow: hidden;
}

.mcpTok__ico svg {
    position: absolute;
    inset: 6px;
    width: 24px;
    height: 24px;
}

.mcpTok__sw {
    position: absolute;
    top: 8px;
    width: 9px;
    height: 20px;
    border-radius: 3px;
}

/* alternância claro/escuro */
.mcpToggle {
    position: absolute;
    left: 0;
    top: 0;
    width: 84px;
    height: 34px;
    border-radius: var(--r-pill);
    background: #d6dde6;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    z-index: 40;
}

.mcpToggle__knob {
    position: absolute;
    left: 4px;
    top: 4px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.mcpToggle span {
    position: absolute;
    top: 0;
    width: 18px;
    height: 34px;
}

.mcpToggle svg {
    position: absolute;
    top: 8px;
    width: 18px;
    height: 18px;
    color: var(--lt-text2);
}

/* comparativo antes/depois */
.mcpCmp__after {
    position: absolute;
    left: 0;
    top: 44px;
    width: 1100px;
    height: 606px;
    display: none;
}

.mcpDiv {
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 650px;
    margin-left: -2px;
    background: #fff;
    box-shadow: 0 0 20px rgba(61, 165, 244, 0.9);
    z-index: 50;
    visibility: hidden;
}

.mcpDiv__knob {
    position: absolute;
    left: -22px;
    top: 300px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.4);
}

.mcpDiv__knob svg {
    position: absolute;
    left: 10px;
    top: 14px;
    width: 28px;
    height: 20px;
    color: var(--pmc-primary);
}

.mcpDiv__tag {
    position: absolute;
    bottom: 12px;
    height: 36px;
    line-height: 36px;
    padding: 0 var(--sp-2);
    border-radius: var(--r-pill);
    background: var(--mcp-glass);
    color: #fff;
    font-family: var(--font-b);
    font-size: 15px;
    white-space: nowrap;
}

.mcpDiv__tag--l {
    right: 18px;
}

.mcpDiv__tag--r {
    left: 18px;
    background: var(--pmc-primary);
}

/* ============================================================
 * CONTROLES (iguais em linguagem aos do primeiro vídeo)
 * ============================================================ */

.mcpSim .mcpPlayer {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 60;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: var(--sp-1);
    padding: 6px 12px;
    border-radius: var(--r-pill);
    background: rgba(8, 14, 22, 0.72);
    backdrop-filter: blur(10px);
    font-family: var(--font-r);
    font-size: 12px;
    color: rgba(255, 255, 255, 0.9);
}

.mcpSim .mcpPlayer button {
    border: 0;
    background: rgba(255, 255, 255, 0.12);
    color: inherit;
    border-radius: 6px;
    width: 30px;
    height: 28px;
    cursor: pointer;
    font-size: 13px;
}

.mcpSim .mcpPlayer button:hover,
.mcpSim .mcpPlayer button:focus-visible {
    background: rgba(255, 255, 255, 0.24);
}

.mcpSim .mcpPlayer input[type="range"] {
    width: min(360px, 40vw);
}

.mcpSim .mcpPlayer span {
    min-width: 76px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Versão reduzida: sem transições do navegador; o JS também reduz os deslocamentos. */
@media (prefers-reduced-motion: reduce) {
    .mcpSim * {
        transition: none !important;
        animation: none !important;
    }
}
