/* Grand Elite AI chat widget. Shared by both site designs.
   Theme it by overriding the --c-* tokens on :root (defaults are the dark theme). */
:root{
  --c-panel:rgba(9,14,11,.94); --c-ink:#f1f5f2; --c-ink2:#c9d3cd; --c-muted:#8e9c94; --c-faint:#6f7c75;
  --c-line:rgba(255,255,255,.08); --c-line2:rgba(255,255,255,.14); --c-bot:#141e18; --c-bot-b:#fff;
  --c-accent:#2bc24a; --c-accent2:#5fe07a; --c-on-accent:#03140a; --c-input:rgba(0,0,0,.25); --c-hover:rgba(255,255,255,.06);
  --c-fab:rgba(8,14,10,.82); --c-fab-ink:#f1f5f2; --c-chip:rgba(43,194,74,.06); --c-card-a:rgba(43,194,74,.16); --c-card-b:rgba(43,194,74,.03);
  --c-amber:#f2b441; --c-red:#ff6b5e; --c-shadow:0 40px 100px -30px rgba(0,0,0,.9);
}
@keyframes geBubIn{from{opacity:0; transform:translateY(10px) scale(.98)}}
@keyframes geTyp{30%{transform:translateY(-4px); opacity:.5}}
.ge-av{width:36px; height:36px; border-radius:50%; display:grid; place-items:center; flex:none; background:var(--c-accent); color:var(--c-on-accent)}
.ge-av svg{width:22px; height:22px}
.fab{position:fixed; z-index:60; bottom:22px; inset-inline-end:22px; display:flex; align-items:center; gap:10px; height:58px; padding:0 22px 0 8px; border-radius:999px; border:1px solid rgba(43,194,74,.5); background:var(--c-fab); color:var(--c-fab-ink); backdrop-filter:blur(14px); -webkit-backdrop-filter:blur(14px); box-shadow:0 16px 40px -12px rgba(43,194,74,.45), 0 20px 50px -20px rgba(0,0,0,.5); font:inherit; font-weight:600; cursor:pointer; transition:transform .25s, opacity .25s}
html[dir="rtl"] .fab{padding:0 8px 0 22px}
.fab .ge-av{width:42px; height:42px}
.fab .ge-av svg{width:24px; height:24px}
.fab:hover{transform:translateY(-2px)}
.fab .ping{position:absolute; top:6px; inset-inline-start:40px; width:11px; height:11px; border-radius:50%; background:#fff; border:2px solid var(--c-accent)}
body.chat-open .fab{opacity:0; pointer-events:none; transform:scale(.9)}
.chat{position:fixed; z-index:70; bottom:22px; inset-inline-end:22px; width:400px; height:min(680px, calc(100svh - 44px)); display:flex; flex-direction:column; border-radius:28px; border:1px solid var(--c-line2); background:var(--c-panel); color:var(--c-ink); backdrop-filter:blur(24px) saturate(140%); -webkit-backdrop-filter:blur(24px) saturate(140%); box-shadow:var(--c-shadow), 0 0 0 1px rgba(43,194,74,.08); overflow:hidden; transform-origin:bottom right; transform:translateY(16px) scale(.96); opacity:0; pointer-events:none; transition:transform .35s cubic-bezier(.2,.8,.2,1), opacity .25s; font-size:15px; line-height:1.5}
html[dir="rtl"] .chat{transform-origin:bottom left}
body.chat-open .chat{transform:none; opacity:1; pointer-events:auto}
.chat button, .chat input, .chat textarea{font:inherit; color:inherit}
.chat-head{display:flex; align-items:center; gap:12px; padding:14px 14px 14px 16px; border-bottom:1px solid var(--c-line)}
.chat-head .ge-av{width:42px; height:42px}
.chat-head .t{flex:1; min-width:0}
.chat-head b{display:block; font-size:16px; font-weight:600; line-height:1.2}
.chat-head small{display:flex; align-items:center; gap:6px; color:var(--c-muted); font-size:12.5px}
.chat-head small i{width:7px; height:7px; border-radius:50%; background:var(--c-accent)}
.c-icon{width:38px; height:38px; flex:none; display:grid; place-items:center; border-radius:12px; border:1px solid transparent; background:none; color:var(--c-ink2); cursor:pointer; transition:background .2s, border-color .2s}
.c-icon:hover{background:var(--c-hover); border-color:var(--c-line)}
.c-icon svg{width:19px; height:19px}
.ai-panel{border-bottom:1px solid var(--c-line); padding:14px 16px; display:grid; gap:10px; background:var(--c-hover); font-size:13.5px}
.ai-panel[hidden]{display:none}
.ai-panel p{margin:0; color:var(--c-muted)}
.ai-panel p b{color:var(--c-ink)}
.ai-panel .row{display:flex; gap:8px}
.ai-panel input{flex:1; min-width:0; height:40px; border-radius:12px; border:1px solid var(--c-line2); background:var(--c-input); padding:0 12px; outline:none}
.ai-panel input:focus{border-color:var(--c-accent)}
.ai-panel .status{color:var(--c-ink2); min-height:1em}
.ai-panel .link{background:none; border:0; padding:0; color:var(--c-muted); text-decoration:underline; font-size:13px; justify-self:start; cursor:pointer}
.c-btn{display:inline-flex; align-items:center; justify-content:center; gap:8px; height:40px; padding:0 16px; border-radius:999px; border:1px solid transparent; background:var(--c-accent); color:var(--c-on-accent); font-weight:600; font-size:14px; cursor:pointer; text-decoration:none; white-space:nowrap}
.c-btn:disabled{opacity:.6}
.c-btn.ghost{background:transparent; border-color:var(--c-line2); color:var(--c-ink)}
.chat-log{flex:1; overflow-y:auto; padding:18px 14px 8px; display:flex; flex-direction:column; gap:10px; scroll-behavior:smooth; overscroll-behavior:contain}
.chat-log::-webkit-scrollbar{width:6px} .chat-log::-webkit-scrollbar-thumb{background:var(--c-line2); border-radius:3px}
.msg{display:flex; flex-direction:column; gap:8px; max-width:88%; animation:geBubIn .4s cubic-bezier(.2,.8,.2,1) both}
.msg.me{align-self:flex-end; align-items:flex-end}
.msg.bot{align-self:flex-start; align-items:flex-start}
.msg .b{padding:11px 14px; border-radius:20px; font-size:15px; line-height:1.5; white-space:pre-wrap; overflow-wrap:anywhere; unicode-bidi:plaintext; text-align:start}
.msg.me .b{background:var(--c-accent); color:var(--c-on-accent); border-end-end-radius:6px}
.msg.bot .b{background:var(--c-bot); border:1px solid var(--c-line); border-end-start-radius:6px}
.msg.bot .b b{color:var(--c-bot-b); font-weight:600}
.msg .b.typing{display:inline-flex; gap:4px; padding:14px 16px}
.msg .b.typing i{width:6px; height:6px; border-radius:50%; background:var(--c-muted); animation:geTyp 1s infinite}
.msg .b.typing i:nth-child(2){animation-delay:.15s} .msg .b.typing i:nth-child(3){animation-delay:.3s}
.c-chips{display:flex; flex-wrap:wrap; gap:7px}
.c-chip{border:1px solid rgba(43,194,74,.4); background:var(--c-chip); color:var(--c-ink); border-radius:999px; padding:7px 12px; font-size:13.5px; cursor:pointer; text-align:start; transition:border-color .2s, background .2s}
.c-chip:hover{border-color:var(--c-accent); background:rgba(43,194,74,.14)}
.c-chip:disabled{opacity:.4; cursor:default}
.c-tag{display:inline-block; padding:2px 9px; border-radius:999px; font-size:12px; font-weight:600}
.c-tag.routine{background:rgba(43,194,74,.16); color:var(--c-accent2)}
.c-tag.soon{background:rgba(242,180,65,.18); color:var(--c-amber)}
.c-tag.urgent{background:rgba(255,107,94,.16); color:var(--c-red)}
.bk-card{width:100%; min-width:260px; border-radius:18px; border:1px solid rgba(43,194,74,.4); background:linear-gradient(160deg, var(--c-card-a), var(--c-card-b)); padding:14px 16px; font-size:14px}
.bk-card .h{display:flex; align-items:center; gap:8px; font-weight:600; color:var(--c-accent2); margin-bottom:10px}
.bk-card .h svg{width:18px; height:18px}
.bk-card dl{display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:0}
.bk-card dt{color:var(--c-muted)}
.bk-card dd{margin:0; text-align:end; font-weight:500}
.bk-card .note{margin-top:10px; padding-top:10px; border-top:1px dashed var(--c-line2); color:var(--c-ink2); font-size:13px}
.bk-card .note b{display:block; color:var(--c-muted); font-weight:500; font-size:12px; text-transform:uppercase; letter-spacing:.06em; margin-bottom:3px}
.bk-card .c-btn{margin-top:12px; width:100%}
.msg .b.emerg{border-color:rgba(255,107,94,.5); background:rgba(255,107,94,.08)}
.chat-foot{padding:10px 12px 12px; border-top:1px solid var(--c-line)}
.chat-form{display:flex; gap:8px; align-items:flex-end; border:1px solid var(--c-line2); border-radius:22px; padding:6px 6px 6px 14px; background:var(--c-input); transition:border-color .2s}
html[dir="rtl"] .chat-form{padding:6px 14px 6px 6px}
.chat-form:focus-within{border-color:rgba(43,194,74,.6)}
.chat-form textarea{flex:1; min-width:0; background:none; border:0; outline:none; resize:none; font-size:15px; line-height:1.45; max-height:120px; padding:8px 0; height:38px}
.chat-form textarea::placeholder{color:var(--c-muted)}
.chat-form button{width:38px; height:38px; flex:none; border-radius:50%; border:0; background:var(--c-accent); color:var(--c-on-accent); display:grid; place-items:center; cursor:pointer}
.chat-form button:disabled{opacity:.4}
.chat-form button svg{width:18px; height:18px}
html[dir="rtl"] .chat-form button svg{transform:scaleX(-1)}
.disclaimer{margin:8px 4px 0; font-size:11.5px; color:var(--c-faint); text-align:center}
.ge-sr{position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap}
@media (max-width: 560px){
  .chat{inset:0; width:auto; height:100svh; border-radius:0}
  .fab{bottom:16px; inset-inline-end:16px; height:54px; padding:0 6px!important}
  .fab .lbl{display:none}
}

/* real-assistant extras: consent notice, reception label, contact buttons */
.c-notice{font-size:11.5px; line-height:1.5; color:var(--c-faint); text-align:center; padding:2px 12px 10px; margin:0 auto; max-width:330px}
.c-notice a{color:inherit; text-decoration:underline; text-underline-offset:2px}
.msg .who{display:block; font-size:11px; font-weight:600; opacity:.7; margin-bottom:3px}
a.c-chip{text-decoration:none; display:inline-flex; align-items:center; gap:4px}
