/* ───────── Βασικά στυλ (για θέματα χωρίς δικό τους dock). Στα θέματα Chamber τα ίδια κανόνες υπάρχουν και στο CSS του θέματος. ───────── */
.ch-chat-float { position: fixed; right: 24px; bottom: 24px; z-index: 99990; display: flex; flex-direction: column; align-items: center; }
.ch-chat, .ch-chat * { box-sizing: border-box; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

button.ch-chat__launch { position: relative; display: grid; place-items: center; width: var(--dock-lw, 58px); height: var(--dock-lw, 58px); padding: 0; border: var(--dock-bd, 0); border-radius: var(--dock-lr, 50%); background: var(--dock-lbg, #e2ce81); color: var(--dock-lfg, #0b2230); box-shadow: var(--dock-sh, 0 8px 22px rgba(6, 27, 54, .3)); cursor: pointer; transition: transform .25s ease, box-shadow .25s, background-color .25s; }
button.ch-chat__launch:hover { transform: translateY(-3px); background: var(--dock-lbg-h, var(--dock-lbg, #e2ce81)); }
button.ch-chat__launch:focus-visible, .ch-chat button:focus-visible, .ch-chat input:focus-visible { outline: 3px solid #1d4a73; outline-offset: 2px; }
.ch-chat__launch .ch-chat__ic-close { display: none; }
[data-dock].is-chat-open .ch-chat__ic-open { display: none; }
[data-dock].is-chat-open .ch-chat__ic-close { display: block; }
button.ch-chat__launch--bot { overflow: hidden; }
.ch-chat__bot { display: block; width: 100%; height: 100%; object-fit: contain; pointer-events: none; }

.ch-chat { position: fixed; right: 24px; bottom: calc(24px + var(--dock-lw, 58px) + 14px); z-index: 99991; display: flex; flex-direction: column; overflow: hidden; width: 380px; max-width: calc(100vw - 32px); max-height: min(580px, calc(100vh - 140px)); background: #fff; color: #1b2b36; border-radius: var(--dock-pr, 20px); border: var(--dock-pbd, 0); box-shadow: var(--dock-psh, 0 24px 60px rgba(6, 27, 54, .3)); font: 400 .95rem/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; animation: ch-chat-in .22s ease; }
.ch-chat[hidden] { display: none; }
@keyframes ch-chat-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ch-chat__head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1.1rem; background: var(--dock-hbg, #12324a); color: var(--dock-hfg, #fff); }
.ch-chat__avatar { flex: none; display: grid; place-items: center; width: 40px; height: 40px; overflow: hidden; border-radius: var(--dock-av-r, 50%); background: var(--dock-av-bg, #e2ce81); color: var(--dock-av-fg, #0b2230); }
.ch-chat__avatar img { width: 100%; height: 100%; object-fit: contain; }
.ch-chat__who { flex: 1; min-width: 0; line-height: 1.25; }
.ch-chat__who strong { display: block; font-size: 1rem; font-weight: 700; }
.ch-chat__who small { display: block; font-size: .76rem; opacity: .85; }
.ch-chat__x { flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: var(--dock-x-r, 50%); background: rgba(255, 255, 255, .16); color: inherit; cursor: pointer; transition: background-color .2s; }
.ch-chat__x:hover { background: rgba(255, 255, 255, .3); }

.ch-chat__log { flex: 1; min-height: 160px; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; padding: 1rem 1.1rem; background: var(--dock-lbgbody, #f6f7f9); }
.ch-chat__msg { max-width: 86%; padding: .7rem .95rem; font-size: .93rem; line-height: 1.5; border-radius: var(--dock-mr, 14px); }
.ch-chat__msg p { margin: 0; }
.ch-chat__msg--bot { align-self: flex-start; background: #fff; color: #1b2b36; border: 1px solid #dfe8ea; border-bottom-left-radius: 4px; }
.ch-chat__msg--user { align-self: flex-end; background: var(--dock-ubg, #12324a); color: var(--dock-ufg, #fff); border-bottom-right-radius: 4px; }
.ch-chat__msg a { display: inline-block; margin-top: .45rem; font-weight: 700; color: var(--dock-link, #1d4a73); }
.ch-chat__msg a:hover { text-decoration: underline; }

.ch-chat__chips { display: flex; flex-wrap: wrap; gap: .45rem; padding: .8rem 1.1rem .2rem; background: #fff; border-top: 1px solid #dfe8ea; }
.ch-chat__chips:empty { display: none; }
.ch-chat__chips button { padding: .45em .85em; border: 1.5px solid var(--dock-chip-bd, #12324a); border-radius: var(--dock-chip-r, 999px); background: #fff; color: #12324a; font-family: inherit; font-weight: 600; font-size: .8rem; line-height: 1.2; cursor: pointer; transition: background-color .2s, color .2s; }
.ch-chat__chips button:hover { background: var(--dock-chip-h, #12324a); color: var(--dock-chip-hfg, #fff); }
.ch-chat__form { display: flex; gap: .5rem; padding: .8rem 1.1rem 1rem; background: #fff; }
.ch-chat__form input { flex: 1; min-width: 0; padding: .7rem .9rem; border: 1.5px solid #dfe8ea; border-radius: var(--dock-in-r, 12px); font-family: inherit; font-weight: 500; font-size: .93rem; color: #1b2b36; background: #fff; }
.ch-chat__form input:focus { outline: 0; border-color: #12324a; }
.ch-chat__form button { flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: var(--dock-in-r, 12px); background: var(--dock-send-bg, #12324a); color: var(--dock-send-fg, #fff); cursor: pointer; transition: filter .2s; }
.ch-chat__form button:hover { filter: brightness(1.12); }

@media (max-width: 640px) {
	.ch-chat-float { right: 16px; bottom: 16px; }
	.ch-chat { right: 0; bottom: 0; left: 0; top: 0; width: auto; max-width: none; max-height: none; border-radius: 0; border: 0; box-shadow: none; }
	.ch-chat-float.is-chat-open { display: none; }
	html.ch-chat-lock { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) { .ch-chat { animation: none; } }

/* ───────── Συμπληρωματικά ───────── */

/* Λίστα μηνυμάτων: ορατό focus και ομαλό scroll */
.ch-chat__log { scroll-behavior: smooth; overscroll-behavior: contain; }
.ch-chat__log:focus-visible { outline: 3px solid var(--gold-700, #7d6230); outline-offset: -3px; }

/* Απαντήσεις markdown */
.ch-chat__md > :first-child { margin-top: 0; }
.ch-chat__md > :last-child { margin-bottom: 0; }
.ch-chat__md p { margin: 0 0 .6em; }
.ch-chat__md ul, .ch-chat__md ol { margin: 0 0 .6em; padding-left: 1.3em; }
.ch-chat__md li { margin: 0 0 .25em; }
.ch-chat__md h1, .ch-chat__md h2, .ch-chat__md h3, .ch-chat__md h4 { margin: .2em 0 .4em; font: 700 1rem/1.3 var(--font-head, inherit); color: inherit; }
.ch-chat__md code { padding: .1em .35em; border-radius: 6px; background: rgba(18, 50, 74, .08); font-size: .88em; }
.ch-chat__md pre { margin: 0 0 .6em; padding: .7em .8em; overflow-x: auto; border-radius: 10px; background: rgba(18, 50, 74, .08); }
.ch-chat__md pre code { padding: 0; background: none; }
.ch-chat__md blockquote { margin: 0 0 .6em; padding-left: .8em; border-left: 3px solid var(--gold, #e2ce81); color: var(--muted, #55656f); }
.ch-chat__md table { width: 100%; margin: 0 0 .6em; border-collapse: collapse; font-size: .88rem; }
.ch-chat__md th, .ch-chat__md td { padding: .3em .5em; border: 1px solid var(--line, #dfe8ea); text-align: left; }
.ch-site .ch-chat__md a { display: inline; margin: 0; text-decoration: underline; text-underline-offset: 2px; }
.ch-site .ch-chat__msg--static a { display: inline-block; margin-top: .45rem; }
.ch-chat__msg { overflow-wrap: anywhere; }

/* Σφάλμα */
.ch-chat__msg--err { align-self: flex-start; background: #fdf1ee; color: #8a2a17; border: 1px solid #f0c8bf; border-bottom-left-radius: 4px; }

/* Δείκτης «γράφει…» */
.ch-chat__typing { align-self: flex-start; display: flex; align-items: center; gap: 5px; padding: .85rem 1rem; background: #fff; border: 1px solid var(--line, #dfe8ea); border-radius: var(--dock-mr, 14px); border-bottom-left-radius: 4px; }
.ch-chat__typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--navy, #12324a); opacity: .45; animation: ch-chat-bounce 1.2s infinite ease-in-out both; }
.ch-chat__typing i:nth-of-type(1) { animation-delay: -.3s; }
.ch-chat__typing i:nth-of-type(2) { animation-delay: -.15s; }
@keyframes ch-chat-bounce { 0%, 80%, 100% { transform: scale(.6); opacity: .35; } 40% { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .ch-chat__typing i { animation: none; opacity: .7; } .ch-chat__log { scroll-behavior: auto; } }

/* Κλειδωμένο πεδίο όσο περιμένουμε απάντηση */
.ch-chat__form input:disabled { background: #f3f5f7; cursor: progress; }
.ch-site .ch-chat__form button:disabled { opacity: .55; cursor: progress; }

/* Σημείωση για τεχνητή νοημοσύνη και απόρρητο */
.ch-chat__note { margin: 0; padding: .1rem 1.1rem .85rem; background: #fff; color: var(--muted, #55656f); font-size: .74rem; line-height: 1.4; }
.ch-site .ch-chat__note a { color: var(--dock-link, var(--blue, #1d4a73)); text-decoration: underline; }

/* Δικές σας εικόνες στα εικονίδια */
.ch-chat__img-ic { display: block; object-fit: contain; }
.ch-chat__launch .ch-chat__img-ic { width: 24px; height: 24px; }
.ch-chat__x .ch-chat__img-ic { width: 20px; height: 20px; }
.ch-chat__form button .ch-chat__img-ic { width: 22px; height: 22px; }
