/* ── Relationship Coach ────────────────────────────────────────────── */

/* Header badge on lightbulb button */
.coach-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  background: var(--rose);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  font-family: var(--ff-body);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  line-height: 1;
}

.coach-btn {
  position: relative;
}

.coach-pulse {
  animation: coachPulse 2s ease-in-out infinite;
}

@keyframes coachPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ── Coach Mascot (header button) ─────────────────────────────────── */

.coach-hdr-mascot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  animation: coachFloat 3s ease-in-out infinite;
}

.coach-hdr-mascot svg {
  width: 20px;
  height: 20px;
}

.coach-hdr-mascot.has-insight {
  animation: coachBounce 1.5s ease-in-out infinite;
  filter: drop-shadow(0 0 4px var(--rose-40));
}

/* Eye blink */
.coach-mascot-eye-l,
.coach-mascot-eye-r {
  transform-box: fill-box;
  transform-origin: center;
  animation: coachBlink 4s ease-in-out infinite;
}
.coach-mascot-eye-r { animation-delay: 0.1s; }

/* ── Coach idle modal (no insights) ──────────────────────────────── */

.coach-idle-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: coachFadeIn 0.2s ease;
}

.coach-idle-card {
  background: var(--bg2);
  border-radius: 16px;
  padding: 32px 28px 24px;
  max-width: 320px;
  width: 100%;
  text-align: center;
  animation: coachIdlePop 0.3s ease;
}

.coach-idle-card .coach-skills-section {
  text-align: left;
}

.coach-idle-mascot {
  margin-bottom: 16px;
  animation: coachFloat 3s ease-in-out infinite;
}

.coach-idle-text {
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.5;
}

@keyframes coachIdlePop {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

/* Panel header mascot */
.coach-panel-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-panel-mascot {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ── Keyframes ───────────────────────────────────────────────────── */

@keyframes coachFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes coachBlink {
  0%, 92%, 100% { transform: scaleY(1); }
  95% { transform: scaleY(0.1); }
}

@keyframes coachBounce {
  0%, 100% { transform: translateY(0) scale(1); }
  30% { transform: translateY(-5px) scale(1.05); }
  60% { transform: translateY(-2px) scale(1); }
}

/* ── Coach overlay ────────────────────────────────────────────────── */

.coach-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 1200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  animation: coachFadeIn 0.2s ease;
}

@keyframes coachFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.coach-panel {
  background: var(--bg2);
  border-radius: 20px 20px 0 0;
  max-width: 480px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  padding: 24px 20px 32px;
  animation: coachSlideUp 0.3s ease;
}

@keyframes coachSlideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}

.coach-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.coach-panel-title {
  font-family: var(--ff-heading);
  font-size: 20px;
  font-weight: 400;
  color: var(--cream);
}

.coach-close-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s;
}
.coach-close-btn:hover { color: var(--cream); }
.coach-close-btn svg { width: 20px; height: 20px; }

/* Category label */
.coach-category {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--ff-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
}

.coach-category--growth {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
}

.coach-category--opportunity {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

/* Moment content */
.coach-context {
  color: var(--muted);
  font-size: 13px;
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.5;
  margin-bottom: 16px;
}

.coach-suggestion {
  color: var(--cream);
  font-size: 14px;
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 12px 16px;
  background: var(--bg3);
  border-radius: 12px;
  border-left: 3px solid var(--rose);
}

/* Alternative replies */
.coach-alt-section {
  margin-bottom: 20px;
}

.coach-alt-label {
  font-size: 11px;
  font-weight: 500;
  font-family: var(--ff-body);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--muted);
  margin-bottom: 8px;
}

.coach-alt-reply {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 14px;
  margin-bottom: 6px;
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--cream);
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 300;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.coach-alt-reply:hover {
  border-color: var(--rose);
  background: rgba(232, 160, 184, 0.08);
}

/* Navigation */
.coach-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.coach-nav-btn {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  transition: color 0.2s;
}
.coach-nav-btn:hover { color: var(--cream); }
.coach-nav-btn:disabled { opacity: 0.3; cursor: default; }
.coach-nav-btn svg { width: 18px; height: 18px; }

.coach-nav-counter {
  font-size: 12px;
  color: var(--muted);
  font-family: var(--ff-body);
}

/* Action buttons */
.coach-actions {
  display: flex;
  gap: 10px;
}

.coach-ack-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  border: none;
  background: var(--rose);
  color: #fff;
  font-family: var(--ff-body);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: opacity 0.2s;
}
.coach-ack-btn:hover { opacity: 0.85; }

/* ── Stage reflection (distinct styling) ─────────────────────────── */

.coach-stage-reflection {
  text-align: center;
  padding: 8px 0;
}

.coach-stage-title {
  font-family: var(--ff-heading);
  font-size: 22px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 8px;
}

.coach-stage-subtitle {
  font-size: 13px;
  color: var(--muted);
  font-family: var(--ff-body);
  margin-bottom: 20px;
}

.coach-stage-body {
  text-align: left;
  font-size: 14px;
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.7;
  color: var(--cream);
  padding: 16px;
  background: var(--bg3);
  border-radius: 12px;
  margin-bottom: 20px;
}

/* ── Skill bars (coach modal) ─────────────────────────────────────── */

.coach-skills-section {
  padding: 12px 16px;
  margin-top: 12px;
  border-top: 1px solid var(--border);
}

.coach-skills-title {
  font-family: var(--ff-heading);
  font-size: 14px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 10px;
}

.coach-skill-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.coach-skill-name {
  font-size: 12px;
  font-family: var(--ff-body);
  font-weight: 300;
  color: var(--muted);
  flex: 1;
}

.coach-skill-band {
  font-size: 11px;
  font-family: var(--ff-body);
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 8px;
}

.coach-skill-band--emerging {
  background: rgba(158, 158, 158, 0.15);
  color: #bdbdbd;
}

.coach-skill-band--growing {
  background: rgba(255, 183, 77, 0.15);
  color: #ffb74d;
}

.coach-skill-band--strong {
  background: rgba(76, 175, 80, 0.15);
  color: #81c784;
}

.coach-skill-band--excellent {
  background: rgba(232, 160, 184, 0.15);
  color: var(--rose);
}

/* ── Know Yourself screen ─────────────────────────────────────────── */

.coach-pref-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-family: var(--ff-body);
  font-size: 13px;
}

.coach-pref-card {
  background: var(--bg3);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 12px;
}

.coach-pref-card-title {
  font-family: var(--ff-heading);
  font-size: 15px;
  font-weight: 400;
  color: var(--cream);
  margin-bottom: 8px;
}

.coach-pref-card-body {
  font-size: 13px;
  font-family: var(--ff-body);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text);
}

.coach-pref-dismiss {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 11px;
  font-family: var(--ff-body);
  cursor: pointer;
  padding: 4px 0;
  margin-top: 8px;
  transition: color 0.2s;
}
.coach-pref-dismiss:hover { color: var(--rose); }

.coach-pref-dismissed {
  opacity: 0.4;
}

/* ── Light theme ──────────────────────────────────────────────────── */

[data-theme="light"] .coach-panel {
  background: var(--bg2);
}

[data-theme="light"] .coach-suggestion {
  background: var(--bg3);
}

[data-theme="light"] .coach-alt-reply {
  background: var(--bg3);
}

[data-theme="light"] .coach-idle-card {
  background: var(--bg2);
}
