/* ═══ parolingo Assistent – Kugel, Sprechblase, FAQ und Tutorial ═══ */

/* ── gemeinsam ── */
.pa-root [hidden], .pa-tut-head [hidden] { display: none !important; }
.pa-w { opacity: .18; transition: opacity .25s ease; }
.pa-w.on { opacity: 1; }
.pa-orb-cv { display: block; width: 100%; height: 100%; }

/* ═══ FAQ-Assistent (Startseite) ═══ */
.pa-root { position: fixed; right: 22px; bottom: 22px; z-index: 900; font-family: "Segoe UI", system-ui, -apple-system, Arial, sans-serif; }

.pa-launch {
  position: relative; width: 74px; height: 74px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer; display: block;
  filter: drop-shadow(0 10px 24px rgba(28,58,94,.45));
  transition: transform .3s cubic-bezier(.2,.9,.3,1.3);
}
.pa-launch:hover { transform: scale(1.08); }
.pa-launch:focus-visible { outline: 3px solid #7ec8f0; outline-offset: 3px; }
.pa-launch::after {                         /* sanfter Ring, der zum Klicken einlädt */
  content: ""; position: absolute; inset: 6px; border-radius: 50%;
  border: 2px solid rgba(126,200,240,.55); animation: pa-ring 2.8s ease-out infinite; pointer-events: none;
}
.pa-open .pa-launch::after { animation: none; opacity: 0; }
@keyframes pa-ring { 0% { transform: scale(.85); opacity: .9; } 100% { transform: scale(1.45); opacity: 0; } }

.pa-teaser {
  position: absolute; right: 84px; bottom: 18px; white-space: nowrap;
  background: #fff; color: #1c3a5e; font-size: .9rem; padding: 10px 34px 10px 16px;
  border-radius: 16px 16px 4px 16px; box-shadow: 0 12px 32px rgba(28,58,94,.22); border: 1px solid #d0dce8;
  opacity: 0; transform: translateX(10px) scale(.96); pointer-events: none; cursor: pointer;
  transition: opacity .4s ease, transform .4s cubic-bezier(.2,.9,.3,1.2);
}
.pa-teaser b { color: #2d6a9f; }
.pa-teaser.show { opacity: 1; transform: none; pointer-events: auto; }
.pa-teaser-x { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); border: 0; background: none; color: #8aa0b5; font-size: 1.1rem; cursor: pointer; line-height: 1; }

.pa-panel {
  position: absolute; right: 0; bottom: 90px; width: min(400px, calc(100vw - 32px));
  max-height: min(640px, calc(100vh - 130px)); display: flex; flex-direction: column;
  background: linear-gradient(165deg, rgba(16,36,64,.97) 0%, rgba(10,20,36,.98) 100%);
  border: 1px solid rgba(126,200,240,.22); border-radius: 26px; overflow: hidden; color: #e6f0fa;
  box-shadow: 0 30px 80px rgba(6,16,32,.55), 0 0 0 1px rgba(255,255,255,.04) inset;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; transform: translateY(16px) scale(.97); transform-origin: bottom right;
  transition: opacity .35s ease, transform .35s cubic-bezier(.2,.9,.3,1.15);
}
.pa-open .pa-panel { opacity: 1; transform: none; }
.pa-panel::before {                         /* Lichtschein oben */
  content: ""; position: absolute; left: -20%; right: -20%; top: -140px; height: 260px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(74,143,192,.35), transparent);
}

.pa-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 16px 14px 12px 16px; }
.pa-head-orb { width: 56px; height: 56px; flex: none; }
.pa-head-txt { flex: 1; min-width: 0; }
.pa-name { font-weight: 800; font-size: 1.02rem; letter-spacing: -.01em; color: #fff; }
.pa-state { display: flex; align-items: center; gap: 7px; font-size: .78rem; color: #9cc2e0; margin-top: 2px; }
.pa-dot { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 8px #34d399; }
.pa-speaking .pa-dot { background: #7ec8f0; box-shadow: 0 0 10px #7ec8f0; animation: pa-blink 1s ease-in-out infinite; }
@keyframes pa-blink { 50% { opacity: .35; } }
.pa-icon {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(126,200,240,.2);
  background: rgba(255,255,255,.05); color: #cfe3f5; font-size: .95rem; cursor: pointer; flex: none;
  display: flex; align-items: center; justify-content: center; transition: background .2s;
}
.pa-icon:hover { background: rgba(126,200,240,.16); }
.pa-close { font-size: 1.35rem; line-height: 1; }

.pa-chat { position: relative; padding: 4px 16px 14px; }
.pa-q {
  margin: 0 0 10px auto; max-width: 85%; width: fit-content; background: #2d6a9f; color: #fff;
  padding: 9px 14px; border-radius: 16px 16px 4px 16px; font-size: .9rem; font-weight: 600;
  animation: pa-pop .35s cubic-bezier(.2,.9,.3,1.2);
}
.pa-bubble {
  position: relative; background: linear-gradient(160deg, rgba(74,143,192,.22), rgba(45,106,159,.14));
  border: 1px solid rgba(126,200,240,.28); border-radius: 4px 18px 18px 18px;
  padding: 13px 15px; font-size: .95rem; line-height: 1.6; color: #eef6fd; min-height: 64px;
}
.pa-replay {
  margin-top: 8px; border: 0; background: none; color: #7ec8f0; font-weight: 700; font-size: .82rem;
  cursor: pointer; padding: 0;
}
.pa-replay:hover { text-decoration: underline; }
@keyframes pa-pop { from { opacity: 0; transform: translateY(6px) scale(.97); } to { opacity: 1; transform: none; } }

.pa-list-wrap { display: flex; flex-direction: column; min-height: 0; flex: 1; border-top: 1px solid rgba(126,200,240,.14); }
.pa-search {
  margin: 12px 16px 8px; padding: 9px 14px; border-radius: 12px; border: 1px solid rgba(126,200,240,.22);
  background: rgba(255,255,255,.06); color: #fff; font-size: .9rem; outline: none;
}
.pa-search::placeholder { color: #8fb0cc; }
.pa-search:focus { border-color: #7ec8f0; background: rgba(255,255,255,.09); }
.pa-list { overflow-y: auto; padding: 2px 12px 14px; display: flex; flex-direction: column; gap: 6px; scrollbar-width: thin; scrollbar-color: rgba(126,200,240,.3) transparent; }
.pa-chip {
  display: flex; align-items: center; gap: 10px; text-align: left; width: 100%;
  padding: 10px 12px; border-radius: 12px; border: 1px solid rgba(126,200,240,.12);
  background: rgba(255,255,255,.035); color: #dbe9f6; font-size: .88rem; cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.pa-chip:hover { background: rgba(126,200,240,.12); border-color: rgba(126,200,240,.35); transform: translateX(2px); }
.pa-chip.active { background: rgba(45,106,159,.45); border-color: #4a8fc0; color: #fff; }
.pa-chip-n { font-size: .7rem; font-weight: 800; color: #7ec8f0; opacity: .8; font-variant-numeric: tabular-nums; }

@media (max-width: 520px) {
  .pa-root { right: 14px; bottom: 14px; }
  .pa-launch { width: 62px; height: 62px; }
  .pa-teaser { right: 70px; bottom: 12px; font-size: .84rem; }
  .pa-panel { position: fixed; left: 10px; right: 10px; bottom: 86px; width: auto; max-height: calc(100vh - 110px); }
}
@media (prefers-reduced-motion: reduce) {
  .pa-launch::after { animation: none; }
  .pa-panel, .pa-teaser { transition: opacity .2s; }
}

/* ═══ Tutorial mit Assistent (Simulation) ═══ */
#tutorial-modal.pa-tut { background: radial-gradient(ellipse at 50% 30%, rgba(22,54,95,.82), rgba(4,10,20,.9)); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
#tutorial-modal.pa-tut #tutorial-box {
  background: linear-gradient(165deg, rgba(16,36,64,.97), rgba(10,20,36,.98));
  border: 1px solid rgba(126,200,240,.22); border-radius: 26px; padding: 18px 24px 20px; max-width: 500px;
  box-shadow: 0 30px 90px rgba(0,0,0,.55); overflow: hidden;
}
#tutorial-modal.pa-tut #tutorial-box::before {
  content: ""; position: absolute; left: -20%; right: -20%; top: -150px; height: 280px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(74,143,192,.38), transparent);
}
#tutorial-modal.pa-tut.open #tutorial-box { animation: pa-pop .45s cubic-bezier(.2,.9,.3,1.15); }
.pa-tut-head { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 6px; }
.pa-tut-orb { position: relative; width: 112px; height: 112px; cursor: pointer; border: 0; background: none; padding: 0; }
.pa-tut-tap {
  position: absolute; left: 50%; bottom: -4px; transform: translateX(-50%); white-space: nowrap;
  background: #2d6a9f; color: #fff; font-size: .72rem; font-weight: 700; padding: 4px 10px; border-radius: 999px;
  box-shadow: 0 6px 16px rgba(0,0,0,.35); animation: pa-blink 1.6s ease-in-out infinite; display: none;
}
.pa-tut-blocked .pa-tut-tap { display: block; }
.pa-tut-name { font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9cc2e0; margin-top: 4px; display: flex; align-items: center; gap: 8px; }
.pa-tut-voice { border: 0; background: none; cursor: pointer; font-size: .9rem; padding: 0; opacity: .85; }
#tutorial-modal.pa-tut .tut-content {
  position: relative; height: 262px; margin-top: 10px; justify-content: flex-start;
  background: linear-gradient(160deg, rgba(74,143,192,.2), rgba(45,106,159,.12));
  border: 1px solid rgba(126,200,240,.26); border-radius: 18px; padding: 16px 18px; overflow-y: auto;
}
#tutorial-modal.pa-tut .tut-content::before {   /* Sprechblasen-Spitze zur Kugel */
  content: ""; position: absolute; top: -8px; left: 50%; width: 14px; height: 14px; transform: translateX(-50%) rotate(45deg);
  background: rgba(46,90,135,.55); border-left: 1px solid rgba(126,200,240,.26); border-top: 1px solid rgba(126,200,240,.26);
}
#tutorial-modal.pa-tut .tut-emoji { display: none; }
#tutorial-modal.pa-tut .tut-step-title { color: #fff; font-size: 1.08rem; }
#tutorial-modal.pa-tut .tut-step-body { color: #d6e6f5; }
#tutorial-modal.pa-tut .tut-step-body strong { color: #7ec8f0; }
#tutorial-modal.pa-tut .tut-content.pa-in { animation: pa-pop .35s ease; }
#tutorial-modal.pa-tut .tut-dot { background: rgba(126,200,240,.2); }
#tutorial-modal.pa-tut .tut-dot.active { background: #7ec8f0; box-shadow: 0 0 8px #7ec8f0; width: 20px; border-radius: 99px; }
