/* ═══════════════════════════════════════════════════════════════════════════
   eaiou Design System v2 — Sky-Blue palette, UXPilot template alignment
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Custom properties ── */
:root {
  --ep-primary:        #0284c7;
  --ep-primary-hover:  #0369a1;
  --ep-primary-light:  #e0f2fe;
  --ep-primary-xlight: #f0f9ff;
  --ep-success:        #16a34a;
  --ep-success-light:  #dcfce7;
  --ep-warning:        #d97706;
  --ep-warning-light:  #fef9c3;
  --ep-danger:         #dc2626;
  --ep-danger-light:   #fee2e2;
  --ep-info-light:     #dbeafe;
  --ep-purple-light:   #ede9fe;
  --ep-bg:             #f9fafb;
  --ep-surface:        #ffffff;
  --ep-border:         #e5e7eb;
  --ep-text:           #111827;
  --ep-muted:          #6b7280;
  --ep-faint:          #9ca3af;
}

/* ── Fonts ── */
body { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
.eaiou-brand {
  font-family: 'DM Serif Display', Georgia, serif !important;
  font-style: italic;
}

/* ── Layout: sticky widget columns ── */
.eaiou-col-left,
.eaiou-col-right {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

/* ── Squeeze columns (drag-expandable) ── */
.eaiou-squeeze {
  width: 0;
  min-width: 0;
  overflow: hidden;
  transition: width 0.2s ease, min-width 0.2s ease;
  background: var(--ep-bg);
  border-right: 1px solid var(--ep-border);
  flex-shrink: 0;
}
.eaiou-squeeze.open {
  width: 11rem;
  min-width: 11rem;
}
.eaiou-squeeze-right {
  border-right: none;
  border-left: 1px solid var(--ep-border);
}

/* ── Widget cards ── */
.eaiou-widget {
  cursor: grab;
  user-select: none;
  margin-bottom: 0.75rem;
}
.eaiou-widget:last-child { margin-bottom: 0; }
.eaiou-widget:active { cursor: grabbing; }

/* SortableJS visual feedback */
.sortable-ghost  { opacity: 0.35; background: var(--ep-primary-xlight) !important; }
.sortable-chosen { box-shadow: 0 4px 16px rgba(2,132,199,0.18); }
.sortable-drag   { opacity: 0.95; box-shadow: 0 8px 24px rgba(0,0,0,0.14); }

/* ── Widget toolbar ── */
#eaiou-widget-toolbar {
  display: none;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #f0f9ff;
  border-bottom: 1px solid #bae6fd;
  overflow-x: auto;
  flex-wrap: nowrap;
}
#eaiou-widget-toolbar.open {
  display: flex;
}
.eaiou-toolbar-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  background: white;
  border: 1px solid var(--ep-border);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--ep-text);
  cursor: grab;
  white-space: nowrap;
  user-select: none;
}
.eaiou-toolbar-chip:hover { border-color: var(--ep-primary); color: var(--ep-primary); }

/* ── Notification: no-red-background rule ── */
/* Urgent = exclamation (gray) + clock (red) — container always white/gray border */
.eaiou-notif-urgent {
  background: white;
  border: 1px solid var(--ep-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.eaiou-notif-urgent .eaiou-clock-icon { color: var(--ep-danger); }
.eaiou-notif-urgent .eaiou-bang-icon  { color: var(--ep-muted); }

/* ── Bounce animation — clock icon only, triggered by JS ── */
@keyframes eaiou-bounce {
  0%   { transform: translateY(0) rotate(0deg); }
  20%  { transform: translateY(-5px) rotate(-8deg); }
  40%  { transform: translateY(0) rotate(8deg); }
  60%  { transform: translateY(-3px) rotate(-4deg); }
  80%  { transform: translateY(0) rotate(0deg); }
  100% { transform: translateY(0); }
}
.eaiou-bounce {
  animation: eaiou-bounce 0.55s cubic-bezier(.36,.07,.19,.97) both;
}

/* ── Status badges ── */
.eaiou-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.625rem;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.5;
}
.eaiou-badge-submitted   { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.eaiou-badge-review      { background: #fef9c3; color: #92400e; border: 1px solid #fde68a; }
.eaiou-badge-revision    { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; }
.eaiou-badge-accepted    { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.eaiou-badge-rejected    { background: #f3f4f6; color: #6b7280; border: 1px solid #e5e7eb; }
.eaiou-badge-published   { background: #0284c7; color: #ffffff; }
.eaiou-badge-archived    { background: #f3f4f6; color: #9ca3af; border: 1px solid #e5e7eb; }

/* ── Sidebar nav active state ── */
.eaiou-nav-active {
  background: var(--ep-primary-light) !important;
  color: var(--ep-primary) !important;
  border-left: 2px solid var(--ep-primary);
  padding-left: calc(0.75rem - 2px) !important;
}

/* ── Stat cards ── */
.eaiou-stat-card {
  background: white;
  border: 1px solid var(--ep-border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  border-left-width: 4px;
}
.eaiou-stat-card .eaiou-stat-val  { font-size: 1.5rem; font-weight: 700; color: var(--ep-text); }
.eaiou-stat-card .eaiou-stat-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ep-muted); }

/* ── Focus rings ── */
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--ep-primary);
  outline-offset: 1px;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #9ca3af; }

/* ── Shadows ── */
.eaiou-shadow-sm { box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04); }
.eaiou-shadow-md { box-shadow: 0 4px 12px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.05); }
