argui-prototipo.css
Estilos del marco y del modo prototipo: barra, insignias, notas de aclaración y panel de feedback.
/* Argui — andamiaje de prototipo trazable
* Estilos del marco del prototipo y del modo prototipo: barra, insignias de
* trazabilidad, notas de aclaración, marcadores de comentario y panel de feedback.
*
* Dos capas:
* - El marco (.argui-bar) se ve siempre, salvo en vista limpia (?limpio).
* - Todo lo que anota el lienzo solo aparece con .argui-proto-on en <html>;
* con el modo apagado el prototipo se ve como producción.
*
* Se pega inline en el archivo único del prototipo (ver README.md). */
:root {
--arg-accent: #2d6cdf;
--arg-note: #d97706;
--arg-bg: #0f172a;
--arg-fg: #f8fafc;
--arg-radius: 6px;
--arg-shadow: 0 4px 14px rgba(0, 0, 0, .18);
--arg-z: 2147483000;
}
/* ---- Marco del prototipo: barra fija, siempre visible ---- */
.argui-bar {
position: fixed;
inset: 0 0 auto 0;
z-index: var(--arg-z);
display: flex;
flex-wrap: wrap;
gap: 12px;
align-items: center;
padding: 8px 14px;
font: 13px/1.2 system-ui, sans-serif;
color: var(--arg-fg);
background: var(--arg-bg);
box-shadow: var(--arg-shadow);
}
.argui-marco body { padding-top: 44px; }
.argui-bar strong { font-weight: 700; }
.argui-bar .arg-spacer { flex: 1; }
.argui-bar .arg-count { opacity: .85; }
.argui-bar button {
border: 1px solid rgba(255, 255, 255, .25);
border-radius: var(--arg-radius);
background: transparent;
color: var(--arg-fg);
padding: 6px 10px;
font: 600 12px/1 system-ui, sans-serif;
cursor: pointer;
}
.argui-bar button:hover { background: rgba(255, 255, 255, .12); }
.argui-bar button:focus-visible,
.argui-switch:focus-within { outline: 2px solid var(--arg-fg); outline-offset: 2px; }
/* Aviso cuando el navegador no deja guardar (file:// en algunos navegadores) */
.argui-bar .arg-volatil {
padding: 2px 8px;
border-radius: var(--arg-radius);
background: rgba(217, 119, 6, .25);
color: #fde68a;
font-size: 12px;
}
/* Ranura para los controles del prototipo (rol, fase, escenario).
Queda vacía si el prototipo no declara ninguno. */
.argui-controles { display: flex; gap: 8px; align-items: center; }
.argui-controles:empty { display: none; }
.argui-controles select {
border: 1px solid rgba(255, 255, 255, .25);
border-radius: var(--arg-radius);
background: transparent;
color: var(--arg-fg);
padding: 5px 8px;
font: 12px/1 system-ui, sans-serif;
}
.argui-controles option { color: #1e293b; }
.argui-controles label { display: inline-flex; align-items: center; gap: 4px; opacity: .9; }
/* Bloques que no corresponden al rol / fase / escenario seleccionado.
Es visibilidad del prototipo, no del producto: aplica con el modo encendido o apagado. */
.argui-oculto { display: none !important; }
/* ---- Switch del modo prototipo ---- */
.argui-switch {
display: inline-flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
}
.argui-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.argui-switch .arg-track {
width: 34px;
height: 18px;
border-radius: 999px;
background: rgba(255, 255, 255, .25);
transition: background .15s ease;
position: relative;
flex: none;
}
.argui-switch .arg-track::after {
content: "";
position: absolute;
top: 2px;
left: 2px;
width: 14px;
height: 14px;
border-radius: 50%;
background: var(--arg-fg);
transition: transform .15s ease;
}
.argui-switch input:checked + .arg-track { background: var(--arg-accent); }
.argui-switch input:checked + .arg-track::after { transform: translateX(16px); }
/* ---- Insignia de trazabilidad junto a cada bloque [data-prd] ---- */
.argui-badge {
display: none;
align-items: center;
gap: 6px;
margin: 4px 0;
padding: 2px 8px;
border-radius: var(--arg-radius);
background: rgba(45, 108, 223, .12);
border: 1px dashed var(--arg-accent);
font: 600 11px/1.4 ui-monospace, monospace;
color: var(--arg-accent);
text-decoration: none;
cursor: pointer;
width: fit-content;
}
.argui-proto-on .argui-badge { display: inline-flex; }
.argui-badge .arg-comment {
border-left: 1px solid rgba(45, 108, 223, .4);
padding-left: 6px;
margin-left: 2px;
}
/* Resalte sutil de los bloques trazados, solo con el modo encendido */
.argui-proto-on [data-prd] {
outline: 1px dashed rgba(45, 108, 223, .35);
outline-offset: 3px;
}
/* ---- Nota de aclaración para el cliente ---- */
.argui-note {
display: none;
margin: 6px 0;
padding: 6px 10px;
border-left: 3px solid var(--arg-note);
background: rgba(217, 119, 6, .1);
border-radius: 0 var(--arg-radius) var(--arg-radius) 0;
font: 13px/1.4 system-ui, sans-serif;
color: #92400e;
}
.argui-proto-on .argui-note { display: block; }
.argui-note::before { content: "❓ "; }
/* ---- Panel modal de feedback / export ---- */
.argui-panel {
position: fixed;
inset: 0;
z-index: calc(var(--arg-z) + 1);
display: none;
align-items: center;
justify-content: center;
background: rgba(0, 0, 0, .45);
}
.argui-panel.arg-open { display: flex; }
.argui-panel .arg-card {
width: min(560px, 92vw);
max-height: 80vh;
overflow: auto;
background: #fff;
border-radius: 10px;
box-shadow: var(--arg-shadow);
padding: 20px;
font: 14px/1.5 system-ui, sans-serif;
color: #1e293b;
}
.argui-panel h2 { margin: 0 0 4px; font-size: 16px; }
.argui-panel textarea {
width: 100%;
min-height: 80px;
margin: 8px 0;
padding: 8px;
border: 1px solid #cbd5e1;
border-radius: var(--arg-radius);
font: inherit;
resize: vertical;
box-sizing: border-box;
}
.argui-panel .arg-actions { display: flex; gap: 8px; justify-content: flex-end; }
.argui-panel .arg-actions button {
border: 0;
border-radius: var(--arg-radius);
padding: 8px 14px;
font: 600 13px/1 system-ui, sans-serif;
cursor: pointer;
}
.argui-panel .arg-primary { background: var(--arg-accent); color: #fff; }
.argui-panel .arg-ghost { background: #e2e8f0; color: #1e293b; }
.argui-panel ul { padding-left: 18px; }
.argui-panel .arg-ref { font: 600 12px ui-monospace, monospace; color: var(--arg-accent); }