/* ══════════════════════════════════════════════
   05-bab-a-b.css
   Bab A: Drag & Drop Timeline
   Bab B: Sprint Planning Simulation
   ══════════════════════════════════════════════ */

/* ─────────────────────────────────────────────
   BAB A — DRAG & DROP
───────────────────────────────────────────── */
.mode-selector {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.mode-btn {
  padding: 8px 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-main);
  font-size: 0.82rem;
  cursor: pointer;
  transition: var(--transition);
}
.mode-btn:hover { border-color: var(--accent); color: var(--accent); }
.mode-btn.active {
  background: var(--accent-glow);
  border-color: var(--border-accent);
  color: var(--accent);
  font-weight: 600;
}

/* Drag areas */
.drag-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drag-source {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 70px;
  padding: 12px;
  background: var(--bg-base);
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  align-content: flex-start;
  position: relative;
}
.drag-source::before {
  content: 'Kartu tersedia — drag ke kotak bernomor di bawah';
  position: absolute;
  top: -18px;
  left: 0;
  font-size: 0.66rem;
  color: var(--text-muted);
}

.drag-divider {
  text-align: center;
  font-size: 0.73rem;
  color: var(--text-muted);
  padding: 4px 0;
  font-family: var(--font-mono);
}

.drop-zone {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 70px;
  padding: 12px;
  background: var(--bg-base);
  border: 2px dashed var(--border-accent);
  border-radius: var(--radius-md);
  align-content: flex-start;
  transition: background var(--transition), border-color var(--transition);
}
.drop-zone.drag-over {
  background: var(--accent-glow);
  border-color: var(--accent);
}

/* Drag cards */
.drag-card {
  padding: 8px 14px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.79rem;
  cursor: grab;
  user-select: none;
  transition: border-color var(--transition), color var(--transition),
              transform var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.drag-card:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.drag-card:active { cursor: grabbing; opacity: 0.7; transform: scale(0.97); }
.drag-card.dragging { opacity: 0.35; transform: rotate(2deg); }
.drag-card.correct {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-glow);
}
.drag-card.wrong {
  border-color: var(--red);
  color: var(--red);
  background: rgba(255,77,109,0.08);
  animation: pulseRed 0.6s ease;
}

/* Drop slot */
.drop-slot {
  min-width: 130px;
  min-height: 44px;
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  transition: border-color var(--transition), background var(--transition);
  position: relative;
}
.drop-slot.slot-hover {
  border-color: var(--accent);
  background: var(--accent-glow);
}

.slot-placeholder {
  color: var(--text-muted);
  font-size: 0.73rem;
  font-family: var(--font-mono);
}

/* Detail panel */
.detail-panel {
  margin-top: 16px;
  display: grid;
  gap: 8px;
}
.detail-item {
  padding: 10px 14px;
  background: var(--bg-base);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--accent);
  font-size: 0.79rem;
  line-height: 1.65;
  animation: slideInLeft 0.3s ease both;
}
.detail-item:nth-child(2) { animation-delay: 0.05s; }
.detail-item:nth-child(3) { animation-delay: 0.1s; }
.detail-item:nth-child(4) { animation-delay: 0.15s; }
.detail-item:nth-child(5) { animation-delay: 0.2s; }
.detail-item:nth-child(6) { animation-delay: 0.25s; }
.detail-item strong { color: var(--accent); }


/* ─────────────────────────────────────────────
   BAB B — SPRINT PLANNING
───────────────────────────────────────────── */
.sprint-dashboard {
  display: flex;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  align-items: center;
  padding: 14px;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.sprint-meter { flex: 1; min-width: 160px; }
.meter-label {
  font-size: 0.71rem;
  color: var(--text-secondary);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.meter-bar {
  height: 8px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: 4px;
}
.meter-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.35s ease, background 0.3s ease;
  width: 0%;
}
.time-fill   { background: var(--accent2); }
.budget-fill { background: var(--amber); }
.meter-fill.danger { background: var(--red) !important; animation: pulseRed 0.8s ease infinite; }

.meter-val {
  font-size: 0.7rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
}

.sprint-count {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--accent);
  font-family: var(--font-mono);
  white-space: nowrap;
  text-align: center;
  min-width: 80px;
}

/* Client bubble */
.client-bubble {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px;
  background: var(--bg-base);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  margin-bottom: 18px;
  font-size: 0.82rem;
  animation: fadeIn 0.3s ease;
}
.client-avatar { font-size: 2rem; flex-shrink: 0; animation: float 3s ease infinite; }
.client-speech { color: var(--text-secondary); line-height: 1.65; }
.client-speech strong { color: var(--text-primary); }
.client-speech em { color: var(--text-muted); font-size: 0.78rem; }

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.feature-card {
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition),
              background var(--transition), box-shadow var(--transition);
  position: relative;
  user-select: none;
}
.feature-card:hover {
  border-color: rgba(124,111,255,0.4);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.feature-card.selected {
  background: var(--accent2-glow);
  border-color: rgba(124,111,255,0.55);
}
.feature-card.overbudget {
  border-color: var(--red) !important;
  animation: pulseRed 0.8s ease infinite;
}

.feature-name {
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 5px;
  padding-right: 50px;
  line-height: 1.3;
}
.feature-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.4;
}
.feature-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 0.7rem;
}
.feature-time   { color: var(--accent2); }
.feature-cost   { color: var(--amber); }

.feature-priority {
  position: absolute;
  top: 10px; right: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 99px;
  letter-spacing: 0.04em;
}
.priority-high { background: rgba(255,77,109,0.18); color: var(--red); }
.priority-med  { background: rgba(245,166,35,0.18); color: var(--amber); }
.priority-low  { background: rgba(0,212,161,0.12);  color: var(--accent); }

.feature-select-check {
  position: absolute;
  bottom: 10px; right: 10px;
  font-size: 1rem;
  color: var(--accent2);
  display: none;
  animation: fadeInScale 0.2s ease;
}
.feature-card.selected .feature-select-check { display: block; }

/* Responsive */
@media (max-width: 600px) {
  .sprint-dashboard { flex-direction: column; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .sprint-count { width: 100%; }
}
@media (max-width: 400px) {
  .feature-grid { grid-template-columns: 1fr; }
}
