/* Textou.ai site demo v3. Everything is scoped under .textou-demo. Logical properties: RTL (ar) mirrors by itself. */
.textou-demo {
  --tx-blue: #0774B9; --tx-red: #C22D2A; --tx-graphite: #262626; --tx-white: #FFFFFF;
  --tx-cta-from: #FF0022; --tx-cta-to: #0095FF;
  --tx-line: rgba(38, 38, 38, .14); --tx-muted: rgba(38, 38, 38, .72);
  --d-font: "Montserrat", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --d-font-support: "Nunito", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-family: var(--d-font); color: var(--tx-graphite); font-size: 17px; line-height: 1.55;
  border: 1px solid var(--tx-line); border-radius: 20px; padding: 32px;
  background: linear-gradient(180deg, rgba(7,116,185,.06), rgba(7,116,185,0) 55%);
}
/* Before the boot mounts it (or without JavaScript), the block has no box. */
.textou-demo:empty { border: 0; padding: 0; background: none; }
/* Script fonts after Montserrat and Nunito, as on the translated site pages. */
.textou-demo:lang(ja) { --d-font: "Montserrat", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; --d-font-support: "Nunito", "Hiragino Sans", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
.textou-demo:lang(zh) { --d-font: "Montserrat", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; --d-font-support: "Nunito", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.textou-demo:lang(hi) { --d-font: "Montserrat", "Noto Sans Devanagari", "Nirmala UI", "Kohinoor Devanagari", sans-serif; --d-font-support: "Nunito", "Noto Sans Devanagari", "Nirmala UI", sans-serif; }
.textou-demo:lang(ar) { --d-font: "Montserrat", "Noto Sans Arabic", "Segoe UI", Tahoma, "Geeza Pro", sans-serif; --d-font-support: "Nunito", "Noto Sans Arabic", "Segoe UI", Tahoma, sans-serif; }
.textou-demo *, .textou-demo *::before, .textou-demo *::after { box-sizing: border-box; }
.textou-demo :focus-visible { outline: 3px solid var(--tx-blue); outline-offset: 3px; border-radius: 4px; }
.textou-demo p { margin: 0; }
/* The site home sets line-height on p and li (also as html.marca p) and a font on h2: the doubled class wins, so the demo keeps its own rhythm. */
.textou-demo.textou-demo p, .textou-demo.textou-demo li { line-height: inherit; }
.textou-demo.textou-demo h2 { font-family: inherit; }
.textou-demo .demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; grid-template-areas: "head phone" "scen phone" "mode phone" "cta phone"; column-gap: 40px; row-gap: 24px; align-items: start; }
.textou-demo .d-head { grid-area: head; }
.textou-demo .d-scen { grid-area: scen; }
.textou-demo .d-phone { grid-area: phone; }
.textou-demo .d-mode { grid-area: mode; }
.textou-demo .d-cta { grid-area: cta; }
.textou-demo .d-eyebrow { font-family: var(--d-font-support); font-weight: 800; font-size: 14px; color: var(--tx-blue); margin: 0 0 8px; }
.textou-demo .d-title { overflow-wrap: break-word; margin: 0 0 12px; font-weight: 800; font-size: clamp(28px, 4vw, 40px); line-height: 1.1; letter-spacing: -.01em; }
.textou-demo:lang(ja) .d-title, .textou-demo:lang(zh) .d-title, .textou-demo:lang(hi) .d-title, .textou-demo:lang(ar) .d-title { line-height: 1.3; letter-spacing: 0; }
.textou-demo .sub { font-size: 18px; font-weight: 500; max-width: 46ch; }
.textou-demo .label { font-family: var(--d-font-support); font-weight: 800; font-size: 15px; margin: 0 0 12px; }
.textou-demo .scen-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.textou-demo .scen-list li { margin: 0; }
.textou-demo .scen { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; text-align: start; font: inherit; color: inherit; background: var(--tx-white); border: 2px solid var(--tx-line); border-radius: 14px; padding: 12px 14px; cursor: pointer; min-height: 88px; }
/* Long words (de, ru, id...) break with a hyphen inside the card, never push the card out of the grid. */
.textou-demo .scen > * { max-width: 100%; overflow-wrap: break-word; hyphens: auto; }
.textou-demo .scen:hover { border-color: rgba(7,116,185,.5); }
.textou-demo .scen[aria-pressed="true"] { border-color: var(--tx-blue); box-shadow: 0 0 0 3px rgba(7,116,185,.15); }
.textou-demo .scen b { font-weight: 700; font-size: 16px; line-height: 1.25; }
.textou-demo .scen .meta { font-family: var(--d-font-support); font-size: 14px; color: var(--tx-muted); line-height: 1.3; }
.textou-demo .scen .d-plan { font-family: var(--d-font-support); font-weight: 800; font-size: 12px; line-height: 1.3; color: var(--tx-blue); }
.textou-demo .mode-group { display: flex; flex-wrap: wrap; gap: 8px; }
.textou-demo .d-chip { font: inherit; font-weight: 600; font-size: 15px; min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 2px solid var(--tx-line); background: var(--tx-white); color: var(--tx-graphite); cursor: pointer; }
.textou-demo .d-chip[aria-pressed="true"] { border-color: var(--tx-blue); background: var(--tx-blue); color: var(--tx-white); }
.textou-demo .d-chip:disabled { opacity: .45; cursor: not-allowed; }
.textou-demo .mode-caption { font-family: var(--d-font-support); font-size: 15px; margin: 12px 0 0; max-width: 52ch; }
.textou-demo .mode-caption .d-plan { font-weight: 800; color: var(--tx-blue); }
.textou-demo .facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0 0 20px; padding: 0; list-style: none; font-family: var(--d-font-support); font-size: 15px; }
.textou-demo .facts b { font-family: var(--d-font); font-weight: 800; font-size: 17px; unicode-bidi: isolate; }
.textou-demo .cta { display: inline-block; min-height: 56px; padding: 14px 36px; border-radius: 999px; border: 3px solid var(--tx-white); box-shadow: 0 0 0 1px var(--tx-line); background: linear-gradient(90deg, var(--tx-cta-from) 0%, var(--tx-cta-to) 100%); color: var(--tx-white); font-family: var(--d-font); font-weight: 800; font-size: 19px; line-height: 1.2; text-decoration: none; text-align: center; }
.textou-demo .cta:hover { text-decoration: underline; }
.textou-demo .cta-micro { font-family: var(--d-font-support); font-size: 15px; margin: 16px 0 0; max-width: 54ch; }
.textou-demo .cta-alt { margin: 12px 0 0; font-weight: 600; font-size: 16px; }
.textou-demo .cta-alt a { display: inline-flex; align-items: center; min-height: 44px; color: var(--tx-blue); text-underline-offset: 3px; }

/* Phone */
.textou-demo .phone { border: 10px solid var(--tx-graphite); border-radius: 36px; overflow: hidden; background: #F2F0EC; box-shadow: 0 18px 40px rgba(38,38,38,.18); }
.textou-demo .phone-top { background: var(--tx-graphite); color: var(--tx-white); padding: 10px 16px 12px; display: flex; align-items: center; gap: 10px; min-height: 58px; }
.textou-demo .avatar { flex: none; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.textou-demo .phone-top > div:not(.avatar) { flex: 1; min-width: 0; }
.textou-demo .phone-top b, .textou-demo .phone-top span { overflow-wrap: anywhere; }
.textou-demo .phone-top b { display: block; font-size: 15px; line-height: 1.2; }
.textou-demo .phone-top span { display: block; font-family: var(--d-font-support); font-size: 12px; opacity: .85; }
.textou-demo .chat { height: 560px; overflow-y: auto; padding: 16px 12px 20px; display: flex; flex-direction: column; gap: 10px; }
.textou-demo .day { align-self: center; background: rgba(255,255,255,.9); border-radius: 8px; padding: 2px 10px; font-family: var(--d-font-support); font-size: 12px; color: var(--tx-muted); }
.textou-demo .bubble { position: relative; max-width: 88%; border-radius: 12px; padding: 7px 10px 6px; font-size: 15px; line-height: 1.42; background: var(--tx-white); box-shadow: 0 1px 1px rgba(38,38,38,.1); flex: none; }
.textou-demo .bubble.in { align-self: flex-start; border-start-start-radius: 4px; }
.textou-demo .bubble.in.has-react { margin-bottom: 18px; }
.textou-demo .bubble.out { align-self: flex-end; border-start-end-radius: 4px; background: #DCF8C6; }
.textou-demo .bubble .who { display: block; font-family: var(--d-font-support); font-weight: 800; font-size: 12px; color: var(--tx-red); margin-bottom: 2px; }
.textou-demo .bubble .fwd { display: block; font-family: var(--d-font-support); font-style: italic; font-size: 12px; color: var(--tx-muted); margin-bottom: 4px; }
.textou-demo .bubble .time { display: block; text-align: end; font-family: var(--d-font-support); font-size: 11px; color: var(--tx-muted); margin-top: 2px; unicode-bidi: isolate; }
.textou-demo .bubble .ticks { margin-inline-start: 4px; color: #34B7F1; letter-spacing: -3px; }
.textou-demo .quote { border-inline-start: 4px solid var(--tx-red); background: rgba(38,38,38,.06); border-radius: 6px; padding: 5px 8px; margin-bottom: 6px; }
.textou-demo .quote b { display: block; font-size: 13px; color: var(--tx-red); }
.textou-demo .quote span { display: block; font-family: var(--d-font-support); font-size: 13px; color: var(--tx-muted); }
.textou-demo .msg { white-space: pre-wrap; overflow-wrap: anywhere; }
.textou-demo .msg b { font-weight: 700; }
.textou-demo .msg .mention { color: #027EB5; font-weight: 600; }
.textou-demo .more { display: block; font: inherit; font-weight: 700; font-size: 15px; color: #027EB5; background: none; border: 0; padding: 10px 0 4px; min-height: 44px; cursor: pointer; }
.textou-demo .react { position: absolute; inset-inline-start: 8px; bottom: -17px; background: var(--tx-white); border-radius: 999px; padding: 0 7px; font-size: 16px; line-height: 26px; box-shadow: 0 1px 3px rgba(38,38,38,.25); animation: txd-react-in .25s ease-out; }
.textou-demo .react.gone { animation: txd-react-out .25s ease-in forwards; }
@keyframes txd-react-in { from { transform: scale(0); } to { transform: scale(1); } }
@keyframes txd-react-out { to { transform: scale(0); opacity: 0; } }
.textou-demo .bubble.enter { animation: txd-bubble-in .22s ease-out; }
@keyframes txd-bubble-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
/* The audio row asks for 220px but never more than the bubble: on a narrow phone the wave shrinks, the duration stays inside. */
.textou-demo .audio { display: flex; align-items: center; gap: 10px; width: 220px; max-width: 100%; }
.textou-demo .play { flex: none; width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 0; background: var(--tx-blue); color: var(--tx-white); display: grid; place-items: center; font: inherit; font-size: 14px; line-height: 1; }
.textou-demo button.play { cursor: pointer; box-shadow: 0 0 0 3px rgba(7,116,185,.18); }
.textou-demo button.play:hover { background: #055d94; }
.textou-demo button.play.is-playing { font-size: 12px; letter-spacing: -1px; }
/* Media play icons are not mirrored in RTL (Material bidi guidance). */
.textou-demo .wave { --p: 0; flex: 1; min-width: 0; overflow: hidden; height: 26px; display: flex; align-items: center; gap: 2px; border-radius: 4px; background: linear-gradient(to right, rgba(7,116,185,.22) calc(var(--p) * 100%), transparent 0); }
.textou-demo[dir="rtl"] .wave { background: linear-gradient(to left, rgba(7,116,185,.22) calc(var(--p) * 100%), transparent 0); }
.textou-demo .bubble { --p: 0; }
.textou-demo .wave i { flex: 1; background: rgba(38,38,38,.25); border-radius: 2px; }
.textou-demo .dur { flex: none; white-space: nowrap; font-family: var(--d-font-support); font-size: 12px; color: var(--tx-muted); unicode-bidi: isolate; }
.textou-demo .phone-foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 16px; }
.textou-demo .note { font-family: var(--d-font-support); font-size: 14px; color: var(--tx-muted); }
.textou-demo .replay { font: inherit; font-weight: 700; font-size: 15px; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--tx-blue); background: var(--tx-white); color: var(--tx-blue); cursor: pointer; flex: none; }

@media (max-width: 900px) {
  .textou-demo .demo-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "scen" "phone" "mode" "cta"; }
  .textou-demo .d-phone { width: 100%; max-width: 420px; margin: 0 auto; }
}
@media (max-width: 600px) {
  .textou-demo { font-size: 16px; padding: 24px 16px; border-radius: 16px; }
  .textou-demo .scen { padding: 10px 12px; }
  .textou-demo .cta { display: block; width: 100%; padding: 14px 20px; }
  .textou-demo .chat { height: 520px; }
  .textou-demo .phone { border-width: 8px; border-radius: 30px; }
  .textou-demo .phone-foot { flex-direction: column; align-items: flex-start; }
}
/* Small and old phones (320-360px, Galaxy Fold cover): less frame, more room for the chat. */
@media (max-width: 360px) {
  .textou-demo { padding: 20px 12px; }
  .textou-demo .d-title { font-size: 24px; hyphens: auto; }
  .textou-demo .chat { padding: 12px 8px 16px; }
  .textou-demo .bubble { max-width: 92%; }
}
@media (max-width: 330px) {
  .textou-demo .scen-list { grid-template-columns: minmax(0, 1fr); }
  .textou-demo .scen { min-height: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .textou-demo .react, .textou-demo .react.gone, .textou-demo .bubble.enter { animation: none; }
}
