/* Live wsparcie – widżet „Czatuj z nami” (prawy dolny róg) */
.sgg-live {
    --lv-bg: #000e32;          /* granat jak tło strony */
    --lv-bg2: #001647;
    --lv-card: #0a2160;
    --lv-line: rgba(0, 235, 252, .16);
    --lv-acc: #00ebfc;         /* akcent Superion */
    --lv-acc-d: #00c4d3;
    --lv-ink: #001233;         /* tekst na akcencie */
    --lv-txt: #e8eefc;
    --lv-muted: #8ea0c6;
    --lv-bad: #f87171;
    --lv-ok: #22c55e;
    position: fixed; right: 18px; bottom: 18px; z-index: 99990;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 14px; line-height: 1.5; color: var(--lv-txt);
}
.sgg-live *, .sgg-live *::before, .sgg-live *::after { box-sizing: border-box; }
.sgg-live button { font: inherit; }
.sgg-live :focus-visible { outline: 2px solid var(--lv-acc); outline-offset: 2px; }

/* ---------- Sąsiedzi w prawym dolnym rogu ---------- */
/* Przełącznik języka TranslatePress (#trp-floater-ls, z-index 9999999) – stoi na lewo od przycisku czatu,
   a przy otwartym czacie znika, żeby nie zasłaniał okna. */
#trp-floater-ls.trp-bottom-right { right: 168px !important; }
html.sgg-live-open #trp-floater-ls { display: none !important; }
/* Strzałka „do góry” motywu Newspaper – nad przyciskiem czatu */
.td-scroll-up { bottom: 84px !important; }
html.sgg-live-open .td-scroll-up { display: none !important; }

/* ---------- Logo Superion (pad) wykadrowane z pion-pwhite.png (726×532) – bez napisu SUPERIONGG.COM ---------- */
.sgg-live__brand {
    position: relative; flex: none; display: inline-block;
    width: 40px; height: 27px;
    background: url("https://superiongg.b-cdn.net/2026/03/pion-pwhite.png") no-repeat;
    background-size: 123.05% auto;          /* 726 / 590 */
    background-position: 50% 6.06%;         /* kadr x 68–658, y 8–408 */
}
.sgg-live__dot {
    position: absolute; width: 10px; height: 10px; border-radius: 50%;
    background: var(--lv-ok); box-shadow: 0 0 0 2px var(--lv-bg);
}

/* ---------- Przycisk ---------- */
.sgg-live__launcher {
    position: relative; display: flex; align-items: center; gap: 10px; margin-left: auto;
    background: linear-gradient(135deg, var(--lv-bg2), var(--lv-bg)); color: #fff;
    border: 1px solid rgba(0, 235, 252, .35); border-radius: 999px;
    padding: 10px 18px 10px 14px; cursor: pointer; font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 0 0 4px rgba(0, 235, 252, .06);
    transition: border-color .15s, transform .15s, box-shadow .15s;
}
.sgg-live__launcher:hover { border-color: var(--lv-acc); transform: translateY(-2px); box-shadow: 0 14px 34px rgba(0, 0, 0, .5), 0 0 0 5px rgba(0, 235, 252, .1); }
.sgg-live__launcher .sgg-live__brand { width: 46px; height: 31px; transition: transform .2s; }
.sgg-live__launcher:hover .sgg-live__brand { transform: rotate(-6deg) scale(1.06); }
.sgg-live__launcher .sgg-live__dot { right: -3px; bottom: -2px; width: 9px; height: 9px; }
.sgg-live__label { font-weight: 800; letter-spacing: .06em; text-transform: uppercase; font-size: 13px; }
.sgg-live__badge {
    position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--lv-acc); color: var(--lv-ink); font-size: 11px; font-weight: 800;
    display: none; align-items: center; justify-content: center; box-shadow: 0 0 0 2px var(--lv-bg);
}
.sgg-live__badge.is-on { display: inline-flex; }

/* ---------- Panel ---------- */
.sgg-live__panel {
    display: none; flex-direction: column;
    width: 380px; height: min(600px, calc(100vh - 40px));
    background: var(--lv-bg); border: 1px solid var(--lv-line); border-radius: 20px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, .6); overflow: hidden;
}
.sgg-live.is-open .sgg-live__panel { display: flex; animation: sgg-live-in .18s ease-out; }
.sgg-live.is-open .sgg-live__launcher { display: none; }
@keyframes sgg-live-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.sgg-live__head {
    display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 16px;
    background: radial-gradient(120% 140% at 0% 0%, rgba(0, 235, 252, .16), transparent 60%), var(--lv-bg2);
    border-bottom: 1px solid var(--lv-line);
}
.sgg-live__avatar {
    position: relative; flex: none; width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 235, 252, .1); border: 1px solid rgba(0, 235, 252, .25);
}
.sgg-live__avatar .sgg-live__brand { width: 34px; height: 23px; }
.sgg-live__avatar .sgg-live__dot { right: -3px; bottom: -3px; }
.sgg-live__ht { flex: 1; min-width: 0; }
.sgg-live__ht b { display: block; font-size: 16px; color: #fff; line-height: 1.25; }
.sgg-live__ht span { display: block; font-size: 12px; color: var(--lv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sgg-live__icon {
    flex: none; width: 34px; height: 34px; border-radius: 10px; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; color: var(--lv-muted); transition: background .15s, color .15s;
}
.sgg-live__icon:hover { color: #fff; background: rgba(255, 255, 255, .08); }

/* ---------- Wiadomości ---------- */
.sgg-live__body {
    flex: 1; overflow-y: auto; padding: 16px 14px; display: flex; flex-direction: column; gap: 12px;
    scrollbar-width: thin; scrollbar-color: #1d3270 transparent; overscroll-behavior: contain;
}
.sgg-live__row { display: flex; gap: 8px; align-items: flex-end; max-width: 100%; }
.sgg-live__row--user { justify-content: flex-end; }
.sgg-live__col { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 82%; }
.sgg-live__row--user .sgg-live__col { align-items: flex-end; }
.sgg-live__mini {
    flex: none; width: 28px; height: 28px; border-radius: 9px; margin-bottom: 18px;
    display: flex; align-items: center; justify-content: center; background: rgba(0, 235, 252, .1);
}
.sgg-live__typing .sgg-live__mini { margin-bottom: 0; }
.sgg-live__mini .sgg-live__brand { width: 21px; height: 14px; }
.sgg-live__msg {
    padding: 10px 13px; border-radius: 16px; white-space: pre-wrap; overflow-wrap: anywhere; word-break: normal;
}
.sgg-live__msg strong { font-weight: 700; color: #fff; }
.sgg-live__msg a { color: var(--lv-acc); text-decoration: underline; text-underline-offset: 2px; }
.sgg-live__msg a:hover { color: #fff; }
.sgg-live__msg--ai { background: var(--lv-card); border: 1px solid var(--lv-line); border-bottom-left-radius: 5px; }
.sgg-live__msg--user { background: var(--lv-acc); color: var(--lv-ink); border-bottom-right-radius: 5px; font-weight: 500; }
.sgg-live__time { font-size: 10.5px; color: var(--lv-muted); padding: 0 4px; }
.sgg-live__note { align-self: center; max-width: 92%; font-size: 12px; color: var(--lv-muted); text-align: center; padding: 2px 8px; }
.sgg-live__note--err { color: var(--lv-bad); }

.sgg-live__dots { display: inline-flex; gap: 4px; padding: 4px 2px; }
.sgg-live__dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--lv-muted); animation: sgg-live-dot 1.2s infinite ease-in-out; }
.sgg-live__dots i:nth-child(2) { animation-delay: .15s; }
.sgg-live__dots i:nth-child(3) { animation-delay: .3s; }
@keyframes sgg-live-dot { 0%, 60%, 100% { opacity: .35; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-4px); } }

/* Szybkie pytania */
.sgg-live__chips { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 36px; }
.sgg-live__chip {
    background: transparent; color: var(--lv-acc); border: 1px solid rgba(0, 235, 252, .4);
    border-radius: 999px; padding: 7px 13px; font-size: 13px; font-weight: 600; cursor: pointer;
    transition: background .15s, color .15s;
}
.sgg-live__chip:hover { background: var(--lv-acc); color: var(--lv-ink); }

/* ---------- Pole wiadomości ---------- */
.sgg-live__foot { padding: 10px 12px 10px; border-top: 1px solid var(--lv-line); background: var(--lv-bg); }
.sgg-live__compose {
    display: flex; align-items: flex-end; gap: 6px; padding: 5px 5px 5px 14px;
    background: var(--lv-bg2); border: 1px solid var(--lv-line); border-radius: 22px; transition: border-color .15s;
}
.sgg-live__compose:focus-within { border-color: rgba(0, 235, 252, .55); }
/* !important – motyw Newspaper nadaje textarea własną wysokość, tło i ramkę */
.sgg-live .sgg-live__compose textarea {
    flex: 1; min-width: 0; resize: none !important; border: 0 !important; outline: 0; background: transparent !important;
    color: var(--lv-txt) !important; font: inherit; line-height: 1.45 !important; padding: 7px 0 !important; margin: 0 !important;
    height: 34px; min-height: 34px !important; max-height: 120px !important; box-shadow: none !important; border-radius: 0 !important;
}
.sgg-live__compose textarea:focus-visible { outline: 0; }
.sgg-live__compose textarea::placeholder { color: #6b7fae; }
.sgg-live__send {
    flex: none; width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--lv-acc); color: var(--lv-ink); transition: background .15s, transform .15s;
}
.sgg-live__send:hover { background: var(--lv-acc-d); transform: scale(1.05); }
.sgg-live__send:disabled { opacity: .5; cursor: default; transform: none; }
.sgg-live__fine { margin-top: 7px; display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: var(--lv-muted); padding: 0 4px; }
.sgg-live__finelinks { display: inline-flex; gap: 12px; flex: none; }
.sgg-live__fine a, .sgg-live__end { color: var(--lv-muted); text-decoration: underline; }
.sgg-live__fine a:hover { color: var(--lv-acc); }
.sgg-live__end { background: none; border: 0; padding: 0; cursor: pointer; font-size: 11px; }
.sgg-live__end:hover { color: var(--lv-bad); }
.sgg-live__end[hidden] { display: none; }
.sgg-live__ended { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 6px 0; }

/* ---------- Telefon ---------- */
@media (max-width: 480px) {
    .sgg-live { right: 12px; bottom: 12px; }
    .sgg-live.is-open { inset: 0; }
    .sgg-live__panel { width: 100%; height: 100%; border-radius: 0; border: 0; }
    .sgg-live__launcher { padding: 10px 12px; }
    .sgg-live__launcher .sgg-live__label { display: none; }
    #trp-floater-ls.trp-bottom-right { right: 92px !important; }
    .sgg-live__col { max-width: 86%; }
}
