/* ET+ AI Tutor — Instructor Co-pilot drawer (Phase 4 / 4.1).
 *
 * Floating launcher button + slide-in right-rail drawer with 6 quick
 * scaffold actions. Brand-aligned with the canonical cyberpunk-
 * futuristic shell.
 */

.etp-copilot-btn {
  position: fixed;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 999;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: linear-gradient(135deg, rgba(167, 139, 250, 0.18), rgba(0, 200, 255, 0.12));
  border: 1px solid rgba(167, 139, 250, 0.55);
  color: #E5F3FF;
  border-radius: 999px 0 0 999px;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  line-height: 1;
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.20);
  transition: padding 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}
.etp-copilot-btn:hover,
.etp-copilot-btn:focus-visible {
  padding-right: 18px;
  border-color: #A78BFA;
  box-shadow: 0 4px 24px rgba(167, 139, 250, 0.32);
  outline: none;
}
.etp-copilot-btn__label {
  font-size: 12px;
  letter-spacing: 0.06em;
  font-weight: 600;
}

.etp-copilot-panel {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  width: 380px;
  max-width: 90vw;
  background: #061224;
  border-left: 1px solid rgba(167, 139, 250, 0.40);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5), 0 0 24px rgba(167, 139, 250, 0.18);
  color: #C7D0E0;
  display: flex;
  flex-direction: column;
  transform: translateX(24px);
  opacity: 0;
  pointer-events: none;
  transition: transform 220ms ease, opacity 220ms ease;
  overflow: hidden;
}
.etp-copilot-panel[aria-hidden="false"] {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.etp-copilot-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(167, 139, 250, 0.22);
  background: linear-gradient(180deg, rgba(167, 139, 250, 0.10), transparent);
}
.etp-copilot-panel__head h2 {
  margin: 0;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #A78BFA;
}
.etp-copilot-close {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: inherit;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.etp-copilot-close:hover { border-color: #A78BFA; color: #A78BFA; }

.etp-copilot-panel__context {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(0, 0, 0, 0.18);
}
.etp-copilot-chip {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 200, 255, 0.10);
  border: 1px solid rgba(0, 200, 255, 0.32);
  font-size: 11px;
  color: #C7D0E0;
}
.etp-copilot-chip strong {
  color: #00C8FF;
  font-weight: 600;
  margin-right: 4px;
}
.etp-copilot-context-empty {
  margin: 0;
  font-size: 11px;
  color: #6E7B8F;
}

.etp-copilot-panel__actions {
  flex: 1;
  overflow-y: auto;
  padding: 12px 12px 4px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(167, 139, 250, 0.40) transparent;
}

.etp-copilot-action {
  display: flex;
  align-items: flex-start;
  width: 100%;
  gap: 12px;
  padding: 12px 14px;
  margin: 6px 4px;
  background: rgba(167, 139, 250, 0.05);
  border: 1px solid rgba(167, 139, 250, 0.22);
  border-radius: 10px;
  color: inherit;
  text-align: left;
  font-family: inherit;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.etp-copilot-action:hover,
.etp-copilot-action:focus-visible {
  background: rgba(167, 139, 250, 0.12);
  border-color: #A78BFA;
  transform: translateY(-1px);
}
.etp-copilot-action__icon {
  font-size: 22px;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}
.etp-copilot-action__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.etp-copilot-action__label {
  font-size: 14px;
  font-weight: 600;
  color: #E5F3FF;
}
.etp-copilot-action__hint {
  font-size: 11px;
  color: #8A99B3;
  line-height: 1.4;
}

.etp-copilot-panel__hint {
  margin: 0;
  padding: 10px 16px 14px 16px;
  font-size: 11px;
  color: #6E7B8F;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

@media (prefers-reduced-motion: reduce) {
  .etp-copilot-btn,
  .etp-copilot-panel,
  .etp-copilot-action { transition: none; }
}

@media (max-width: 600px) {
  .etp-copilot-btn { top: auto; bottom: 70px; transform: none; border-radius: 999px 0 0 999px; }
  .etp-copilot-panel { width: 100vw; max-width: 100vw; border-left: none; }
}
