/* ────────────────────────────────────────────────────────────────
 *  SIERA Avatar Widget styles
 * ──────────────────────────────────────────────────────────────── */

#siera-avatar-container { position: fixed; z-index: 99999; }

/* ── Floating launcher pill ──────────────────────────────────── */
#siera-avatar-toggle {
  position: fixed;
  right: 22px;
  bottom: 22px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 18px 11px 12px;
  background: linear-gradient(135deg, #1e7a6e, #00b4a0);
  color: #fff;
  border: none;
  border-radius: 40px;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s;
  z-index: 100000;
}
#siera-avatar-toggle:hover  { transform: translateY(-2px); box-shadow: 0 9px 28px rgba(0,0,0,0.34); }
#siera-avatar-toggle:active { transform: translateY(0); }
#siera-avatar-toggle .siera-toggle-icon {
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.18);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 15px;
}
/* Hide the launcher while the panel is open */
#siera-avatar-container.siera-open #siera-avatar-toggle { opacity: 0; pointer-events: none; }

/* ── Avatar panel ────────────────────────────────────────────── */
#siera-avatar-panel {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 440px;
  height: 668px;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 40px);
  background: #0d1117;
  border: 1px solid #21262d;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, width 0.28s ease, height 0.28s ease;
}
#siera-avatar-container.siera-open #siera-avatar-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Wide mode — transcript open on desktop/tablet: SIERA + transcript side-by-side */
#siera-avatar-container.siera-wide #siera-avatar-panel {
  width: 800px;
  max-width: calc(100vw - 32px);
}

#siera-avatar-panel-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: #0d1117;
  border-bottom: 1px solid #21262d;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #e6edf3;
  letter-spacing: 0.04em;
}
#siera-avatar-close {
  background: none;
  border: none;
  color: #7d8590;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}
#siera-avatar-close:hover { color: #fff; background: #21262d; }

#siera-avatar-frame-host { flex: 1 1 auto; min-height: 0; }
#siera-avatar-iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ── Section highlight while SIERA tutors it ─────────────────────
   Persists for the whole section; removed when she moves on. */
.siera-active-section {
  position: relative;
  border-radius: 8px;
  background-color: rgba(0, 180, 160, 0.08);
  box-shadow: 0 0 0 2px rgba(0, 180, 160, 0.45),
              0 0 18px rgba(0, 180, 160, 0.18);
  scroll-margin: 100px;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  animation: siera-section-in 0.5s ease;
}
@keyframes siera-section-in {
  from { box-shadow: 0 0 0 0 rgba(0,180,160,0); background-color: transparent; }
  to   { box-shadow: 0 0 0 2px rgba(0,180,160,0.45), 0 0 18px rgba(0,180,160,0.18);
         background-color: rgba(0,180,160,0.08); }
}

/* ── Inline lesson launcher ──────────────────────────────────── */
.siera-inline-toggle { margin: 0 0 14px; }
#siera-inline-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: linear-gradient(135deg, #1e7a6e, #00b4a0);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
#siera-inline-toggle-btn:hover { opacity: 0.9; }

/* ── Mobile: panel fills the screen ──────────────────────────── */
@media (max-width: 520px) {
  #siera-avatar-panel {
    right: 0; bottom: 0; top: 0; left: 0;
    width: 100vw; height: 100vh;
    max-width: 100vw; max-height: 100vh;
    border-radius: 0;
  }
  #siera-avatar-toggle { right: 16px; bottom: 16px; }
}
