/* Doina Vin live chat (dv-live-chat.php) inside the "Scrieți-ne" dialog (dv-contact-channels.php). Colours: the house
   greens of dv-tours group.css (#3A6E20 for text and fills: white on it 6.1:1; the leaf tint for what can be chosen),
   tokens of the theme's kit/tokens.css. Compact: 15 px messages, 12 px meta (the house floor). Running text keeps the
   site-wide justification (base.css: dialog p, li). */
.dv-cc__panel { --dvchat-green: #3A6E20; --dvchat-green-hover: #2F5A1A; --dvchat-tint: rgb(76 140 43 / .09); --dvchat-tint-2: rgb(76 140 43 / .17); }

/* the chat is the dialog (owner 2026-10-28: "chat shall be immediately open", "need it maxed", "all hidden also
   bad"): a tall popover on a computer (600 px, at most 80 % of the window), most of the screen on a phone; under the
   head the channels of dv-contact-channels.php as ONE row of 36 px icon buttons (20 px icons; names in the tooltip
   and the accessible name), scrolling sideways if it ever does not fit; the log takes what is left. Opened by a
   mailto button (data-mail-first) the channels keep their text layout, so the address and the subject show. */
@media (min-width: 600px) { .dv-cc__panel[data-view="chat"] { width: min(400px, calc(100vw - 16px)); } }
.dv-cc__panel[open][data-view="chat"] { display: flex; flex-direction: column; gap: 8px; height: min(600px, 80vh); overflow: hidden; }
@media (max-width: 599.98px) { .dv-cc__panel[open][data-view="chat"] { height: min(88vh, calc(100vh - 32px)); height: min(88dvh, calc(100dvh - 32px)); } }
.dv-cc__panel[data-view="chat"] .dv-cc__lead { display: none; }
.dv-cc__panel[data-view="chat"] .dv-cc__list { flex: none; padding: 0 0 8px; border-bottom: 1px solid var(--line, #DDD6CF); }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) .dv-cc__list { display: flex; align-items: center; justify-content: space-between; gap: 4px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; padding: 2px 2px 8px; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) :is(.dv-cc__list > li, .dv-cc__mailgrp, .dv-cc__socs) { display: contents; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) :is(.dv-cc__item, .dv-cc__tx, .dv-cc__soc, .dv-cc__copy) { flex: none; display: grid; place-items: center; width: 36px; height: 36px; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) :is(.dv-cc__item, .dv-cc__tx, .dv-cc__soc, .dv-cc__copy):hover { background: var(--dvchat-tint); opacity: 1; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) :is(.dv-cc__item, .dv-cc__tx, .dv-cc__soc, .dv-cc__copy):focus-visible { outline: 2px solid var(--ink, #1A171B); outline-offset: -2px; box-shadow: none; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) .dv-cc__item[aria-current="true"] { background: var(--dvchat-tint-2); box-shadow: none; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) :is(.dv-cc__item, .dv-cc__tx) > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) :is(.dv-cc__item, .dv-cc__tx, .dv-cc__soc) .dv-cc-ico { width: 20px; height: 20px; color: var(--ink, #1A171B); }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) .dv-cc__copy { margin-left: -6px; color: var(--muted, #57545A); }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) .dv-cc__subject { display: none; }
.dv-cc__panel[data-view="chat"]:not([data-mail-first]) .dv-cc__copytip { top: 50%; right: calc(100% + 4px); bottom: auto; translate: 0 -50%; }   /* inside the row (it scrolls, so nothing may stick out) */
.dvchat { display: flex; flex-direction: column; gap: 8px; flex: 1 1 auto; min-height: 0; }
.dvchat[hidden] { display: none; }

.dvchat__log { list-style: none; display: flex; flex-direction: column; gap: 6px; flex: 1 1 auto; min-height: 96px; margin: 0; padding: 4px 2px; overflow-y: auto; overscroll-behavior: contain; border-radius: 8px; }
.dvchat__log:focus-visible { outline: 2px solid var(--focus, #4C8C2B); outline-offset: 2px; }
.dvchat__msg { max-width: 85%; padding: 7px 11px 5px; border-radius: 14px; font-size: var(--fs-ui, 15px); line-height: 1.4; transition: opacity 200ms var(--ease-out, ease), translate 200ms var(--ease-out, ease); }
@starting-style { .dvchat__msg { opacity: 0; translate: 0 6px; } }
.dvchat__msg p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.dvchat__msg--i { align-self: flex-end; background: var(--dvchat-green); color: #fff; border-end-end-radius: 4px; }
.dvchat__msg--o { align-self: flex-start; background: var(--band, #E9E9E3); color: var(--ink, #1A171B); border-end-start-radius: 4px; }
.dvchat__msg--pending { opacity: .75; }
.dvchat__time { display: block; margin-top: 2px; font-size: var(--fs-eyebrow, 12px); line-height: 16px; text-align: end; color: var(--muted, #57545A); }
.dvchat__msg--i .dvchat__time { color: #E3EEDD; }   /* 5.1:1 on the green */
.dvchat__msg--hello .dvchat__time { display: none; }
.dvchat__sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.dvchat__off { margin: 0; padding: 8px 10px; border-radius: 8px; background: var(--dvchat-tint); color: var(--ink, #1A171B); font-size: var(--fs-meta, 14px); line-height: 20px; }
.dvchat__err { margin: 0; color: var(--error, #A1281E); font-size: var(--fs-meta, 14px); line-height: 20px; }
.dvchat__off[hidden], .dvchat__err[hidden] { display: none; }

.dvchat__form { display: grid; gap: 6px; margin: 0; }
/* the contact (2026-10-28, owner: "phone or email mandatory"): name (optional) + "Telefon sau e-mail" open above the
   input until the conversation has a contact, then one line "Vă răspundem la: ... · schimbă" */
.dvchat__who { display: grid; gap: 4px; }
.dvchat__who-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 8px; }
.dvchat__who label { display: grid; gap: 2px; font-size: var(--fs-eyebrow, 12px); line-height: 16px; color: var(--muted, #57545A); }
.dvchat__who input { min-width: 0; min-height: 40px; padding: 0 10px; border: 1px solid var(--control, #7F877F); border-radius: var(--radius-control, 4px); background: var(--surface, #fff); color: var(--ink, #1A171B); font: inherit; font-size: 16px; }
.dvchat__who input:focus-visible { border-color: var(--dvchat-green); outline: 2px solid var(--focus, #4C8C2B); outline-offset: 1px; }
.dvchat__who input[aria-invalid="true"] { border-color: var(--error, #A1281E); }
.dvchat__cerr { margin: 0; color: var(--error, #A1281E); font-size: var(--fs-meta, 14px); line-height: 20px; }
.dvchat__use { margin: 0; font-size: var(--fs-eyebrow, 12px); line-height: 16px; color: var(--muted, #57545A); }
.dvchat__use a { color: var(--link, #3A6E20); text-underline-offset: 2px; }
.dvchat__me { margin: 0; font-size: var(--fs-meta, 14px); line-height: 20px; color: var(--ink, #1A171B); overflow-wrap: anywhere; }
.dvchat__chg { min-height: 24px; margin: 0; padding: 0 2px; border: 0; border-radius: 4px; background: none; color: var(--link, #3A6E20); font: inherit; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.dvchat__chg:hover { color: var(--dvchat-green-hover); }
.dvchat__chg:focus-visible { outline: 2px solid var(--focus, #4C8C2B); outline-offset: 2px; }
.dvchat__who[hidden], .dvchat__cerr[hidden], .dvchat__me[hidden] { display: none; }
.dvchat__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.dvchat__compose { display: flex; align-items: flex-end; gap: 6px; padding: 4px 4px 4px 12px; border: 1px solid var(--control, #7F877F); border-radius: 22px; background: var(--surface, #fff); }
.dvchat__compose:focus-within { border-color: var(--dvchat-green); box-shadow: 0 0 0 1px var(--dvchat-green); }
.dvchat__ta { flex: 1 1 auto; min-width: 0; height: 36px; max-height: 132px; margin: 0; padding: 7px 0; border: 0; outline: 0; resize: none; background: transparent; color: var(--ink, #1A171B); font: inherit; font-size: 16px; line-height: 22px; }
.dvchat__send { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: var(--dvchat-green); color: #fff; cursor: pointer; transition: background-color var(--dur-hover, 200ms) var(--ease-out, ease); }
.dvchat__send:hover { background: var(--dvchat-green-hover); }
.dvchat__send:disabled { opacity: .6; cursor: default; }
.dvchat__send:focus-visible { outline: 2px solid var(--focus, #4C8C2B); outline-offset: 2px; }
.dvchat__send svg { width: 18px; height: 18px; margin-left: 2px; }
.dvchat__note { margin: 0; font-size: var(--fs-eyebrow, 12px); line-height: 16px; color: var(--muted, #57545A); }
.dvchat__note a { color: var(--link, #3A6E20); text-underline-offset: 2px; }

/* chatall: opened from a messenger, the header shows its icon ("Chat · WhatsApp"); the way out to the app stays one
   small secondary line under the input */
.dv-cc__title.dvchat-title--ch { display: flex; align-items: center; gap: 8px; }
.dv-cc__title .dv-cc-ico { width: 18px; height: 18px; }
.dvchat__ext { margin: 0; font-size: var(--fs-eyebrow, 12px); line-height: 16px; color: var(--muted, #57545A); }
.dvchat__ext a { color: var(--link, #3A6E20); text-underline-offset: 2px; }
.dvchat__ext[hidden], .dvchat__ext a[hidden] { display: none; }


/* an unread reply: a dot on the round button and on the header icon */
.dvh-header__write { position: relative; }
.dv-cc__btn[data-dvchat-unread]::after, .dvh-header__write[data-dvchat-unread]::after { content: ""; position: absolute; top: 6px; right: 6px; width: 10px; height: 10px; border-radius: 50%; background: #4C8C2B; box-shadow: 0 0 0 2px var(--surface, #fff); }
