/* ==========================================================================
   ProcessPlan Illustrations — illustrations.css
   CSS-based feature mockup illustrations
   ========================================================================== */

/* ---------- Base Illustration Container ---------- */
.illus {
  position: relative;
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border: 1px solid rgba(59, 130, 246, 0.2);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.3), 0 0 60px rgba(59, 130, 246, 0.08);
}

/* ---------- Shared: Fake Browser Chrome ---------- */
.illus__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.illus__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #475569;
}

.illus__dot--red { background: #ef4444; }
.illus__dot--yellow { background: #eab308; }
.illus__dot--green { background: #22c55e; }

.illus__url {
  flex: 1;
  height: 24px;
  background: #334155;
  border-radius: 12px;
  margin-left: 10px;
}

/* ---------- 1. Screen Recording ---------- */
.illus--recording {
  background: linear-gradient(145deg, #0f172a 0%, #1e293b 100%);
  border-color: #334155;
}

.illus__screen {
  flex: 1;
  background: #1e293b;
  border-radius: var(--radius-md);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: var(--space-5);
}

.illus__screen-line {
  height: 10px;
  border-radius: 5px;
  background: #334155;
}

.illus__screen-line--short { width: 40%; }
.illus__screen-line--med { width: 65%; }
.illus__screen-line--long { width: 85%; }
.illus__screen-line--accent { background: rgba(59, 130, 246, 0.3); }

.illus__rec-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-full);
  padding: 5px 14px;
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  letter-spacing: 0.08em;
}

.illus__rec-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ef4444;
  animation: recPulse 1.5s ease-in-out infinite;
}

@keyframes recPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* Cursor animation */
.illus__cursor {
  position: absolute;
  top: 25%;
  left: 15%;
  width: 20px;
  height: 28px;
  animation: cursorMove 4s ease-in-out infinite;
}

.illus__cursor svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.4));
}

@keyframes cursorMove {
  0%   { transform: translate(0, 0); }
  20%  { transform: translate(140px, 30px); }
  40%  { transform: translate(60px, 90px); }
  60%  { transform: translate(200px, 50px); }
  80%  { transform: translate(120px, 110px); }
  100% { transform: translate(0, 0); }
}

/* ---------- 2. Process Flow / Mapping ---------- */
.illus--flow {
  background: linear-gradient(145deg, #0f172a 0%, #162036 100%);
  justify-content: center;
  align-items: center;
  padding: var(--space-6);
}

.illus__flow-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
}

.illus__flow-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  width: 100%;
}

.illus__flow-node {
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.illus__flow-node--start {
  background: linear-gradient(135deg, var(--color-accent), #1d4ed8);
  color: white;
  border-radius: var(--radius-full);
}

.illus__flow-node--task {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.illus__flow-node--decision {
  background: rgba(250, 204, 21, 0.15);
  border: 1.5px solid rgba(250, 204, 21, 0.4);
  color: #fcd34d;
  border-radius: 4px;
}

.illus__flow-node--end {
  background: linear-gradient(135deg, var(--color-success), #059669);
  color: white;
  border-radius: var(--radius-full);
}

.illus__flow-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: rgba(59, 130, 246, 0.5);
  padding: 3px 0;
}

.illus__flow-arrow--h {
  flex-direction: row;
  padding: 0 4px;
}

.illus__flow-arrow svg {
  width: 18px;
  height: 18px;
}

.illus__flow-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* ---------- 3. Chat / NLP ---------- */
.illus--chat {
  background: linear-gradient(145deg, #0f172a 0%, #162036 100%);
  padding: var(--space-4);
}

.illus__chat-window {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.illus__chat-header {
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.illus__chat-header-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-success);
}

.illus__chat-body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.illus__chat-msg {
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}

.illus__chat-msg--user {
  background: var(--color-accent);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.illus__chat-msg--ai {
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.illus__chat-input {
  padding: 10px 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 8px;
}

.illus__chat-input-bar {
  flex: 1;
  height: 32px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
}

.illus__chat-input-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-accent);
}

/* ---------- 4. Dashboard / Analytics ---------- */
.illus--dashboard {
  background: linear-gradient(145deg, #0f172a 0%, #162036 100%);
  padding: var(--space-4);
}

.illus__dash {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.illus__dash-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.illus__dash-body {
  flex: 1;
  padding: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.illus__dash-stat {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 12px;
  text-align: center;
}

.illus__dash-stat-num {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-accent);
  line-height: 1;
}

.illus__dash-stat-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  margin-top: 4px;
  letter-spacing: 0.04em;
}

.illus__dash-chart {
  grid-column: 1 / -1;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 10px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 70px;
}

.illus__bar {
  flex: 1;
  border-radius: 4px 4px 0 0;
  min-height: 8px;
}

.illus__bar--1 { height: 40%; background: rgba(59, 130, 246, 0.25); }
.illus__bar--2 { height: 60%; background: rgba(59, 130, 246, 0.4); }
.illus__bar--3 { height: 45%; background: rgba(59, 130, 246, 0.25); }
.illus__bar--4 { height: 80%; background: rgba(59, 130, 246, 0.6); }
.illus__bar--5 { height: 55%; background: rgba(59, 130, 246, 0.4); }
.illus__bar--6 { height: 90%; background: var(--color-accent); box-shadow: 0 0 12px rgba(59, 130, 246, 0.5); }
.illus__bar--7 { height: 70%; background: rgba(59, 130, 246, 0.5); }

/* ---------- 5. Task Assignment / People ---------- */
.illus--tasks {
  background: linear-gradient(145deg, #0f172a 0%, #162036 100%);
  padding: var(--space-4);
}

.illus__task-list {
  flex: 1;
  background: rgba(255, 255, 255, 0.04);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.illus__task-list-header {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.illus__task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.illus__task-item:last-child { border-bottom: none; }

.illus__task-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: white;
}

.illus__task-avatar--ai { background: linear-gradient(135deg, var(--color-accent), var(--color-cyan)); }
.illus__task-avatar--human { background: #a78bfa; }
.illus__task-avatar--human2 { background: #f472b6; }

.illus__task-info {
  flex: 1;
  min-width: 0;
}

.illus__task-name {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.illus__task-desc {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
}

.illus__task-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.illus__task-status--done { background: rgba(16, 185, 129, 0.15); color: var(--color-success); }
.illus__task-status--progress { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.illus__task-status--pending { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); }

/* ---------- 6. Scaling (no longer used standalone, kept for reference) ---------- */

/* ---------- 7. Managed Service ---------- */
.illus--managed {
  background: linear-gradient(145deg, #0f172a 0%, #162036 100%);
  padding: var(--space-6);
  justify-content: center;
}

.illus__org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
}

.illus__org-node {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.illus__org-node--pp {
  border-color: rgba(59, 130, 246, 0.5);
  background: rgba(59, 130, 246, 0.1);
}

.illus__org-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: white;
}

.illus__org-text {
  font-size: 13px;
  font-weight: 600;
  color: #e2e8f0;
}

.illus__org-sub {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  font-weight: 400;
}

.illus__org-line {
  width: 2px;
  height: 14px;
  background: rgba(59, 130, 246, 0.3);
}

.illus__org-row {
  display: flex;
  gap: var(--space-4);
}

.illus__org-branch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

/* ---------- 8. Knowledge / Layers ---------- */
.illus--layers {
  background: linear-gradient(145deg, #0f172a 0%, #162036 100%);
  justify-content: center;
  align-items: center;
  padding: var(--space-6);
}

.illus__stack {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 85%;
  max-width: 300px;
}

.illus__stack-layer {
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: #e2e8f0;
}

.illus__stack-layer:first-child { border-radius: var(--radius-md) var(--radius-md) 0 0; }
.illus__stack-layer:last-child { border-radius: 0 0 var(--radius-md) var(--radius-md); }
.illus__stack-layer + .illus__stack-layer { border-top: none; }

.illus__stack-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.illus__stack-icon--blue { background: rgba(59, 130, 246, 0.2); color: #60a5fa; }
.illus__stack-icon--green { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.illus__stack-icon--purple { background: rgba(124, 58, 237, 0.2); color: #a78bfa; }
.illus__stack-icon--amber { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }

.illus__stack-icon svg { width: 16px; height: 16px; }
