/* WA Link: app-only styles. Same look as Impose: full-width .wrap aligned with the
   header and hero, compact panels, small pill buttons. Shared chrome and tokens: assets/site.css. */

/* Layout: one column, steps 1 to 4 in reading order, left edge aligned with the hero. */
.tool { padding-top: 8px; padding-bottom: 64px; }
.app, .gate { display: flex; flex-direction: column; gap: 14px; max-width: 760px; }
.app[hidden], .gate[hidden] { display: none; }
.col { display: contents; }

/* Panels (as in Impose) */
.panel { background: var(--raised); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; font-family: 'Plus Jakarta Sans',sans-serif; font-weight: 600; font-size: 14.5px; color: var(--ti); letter-spacing: .01em; }
.ph-t { display: inline-flex; align-items: center; gap: 10px; }
.pb { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line2); }
.tag, .badge { font-family: 'Inter',system-ui,sans-serif; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); font-weight: 400; white-space: nowrap; }
.badge.ok { color: var(--ok); }
.badge.warn { color: var(--warn); }
.step { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: var(--grad); color: var(--btn-ink); font-size: 12px; font-weight: 700; flex: none; text-shadow: var(--btn-ink-shadow); }

/* Notes and status: one quiet style */
.note { border-left: 2px solid var(--gold); padding: 2px 0 2px 12px; font-size: 13px; line-height: 1.5; color: var(--dim); }
.note[data-state="ok"] { border-left-color: var(--ok); }
.note[data-state="warn"] { border-left-color: var(--warn); }
.note[data-state="no"] { border-left-color: var(--err); }
.status { font-size: 13px; min-height: 0; margin: 0; }
.status:empty { display: none; }
.status[data-ok="yes"] { color: var(--ok); }
.status[data-ok="no"] { color: var(--err); }
.lbl { font-family: 'Inter',system-ui,sans-serif; font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-top: 4px; }

/* Fields */
.fld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.fld > label { font-size: 12px; color: var(--dim); letter-spacing: .02em; }
.pb-form { display: flex; flex-direction: column; gap: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--dim); }
.tool input[type="text"], .tool input[type="tel"], .tool textarea, .tool select {
  width: 100%; font: inherit; font-size: 13.5px; color: var(--ti); background: var(--bg);
  border: 1px solid var(--line); border-radius: 9px; padding: 0 12px; height: 40px;
  transition: border-color .2s;
}
.tool textarea { height: auto; min-height: 84px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.tool select { cursor: pointer; }
.tool input:focus, .tool textarea:focus, .tool select:focus { outline: none; border-color: var(--gold); }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1 1 auto; min-width: 0; }

/* Buttons: one system. Same height and shape everywhere. */
.tool .btn { height: 40px; padding: 0 20px; font-size: 13.5px; white-space: nowrap; flex: none; }
.tool .btn-danger { background: transparent; color: var(--err); border: 1px solid color-mix(in srgb, var(--err) 55%, var(--line)); }
.tool .btn-danger:hover { background: color-mix(in srgb, var(--err) 10%, transparent); border-color: var(--err); color: var(--err); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.actions.sep { border-top: 1px solid var(--line2); padding-top: 12px; margin-top: 2px; }
.file { position: relative; overflow: hidden; cursor: pointer; }
.file input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }

/* Checkbox rows */
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 13.5px; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--gold); flex: none; }
.check.small { font-size: 13px; margin: 10px 0 0; }

/* Saved messages */
.list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin: 0; }
.item { background: var(--bg); border: 1px solid var(--line2); border-radius: 12px; padding: 12px; }
.item-head { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; justify-content: space-between; }
.item-title { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; min-width: 0; }
.item-title strong { font-family: 'Plus Jakarta Sans',sans-serif; font-weight: 600; font-size: 13.5px; color: var(--ti); word-break: break-word; }
.acts { display: flex; gap: 6px; }
.empty { color: var(--dim); font-size: 13px; }

/* WhatsApp-style preview */
.wa-chat { --wa-bg: #0B141A; --wa-out: #005C4B; --wa-ink: #E9EDEF; --wa-time: #8FB8B0;
  background: var(--wa-bg); border-radius: 10px; padding: 12px 10px; margin-top: 8px; }
html.light .wa-chat { --wa-bg: #EFEAE2; --wa-out: #D9FDD3; --wa-ink: #111B21; --wa-time: #667781; }
.wa-bubble { position: relative; margin-left: auto; margin-right: 8px; max-width: min(92%, 440px); background: var(--wa-out); color: var(--wa-ink);
  border-radius: 9px 0 9px 9px; padding: 6px 9px 5px; font-family: 'Inter', system-ui, sans-serif; font-size: 13.5px; line-height: 1.4; }
.wa-bubble::after { content: ""; position: absolute; top: 0; right: -7px; border: 7px solid transparent; border-top-color: var(--wa-out); border-left-color: var(--wa-out); }
.wa-text { margin: 0; white-space: normal; word-break: break-word; overflow-wrap: anywhere; }
.wa-text code { font-family: ui-monospace,Menlo,Consolas,monospace; font-size: .9em; background: none; border: 0; padding: 0; color: inherit; }
.wa-time { display: block; text-align: right; font-size: 10.5px; color: var(--wa-time); margin-top: 2px; }
.item .wa-chat { margin: 10px 0 0; }

/* Result */
.out { display: flex; flex-direction: column; gap: 10px; padding-top: 12px; border-top: 1px solid var(--line2); }
.link { display: block; background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 10px 12px; font-family: ui-monospace,Menlo,Consolas,monospace; font-size: 12px; line-height: 1.5; word-break: break-all; color: var(--ti); }

/* Disclaimer gate */
.disclaimer { max-height: 280px; overflow: auto; background: var(--bg); border: 1px solid var(--line2); border-radius: 10px; padding: 12px 16px; font-size: 13.5px; color: var(--text); }
.disclaimer ul { padding-left: 20px; margin: 8px 0 0; }
.disclaimer li { margin: 6px 0; }
.disclaimer li::marker { color: var(--gold); }

@media (max-width: 560px) {
  .ph { padding: 12px 14px; }
  .pb { padding: 14px; }
  .grid2 { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 auto; }
}
