/* Vidori AI Hub demo page: layout, request form and WhatsApp-style simulator. Needs vidori.css (tokens + generic classes). */
.dm-main { max-width: 1040px; margin: 0 auto; padding: 28px 16px 48px; }
.dm-intro { max-width: 720px; margin: 0 auto 22px; text-align: center; }
.dm-intro h1 { font-size: 24px; font-weight: 400; color: var(--vd-link); margin-bottom: 8px; }
.dm-intro h1::after { content: ""; display: block; width: 44px; height: 2px; background: var(--vd-line-2); margin: 12px auto 0; }
.dm-intro p { margin: 12px 0 0; font-size: 14px; }

/* tabs */
.dm-tabs { display: flex; justify-content: center; gap: 0; margin: 0 auto 24px; max-width: 440px; border: 1px solid var(--vd-dark); }
.dm-tabs button {
  flex: 1; min-height: 44px; padding: 0 12px; background: #fff; color: var(--vd-dark); border: 0; border-radius: var(--vd-radius); cursor: pointer;
  font: 600 13px/1 var(--vd-font); text-transform: uppercase; letter-spacing: .04em;
}
.dm-tabs button + button { border-left: 1px solid var(--vd-dark); }
.dm-tabs button[aria-selected="true"] { background: var(--vd-dark); color: #fff; }
.dm-tabs button:focus-visible { outline: 2px solid var(--vd-red); outline-offset: -4px; }
.dm-panel[hidden] { display: none; }
/* the floating launcher would sit on top of the phone: the WhatsApp tab already has its own chat */
body[data-tab="wa"] .vc-launcher { display: none; }

/* request form */
.dm-form { max-width: 620px; margin: 0 auto; padding: 22px 20px; }
.dm-form h2 { font-size: 18px; font-weight: 600; margin-bottom: 6px; color: var(--vd-ink); }
.dm-lead { margin: 0 0 18px; font-size: 13px; }
.dm-check { display: flex; align-items: flex-start; gap: 10px; margin: 2px 0 14px; cursor: pointer; font-size: 13px; color: var(--vd-link); min-height: 32px; }
.dm-check input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--vd-red); }
.dm-check a { color: var(--vd-red); font-weight: 600; white-space: nowrap; }
.dm-recontact { border-left: 3px solid var(--vd-red); margin: 0 0 14px; background: var(--vd-bg-soft); padding: 12px 14px 0; display: flow-root; }
.dm-recontact[hidden] { display: none; }
.dm-error { margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--vd-red); background: #fff4f4; color: #8a0010; font-size: 13px; font-weight: 600; }
.dm-error[hidden] { display: none; }

/* WhatsApp tab layout */
.dm-wa-layout { display: flex; justify-content: center; align-items: flex-start; gap: 32px; }
.dm-wa-layout[hidden] { display: none; }
.dm-try { width: 320px; flex: none; }
.dm-try h2 { font-size: 18px; font-weight: 600; margin-bottom: 12px; color: var(--vd-ink); }
.dm-try p { margin: 0 0 10px; font-size: 13px; }
.dm-num { font-size: 20px; font-weight: 600; color: var(--vd-ink); letter-spacing: .02em; }
.dm-try code { display: inline-block; padding: 6px 10px; background: var(--vd-bg-soft); border: 1px solid var(--vd-line-2); font: 600 14px/1.3 Consolas, 'Courier New', monospace; color: var(--vd-ink); }

/* WhatsApp phone (own palette: intentionally not the Vidori look, it imitates the messaging app) */
.wa-phone {
  --wa-green: #008069; --wa-bubble-out: #d9fdd3; --wa-bg: #efe7de; --wa-meta: #667781; --wa-link: #027eb5;
  display: flex; flex-direction: column; width: 360px; height: min(640px, calc(100vh - 300px)); height: min(640px, calc(100dvh - 300px)); min-height: 480px; flex: none; overflow: hidden;
  background: var(--wa-bg); border: 10px solid #1d1d1f; border-radius: 34px; box-shadow: 0 14px 40px rgba(0, 0, 0, .25);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #111b21;
}
.wa-head { display: flex; align-items: center; gap: 10px; padding: 10px 8px 10px 12px; background: var(--wa-green); color: #fff; flex: none; }
.wa-avatar { width: 38px; height: 38px; border-radius: 50%; background: #fff; color: var(--wa-green); display: inline-flex; align-items: center; justify-content: center; font: 700 17px/1 system-ui, sans-serif; flex: none; }
.wa-head__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.wa-head__txt strong { font-size: 16px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-head__txt span { font-size: 12px; opacity: .85; }
.wa-iconbtn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: transparent; color: #fff; border-radius: 50%; cursor: pointer; flex: none; }
.wa-iconbtn:hover { background: rgba(0, 0, 0, .15); }
.wa-iconbtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.wa-iconbtn--dark { color: var(--wa-meta); }
.wa-iconbtn--dark:hover { background: rgba(0, 0, 0, .07); }
.wa-iconbtn:focus-visible, .wa-send:focus-visible, .wa-qr__btn:focus-visible { outline: 2px solid #111b21; outline-offset: 1px; }

.wa-log { flex: 1; overflow-y: auto; padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 4px; -webkit-overflow-scrolling: touch; }
.wa-day { align-self: center; margin: 4px 0 6px; padding: 4px 12px; background: #fff; color: var(--wa-meta); font-size: 12px; border-radius: 8px; box-shadow: 0 1px 1px rgba(11, 20, 26, .13); }
.wa-simnote { align-self: center; max-width: 92%; margin-bottom: 8px; padding: 6px 10px; background: #fff3c4; color: #54656f; font-size: 11.5px; line-height: 1.4; text-align: center; border-radius: 8px; box-shadow: 0 1px 1px rgba(11, 20, 26, .13); }
.wa-msg { position: relative; max-width: 82%; padding: 6px 8px 5px 9px; border-radius: 8px; box-shadow: 0 1px 1px rgba(11, 20, 26, .13); font-size: 14.2px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-msg--in { align-self: flex-start; background: #fff; border-top-left-radius: 0; }
.wa-msg--out { align-self: flex-end; background: var(--wa-bubble-out); border-top-right-radius: 0; margin-top: 4px; }
.wa-msg--error { align-self: stretch; max-width: 100%; background: #fff4f4; color: #8a0010; }
.wa-msg a { color: var(--wa-link); text-decoration: underline; }
.wa-text::after { content: ""; display: inline-block; width: 56px; }       /* room for the floating time stamp */
.wa-meta { float: right; margin: 6px -2px -3px 8px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; color: var(--wa-meta); line-height: 1; }
.wa-ticks { width: 15px; height: 15px; fill: none; stroke: #53bdeb; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.wa-thumbs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.wa-thumbs img { width: 150px; max-width: 100%; height: 112px; object-fit: cover; border-radius: 6px; display: block; background: #ddd; }

/* quick replies rendered like WhatsApp reply buttons (stacked, centred blue text) */
.wa-qr { align-self: flex-start; width: 82%; display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.wa-qr__btn { min-height: 40px; padding: 8px 12px; background: #fff; color: var(--wa-link); border: 0; border-radius: 8px; box-shadow: 0 1px 1px rgba(11, 20, 26, .13); font: 500 14px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; cursor: pointer; text-align: center; }
.wa-qr__btn:hover:not(:disabled) { background: #f5f6f6; }
.wa-qr__btn:disabled { opacity: .55; cursor: default; }

.wa-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 11px 14px; background: #fff; border-radius: 8px; border-top-left-radius: 0; box-shadow: 0 1px 1px rgba(11, 20, 26, .13); }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: #8696a0; display: block; animation: wa-blink 1.1s infinite ease-in-out; }
.wa-typing i:nth-child(2) { animation-delay: .18s; } .wa-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes wa-blink { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .wa-typing i { animation: none; opacity: .6; } }

.wa-pending { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: #f0f2f5; font-size: 12px; color: #54656f; flex: none; }
.wa-pending[hidden] { display: none; }
.wa-pending img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }
.wa-form { display: flex; align-items: flex-end; gap: 6px; padding: 8px; background: #f0f2f5; flex: none; }
.wa-form textarea {
  flex: 1; min-width: 0; min-height: 42px; max-height: 96px; resize: none; padding: 10px 14px; border: 0; border-radius: 21px; background: #fff;
  font: 400 16px/1.3 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; color: #111b21;
}
.wa-form textarea:focus-visible { outline: 2px solid var(--wa-green); }
.wa-send { width: 42px; height: 42px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: var(--wa-green); color: #fff; cursor: pointer; }
.wa-send svg { width: 20px; height: 20px; fill: currentColor; }
.wa-send:disabled { opacity: .5; cursor: default; }

@media (max-width: 760px) {
  .dm-wa-layout { flex-direction: column; align-items: center; gap: 20px; }
  .dm-try { width: 100%; max-width: 380px; }
  .wa-phone { width: 100%; max-width: 380px; height: min(620px, calc(100vh - 150px)); height: min(620px, calc(100dvh - 150px)); min-height: 440px; border-width: 6px; border-radius: 26px; }
  .dm-main { padding: 20px 12px 40px; }
  .dm-intro h1 { font-size: 21px; }
}
