/* Nexus Focus — componentes de IA (gravador de depoimento, ditado, leitura). Autor: Murilo Aita Marques */
body { font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size-adjust: from-font; }
.nx-ia-quadro { border: 1px dashed rgb(203 213 225); border-radius: .75rem; padding: .875rem 1rem; background: rgb(248 250 252); display: flex; flex-direction: column; gap: .625rem; }
.dark .nx-ia-quadro { border-color: rgb(71 85 105); background: rgb(30 41 59 / .5); }
.nx-ia-linha { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .875rem; }
.nx-ia-btn { display: inline-flex; align-items: center; gap: .375rem; border-radius: .5rem; padding: .5rem .875rem; font-size: .875rem; font-weight: 600; line-height: 1.25rem; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, opacity .15s; }
.nx-ia-btn:disabled { opacity: .5; cursor: not-allowed; }
.nx-ia-btn-primario { background: rgb(79 70 229); color: #fff; }
.nx-ia-btn-primario:hover:not(:disabled) { background: rgb(67 56 202); }
.nx-ia-btn-gravando { background: rgb(220 38 38); color: #fff; animation: nx-pulso 1.2s ease-in-out infinite; }
.nx-ia-btn-secundario { background: #fff; color: rgb(51 65 85); border-color: rgb(203 213 225); }
.dark .nx-ia-btn-secundario { background: rgb(30 41 59); color: rgb(226 232 240); border-color: rgb(71 85 105); }
.nx-ia-btn-secundario:hover:not(:disabled) { background: rgb(241 245 249); }
.dark .nx-ia-btn-secundario:hover:not(:disabled) { background: rgb(51 65 85); }
.nx-ia-pilula { border-radius: 9999px; padding: .25rem .75rem; font-size: .8125rem; }
.nx-ia-dica { font-size: .8125rem; color: rgb(100 116 139); }
.dark .nx-ia-dica { color: rgb(148 163 184); }
.nx-ia-status { font-size: .875rem; color: rgb(4 120 87); }
.dark .nx-ia-status { color: rgb(110 231 183); }
.nx-ia-erro { font-size: .875rem; color: rgb(185 28 28); }
.dark .nx-ia-erro { color: rgb(252 165 165); }
.nx-ia-link { text-decoration: underline; cursor: pointer; margin-left: .375rem; }
.nx-ia-check { display: inline-flex; align-items: center; gap: .375rem; font-size: .875rem; }
.nx-ia-lista { font-size: .8125rem; display: flex; flex-direction: column; gap: .25rem; }
.nx-ia-lista button { color: rgb(185 28 28); margin-left: .5rem; }
.nx-ia-player { width: 100%; max-width: 22rem; height: 2.25rem; }
.nx-ia-girando { width: 1rem; height: 1rem; border-radius: 9999px; border: 2px solid currentColor; border-right-color: transparent; animation: nx-gira .8s linear infinite; display: inline-block; }
@keyframes nx-pulso { 50% { opacity: .75; } }
@keyframes nx-gira { to { transform: rotate(360deg); } }

/* Barra e folha do ditado */
.nx-dit-barra { display: flex; justify-content: flex-end; margin-bottom: .25rem; }
.nx-dit-botao { display: inline-flex; align-items: center; gap: .25rem; border-radius: 9999px; padding: .2rem .7rem; font-size: .75rem; font-weight: 600; color: rgb(67 56 202); background: rgb(238 242 255); border: 1px solid rgb(199 210 254); cursor: pointer; }
.dark .nx-dit-botao { color: rgb(199 210 254); background: rgb(49 46 129 / .5); border-color: rgb(67 56 202); }
.nx-dit-fundo { position: fixed; inset: 0; z-index: 60; background: rgb(15 23 42 / .5); display: flex; align-items: center; justify-content: center; padding: 1rem; }
.nx-dit-folha { width: 100%; max-width: 37.5rem; max-height: 92vh; overflow: auto; background: #fff; color: rgb(15 23 42); border-radius: 1rem; box-shadow: 0 25px 50px -12px rgb(0 0 0 / .35); padding: 1.25rem; display: flex; flex-direction: column; gap: .75rem; }
.dark .nx-dit-folha { background: rgb(15 23 42); color: rgb(226 232 240); }
.nx-dit-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; }
.nx-dit-titulo { font-weight: 700; font-size: 1rem; }
.nx-dit-sub { font-size: .8125rem; color: rgb(100 116 139); }
.nx-dit-fechar { font-size: 1.5rem; line-height: 1; padding: 0 .25rem; cursor: pointer; background: none; border: 0; color: inherit; }
.nx-dit-mic { width: 4.5rem; height: 4.5rem; border-radius: 9999px; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; align-self: center; background: rgb(79 70 229); color: #fff; font-size: 1.75rem; }
.nx-dit-mic.nx-ativo { background: rgb(220 38 38); animation: nx-pulso 1.2s ease-in-out infinite; }
.nx-dit-area { width: 100%; min-height: 6rem; border-radius: .5rem; border: 1px solid rgb(203 213 225); padding: .5rem .625rem; font-size: .9375rem; background: #fff; color: inherit; resize: vertical; }
.dark .nx-dit-area { background: rgb(30 41 59); border-color: rgb(71 85 105); }
.nx-dit-rotulo { font-size: .8125rem; font-weight: 600; }
.nx-dit-acoes { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-end; }
@media (max-width: 768px) {
    .nx-dit-fundo { align-items: flex-end; padding: 0; }
    .nx-dit-folha { max-width: none; border-radius: 1.25rem 1.25rem 0 0; padding: 1.25rem 1rem calc(1rem + env(safe-area-inset-bottom)); }
    .nx-dit-mic { width: 6rem; height: 6rem; font-size: 2.25rem; }
    .nx-dit-area { font-size: 16px; }
    .nx-dit-acoes .nx-ia-btn { width: 100%; justify-content: center; }
    .nx-dit-botao { padding: .4rem .9rem; font-size: .875rem; }
}

/* Resultado de leitura de documento/print */
.nx-leitura-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .375rem 1rem; font-size: .875rem; }
.nx-leitura-campos dt { color: rgb(100 116 139); font-size: .75rem; }
.nx-leitura-alerta { border-radius: .5rem; padding: .5rem .75rem; font-size: .875rem; background: rgb(254 243 199); color: rgb(146 64 14); }
.dark .nx-leitura-alerta { background: rgb(120 53 15 / .4); color: rgb(253 230 138); }
