/* Asystent importowy "Marcin" (31.10.2026) - przycisk w prawym dolnym rogu i panel czatu.
   Przycisk ma ten sam ksztalt co "do gory" (.go-top: 44x44, promien 12, prawo 18px) i stoi
   nad nim - wczesniej nachodzily na siebie. */
.as { position: fixed; right: 18px; bottom: 108px; z-index: 1050; font-family: inherit; }
.as__start { position: relative; display: block; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 12px; background: #efeaff; cursor: pointer; box-shadow: 0 8px 20px rgba(91,60,196,.35), inset 0 0 0 1.5px rgba(91,60,196,.35); transition: transform .2s, box-shadow .2s; }
.as__start:hover, .as__start:focus-visible { transform: translateY(-2px); box-shadow: 0 12px 26px rgba(91,60,196,.45), inset 0 0 0 1.5px #5b3cc4; }
.as__start .as__awatar { width: 44px; height: 44px; border-radius: 12px; }
.as__start::after { content: ""; position: absolute; right: -3px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: #14a35a; box-shadow: 0 0 0 2px #fff; }
/* podpis wysuwany przy najechaniu (desktop) */
.as__start-t { position: absolute; right: 54px; top: 50%; transform: translateY(-50%) translateX(6px); padding: 7px 12px; border-radius: 10px; background: #1b1340; color: #fff; font-size: 13px; font-weight: 800; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.as__start:hover .as__start-t, .as__start:focus-visible .as__start-t { opacity: 1; transform: translateY(-50%); }
.as.is-otwarty .as__start { display: none; }
.as__awatar { position: relative; display: block; flex: none; width: 44px; height: 44px; border-radius: 50%; overflow: hidden; }
.as__awatar svg { display: block; width: 100%; height: 100%; }
.as__awatar--maly { width: 40px; height: 40px; background: #efeaff; }
.as__awatar--mini { width: 28px; height: 28px; margin-top: 2px; }

.as__panel { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; width: min(380px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 100px)); border-radius: 22px; background: #fff; box-shadow: 0 30px 70px -20px rgba(27,19,64,.55), inset 0 0 0 1px rgba(15,17,21,.06); overflow: hidden; }
.as__panel[hidden] { display: none; }
.as__glowa { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; background: linear-gradient(135deg, #1b1340, #3b2796); color: #fff; }
.as__kto { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.as__kto b { font-size: 15px; font-weight: 800; }
.as__kto small { font-size: 11.5px; font-weight: 600; color: #d9d0ff; }
/* zamykanie: wyrazny bialy przycisk (na mobile wczesniej ginal) */
.as__zamknij { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 10px; background: #fff; color: #1b1340; cursor: pointer; }
.as__zamknij svg { width: 16px; height: 16px; }
.as__zamknij:hover { background: #efeaff; }

.as__wiad { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f7f8fb; }
.as__w { display: flex; gap: 8px; align-items: flex-start; }
.as__w--ja { justify-content: flex-end; }
.as__dymek { max-width: 86%; padding: 10px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.5; color: #0f1115; background: #fff; box-shadow: 0 1px 0 rgba(15,17,21,.05), inset 0 0 0 1px rgba(15,17,21,.06); overflow-wrap: anywhere; }
.as__w--ja .as__dymek { background: #5b3cc4; color: #fff; box-shadow: none; }
.as__dymek p { margin: 0 0 6px; }
.as__dymek p:last-child { margin-bottom: 0; }
.as__dymek ul { margin: 0 0 8px; padding-left: 16px; }
.as__dymek li { margin: 3px 0; }
.as__dymek li small { display: block; font-size: 12px; color: #6b6f7d; }
.as__dymek a { color: #5b3cc4; font-weight: 700; }
.as__sek { margin-top: 6px !important; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #6b6f7d; }
.as__mala { font-size: 12px; color: #6b6f7d; }
.as__ai { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 2px; border-radius: 50%; background: rgba(91,60,196,.6); color: #fff; font-size: 8px; font-weight: 600; vertical-align: 1px; }
.as__kontakt { list-style: none; padding-left: 0 !important; }
.as__pisze { display: flex; gap: 4px; }
.as__pisze i { width: 7px; height: 7px; border-radius: 50%; background: #8a72e6; animation: as-pisze 1s ease-in-out infinite; }
.as__pisze i:nth-child(2) { animation-delay: .15s; } .as__pisze i:nth-child(3) { animation-delay: .3s; }
@keyframes as-pisze { 0%, 100% { opacity: .3; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

.as__przyklady { flex: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; background: #f7f8fb; }
.as__przyklady[hidden] { display: none; }
.as__przyklady button { padding: 6px 10px; border: 1px solid rgba(91,60,196,.25); border-radius: 999px; background: #fff; color: #5b3cc4; font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; }
.as__przyklady button:hover { background: #f0ebff; }
.as__ts:empty { display: none; }
.as__ts { padding: 6px 14px 0; background: #f7f8fb; }
.as__form { flex: none; display: flex; gap: 8px; padding: 10px 12px; background: #f7f8fb; }
.as__form input { flex: 1; min-width: 0; height: 42px; padding: 0 12px; border: 1.5px solid rgba(15,17,21,.14); border-radius: 12px; font: inherit; font-size: 16px; }
.as__form input:focus { outline: none; border-color: #5b3cc4; box-shadow: 0 0 0 3px rgba(91,60,196,.15); }
.as__form button { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 0; border-radius: 12px; background: #5b3cc4; color: #fff; cursor: pointer; }
.as__form button svg { width: 18px; height: 18px; }
.as__nota { flex: none; margin: 0; padding: 8px 14px 12px; font-size: 11px; line-height: 1.45; color: #686d7a; background: #f7f8fb; border-top: 1px solid rgba(15,17,21,.05); }

/* mobile: mniejsze okienko od dolu (gora strony zostaje widoczna, naglowek z X zawsze na ekranie);
   dvh - wysokosc bez paska adresu przegladarki */
@media (max-width: 760px) {
  .as { right: 18px; bottom: 108px; }
  .as__start-t { display: none; }
  .as__panel { left: 8px; right: 8px; bottom: 8px; width: auto; height: min(520px, 72dvh); border-radius: 18px; }
  .as__glowa { padding: 10px 10px 10px 12px; }
  .as__nota { padding: 6px 12px 8px; font-size: 10.5px; }
  .as__przyklady { padding-top: 6px; }
}
@media (prefers-reduced-motion: reduce) { .as__pisze i { animation: none; } }

/* (01.11.2026) zielona kropka "dostepny" pulsuje - fala rozchodzi sie wokol kropki (transform/box-shadow, bez wplywu na uklad) */
.as__start::after { animation: as-puls 2s ease-out infinite; }
@keyframes as-puls { 0% { box-shadow: 0 0 0 2px #fff, 0 0 0 2px rgba(20,163,90,.55); } 70% { box-shadow: 0 0 0 2px #fff, 0 0 0 10px rgba(20,163,90,0); } 100% { box-shadow: 0 0 0 2px #fff, 0 0 0 10px rgba(20,163,90,0); } }
@media (prefers-reduced-motion: reduce) { .as__start::after { animation: none; } }
