/* ============================================================
   ap-companion.css — Sprint 9I: Academic Companion™
   Contextual help widget (bottom-left floating)
   ============================================================ */

/* ── Trigger button ── */

.acp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  left: auto;
  z-index: 1200;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fff;
  border: 1.5px solid var(--color-border, #E2E8F0);
  box-shadow: 0 4px 16px rgba(30,58,138,0.10);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s, box-shadow 0.18s, transform 0.18s, border-color 0.18s;
  color: var(--color-text-muted, #64748B);
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  padding: 0;
}

.acp-btn:hover {
  background: #EFF6FF;
  border-color: #93C5FD;
  box-shadow: 0 6px 24px rgba(30,58,138,0.14);
  color: var(--color-primary, #1E3A8A);
  transform: translateY(-1px);
}

.acp-btn:focus-visible {
  outline: 2px solid var(--color-cta, #2563EB);
  outline-offset: 3px;
}

.acp-btn.is-active {
  background: var(--color-primary, #1E3A8A);
  border-color: var(--color-primary, #1E3A8A);
  color: #fff;
  box-shadow: 0 6px 24px rgba(30,58,138,0.25);
}

/* ── Panel ── */

.acp-panel {
  position: fixed;
  bottom: 80px;
  right: 24px;
  left: auto;
  z-index: 1200;
  width: 300px;
  background: #fff;
  border: 1px solid var(--color-border, #E2E8F0);
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15,23,42,0.12);
  opacity: 0;
  transform: translateY(12px) scale(0.97);
  pointer-events: none;
  transition: opacity 0.22s, transform 0.22s;
  transform-origin: bottom right;
}

.acp-panel.is-open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Panel header */

.acp-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 12px;
  border-bottom: 1px solid var(--color-border, #E2E8F0);
}

.acp-panel__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text, #334155);
  display: flex;
  align-items: center;
  gap: 7px;
}

.acp-panel__title-icon {
  font-size: 14px;
}

.acp-panel__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--color-text-muted, #64748B);
  padding: 0;
  transition: background 0.15s, color 0.15s;
}

.acp-panel__close:hover {
  background: #F1F5F9;
  color: var(--color-text, #334155);
}

/* Tips list */

.acp-panel__tips {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.acp-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.acp-tip__icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
  line-height: 1.4;
}

.acp-tip__text {
  font-size: 13px;
  color: var(--color-text, #334155);
  line-height: 1.55;
}

/* Footer */

.acp-panel__footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--color-border, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.acp-panel__help-link {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-cta, #2563EB);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: opacity 0.15s;
}

.acp-panel__help-link:hover { opacity: 0.75; }

.acp-panel__dismiss {
  font-size: 11px;
  color: var(--color-text-muted, #64748B);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.acp-panel__dismiss:hover { color: var(--color-text, #334155); }

/* ── Responsive ── */

@media (max-width: 480px) {
  .acp-btn  { bottom: 80px; right: 16px; left: auto; }
  .acp-panel { bottom: 136px; right: 16px; left: auto; width: calc(100vw - 32px); }
}
