/* DigiSphere AI chat widget. Fixed dark palette so it reads the same in light and dark site themes. */
.dsk-ai { --a-bg: #081226; --a-panel: #0F1D38; --a-line: #22355C; --a-text: #EEF2FA; --a-soft: #A9B6CF; --a-gold: #FFC93C; --a-blue: #3D7BFF; --a-link: #7FB0FF; position: fixed; right: 18px; bottom: 18px; z-index: 99990; font: 15px/1.5 "DM Sans", system-ui, sans-serif; color: var(--a-text); }
.dsk-ai *, .dsk-ai *::before, .dsk-ai *::after { box-sizing: border-box; }
.dsk-ai[dir="rtl"] { right: auto; left: 18px; }

.dsk-ai__bubble { position: relative; display: block; width: 60px; height: 60px; padding: 0; border: 3px solid var(--a-gold); border-radius: 50%; background: var(--a-bg); cursor: pointer; box-shadow: 0 10px 28px rgba(8, 18, 38, 0.45); overflow: visible; transition: transform 0.18s ease; }
.dsk-ai__bubble:hover { transform: scale(1.05); }
.dsk-ai__bubble:focus-visible { outline: 3px solid var(--a-link); outline-offset: 3px; }
.dsk-ai__bubble img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.dsk-ai__dot { position: absolute; right: 1px; bottom: 1px; width: 14px; height: 14px; border-radius: 50%; background: #4FD8A4; border: 2px solid var(--a-bg); }
.dsk-ai.is-open .dsk-ai__bubble, .dsk-ai.is-live .dsk-ai__bubble { display: none; }

.dsk-ai__panel { position: absolute; right: 0; bottom: 0; width: 370px; height: min(600px, calc(100vh - 36px)); display: flex; flex-direction: column; background: var(--a-bg); border: 1px solid var(--a-line); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45); overflow: hidden; }
.dsk-ai[dir="rtl"] .dsk-ai__panel { right: auto; left: 0; }
.dsk-ai__panel[hidden] { display: none; }

.dsk-ai__head { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: var(--a-panel); border-bottom: 1px solid var(--a-line); }
.dsk-ai__head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid var(--a-gold); flex: none; }
.dsk-ai__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dsk-ai__who strong { font: 700 16px/1.2 Outfit, system-ui, sans-serif; color: #fff; }
.dsk-ai__who span { font-size: 12.5px; color: var(--a-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dsk-ai__close { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: var(--a-soft); cursor: pointer; }
.dsk-ai__close:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.dsk-ai__log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.dsk-ai__msg { max-width: 86%; padding: 9px 13px; border-radius: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.dsk-ai__msg--ai { align-self: flex-start; background: var(--a-panel); border: 1px solid var(--a-line); border-end-start-radius: 4px; }
.dsk-ai__msg--me { align-self: flex-end; background: var(--a-blue); color: #fff; border-end-end-radius: 4px; }
.dsk-ai__msg a { color: var(--a-link); font-weight: 600; text-decoration: underline; }
.dsk-ai__msg--me a { color: #fff; }
.dsk-ai__typing { display: flex; gap: 4px; padding: 13px 14px; }
.dsk-ai__typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--a-soft); animation: dskAiDot 1.1s infinite ease-in-out; }
.dsk-ai__typing i:nth-child(2) { animation-delay: 0.15s; }
.dsk-ai__typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes dskAiDot { 0%, 80%, 100% { opacity: 0.3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.dsk-ai__choice { align-self: stretch; margin-top: 4px; padding: 12px; border: 1px solid var(--a-gold); border-radius: 14px; background: rgba(255, 201, 60, 0.06); display: flex; flex-direction: column; gap: 8px; }
.dsk-ai__choice p { margin: 0 0 2px; font-weight: 600; }
.dsk-ai__btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 14px; border: 2px solid var(--a-gold); border-radius: 10px; background: transparent; color: var(--a-gold); font: 700 15px "DM Sans", system-ui, sans-serif; text-decoration: none; cursor: pointer; }
.dsk-ai__btn--main { background: var(--a-gold); color: var(--a-bg); }
.dsk-ai__btn:focus-visible { outline: 3px solid var(--a-link); outline-offset: 2px; }

.dsk-ai__form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--a-line); background: var(--a-panel); }
.dsk-ai__input { flex: 1; min-height: 44px; max-height: 120px; padding: 11px 12px; border: 1px solid var(--a-line); border-radius: 12px; background: var(--a-bg); color: var(--a-text); font: 16px/1.4 "DM Sans", system-ui, sans-serif; resize: none; }
.dsk-ai__input::placeholder { color: #7C8AA6; }
.dsk-ai__input:focus { outline: 2px solid var(--a-blue); outline-offset: 0; border-color: transparent; }
.dsk-ai__send { flex: none; width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 12px; background: var(--a-gold); color: var(--a-bg); cursor: pointer; }
.dsk-ai[dir="rtl"] .dsk-ai__send svg { transform: scaleX(-1); }
.dsk-ai__send:disabled { opacity: 0.5; cursor: wait; }

.dsk-ai__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; padding: 6px 14px 10px; background: var(--a-panel); font-size: 12px; color: var(--a-soft); }
.dsk-ai__foot a { color: var(--a-soft); }
.dsk-ai__person { padding: 4px 0; border: 0; background: none; color: var(--a-gold); font: 700 12.5px "DM Sans", system-ui, sans-serif; cursor: pointer; text-decoration: underline; }

.dsk-ai__teaser { position: absolute; right: 0; bottom: 74px; width: max-content; max-width: min(260px, calc(100vw - 28px)); animation: dskAiPop 0.35s ease-out both; }
.dsk-ai[dir="rtl"] .dsk-ai__teaser { right: auto; left: 0; }
.dsk-ai__teaser-text { display: block; margin: 0; padding: 12px 30px 12px 14px; border: 1px solid #E3E8F2; border-radius: 14px 14px 4px 14px; background: #FFFFFF; color: #081226; font: 600 15px/1.4 "DM Sans", system-ui, sans-serif; text-align: start; cursor: pointer; box-shadow: 0 10px 28px rgba(8, 18, 38, 0.3); }
.dsk-ai[dir="rtl"] .dsk-ai__teaser-text { padding: 12px 14px 12px 30px; border-radius: 14px 14px 14px 4px; }
.dsk-ai__teaser-text:focus-visible { outline: 3px solid var(--a-blue); outline-offset: 2px; }
.dsk-ai__teaser-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #5A6785; cursor: pointer; }
.dsk-ai[dir="rtl"] .dsk-ai__teaser-x { right: auto; left: 4px; }
.dsk-ai__teaser-x:hover { background: #EEF2FA; color: #081226; }
.dsk-ai.is-open .dsk-ai__teaser { display: none; }
@keyframes dskAiPop { from { opacity: 0; transform: translateY(8px) scale(0.96); } to { opacity: 1; transform: none; } }

@media (max-width: 599px) {
	.dsk-ai { right: 14px; bottom: 14px; }
	.dsk-ai[dir="rtl"] { left: 14px; }
	.dsk-ai.is-open { inset: 0; }
	.dsk-ai.is-open .dsk-ai__panel { position: fixed; inset: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.dsk-ai__bubble { transition: none; }
	.dsk-ai__typing i { animation: none; opacity: 0.7; }
	.dsk-ai__teaser { animation: none; }
}
