/* b10-operador.css — drawer "Operador" do dono (botão no topo, pendências, conversa).
   Só tokens do painel (--bg-header, --bg-sidebar, --bg-main, --border, --text-main,
   --text-secondary, --accent); escala: raio 8/12, espaço múltiplo de 4, 120 ms. */

.op-botao {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 120ms ease;
}
.op-botao:hover, .op-botao--ativo { color: var(--accent); }
.op-botao--trabalhando i { animation: op-pulsar 1.4s ease-in-out infinite; }
.op-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
}

/* `[hidden]` PERDE para o `display:flex` da classe (pegadinha nº 4 do mapa): sem esta regra o
   drawer nascia escondido no JS e aparecia vazio, tampando 440px do lado direito do painel do
   dono — inclusive a doca do Copiloto e o seletor de instância (medido em 15/09/2026). */
.op-fundo[hidden],
.op-drawer[hidden] {
    display: none !important;
}
.op-fundo {
    position: fixed;
    inset: 0;
    z-index: 11990;
    background: rgba(0, 0, 0, .28);
}
.op-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 11995;
    width: min(440px, 100vw);
    display: flex;
    flex-direction: column;
    background: var(--bg-sidebar);
    border-left: 1px solid var(--border);
    box-shadow: -8px 0 32px rgba(0, 0, 0, .18);
    color: var(--text-main);
    font-size: 14px;
    animation: op-entrar 160ms ease;
}
@keyframes op-entrar { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes op-pulsar { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.op-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    background: var(--bg-header);
}
.op-cabecalho__titulo { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.op-fechar {
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
}
.op-fechar:hover { background: var(--bg-main); color: var(--text-main); }

.op-secao { padding: 16px 20px; overflow: auto; }
.op-secao--conversa { flex: 1; display: flex; flex-direction: column; min-height: 0; border-top: 1px solid var(--border); }
.op-secao__titulo {
    margin: 0 0 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 8px;
}
.op-contagem { min-width: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; line-height: 20px; text-align: center; }
.op-vazio { margin: 0; color: var(--text-secondary); line-height: 1.5; }
.op-tag { font-size: 11px; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-secondary); }
.op-tag--desligado { border-color: #e5484d; color: #e5484d; }

.op-pendencia {
    padding: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    background: var(--bg-header);
}
.op-pendencia--decidida { border-left-color: var(--border); opacity: .8; }
.op-pendencia__topo { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.op-numero { font-weight: 600; color: var(--accent); }
.op-quando { margin-left: auto; font-size: 11px; color: var(--text-secondary); }
.op-pendencia__titulo { font-weight: 600; line-height: 1.4; }
.op-pendencia__contexto { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.op-acao { color: var(--text-main); }
.op-pendencia__botoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.op-pendencia__decisao { margin-top: 8px; font-size: 13px; color: var(--text-secondary); }
.op-decididas { margin-top: 8px; }
.op-decididas summary { cursor: pointer; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; }
.op-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-main);
    color: var(--text-main);
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    transition: background 120ms ease, border-color 120ms ease;
}
.op-btn:hover:not(:disabled) { border-color: var(--accent); }
.op-btn:disabled { opacity: .5; cursor: default; }
.op-btn--sim { background: var(--accent); border-color: var(--accent); color: #fff; }

.op-conversa { flex: 1; min-height: 120px; overflow: auto; display: flex; flex-direction: column; gap: 8px; padding-bottom: 8px; }
.op-msg { max-width: 92%; padding: 10px 12px; border-radius: 12px; line-height: 1.5; }
.op-msg--dono { align-self: flex-end; background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.op-msg--operador { align-self: flex-start; background: var(--bg-header); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.op-msg--erro { border-color: #e5484d; }
.op-msg--aviso { opacity: .8; }
.op-msg__meta { margin-top: 4px; font-size: 11px; opacity: .7; }
.op-msg--dono .op-msg__meta { text-align: right; }
.op-pontos { display: inline-flex; gap: 3px; vertical-align: middle; margin-right: 4px; }
.op-pontos i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-secondary); animation: op-pulsar 1.2s ease-in-out infinite; }
.op-pontos i:nth-child(2) { animation-delay: .2s; }
.op-pontos i:nth-child(3) { animation-delay: .4s; }

.op-composer { display: flex; gap: 8px; align-items: flex-end; padding-top: 12px; border-top: 1px solid var(--border); }
.op-campo {
    flex: 1;
    resize: none;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-main);
    color: var(--text-main);
    font: inherit;
    line-height: 1.4;
}
.op-campo:focus { outline: none; border-color: var(--accent); }
.op-enviar {
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
}
.op-enviar:disabled { opacity: .5; cursor: default; }

@media (max-width: 600px) {
    .op-drawer { width: 100vw; }
    .op-msg { max-width: 100%; }
}
