/* ============================================
   HUFS Agent - Dot Design System (도트 디자인 시스템)
   Minimalist dot/pixel-inspired design tokens
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Primary palette - 군청색 (HUFS navy) */
  --dot-primary: #1B3764;
  --dot-primary-light: #2C5490;
  --dot-primary-dark: #0F2340;
  --dot-primary-ghost: rgba(27, 55, 100, 0.08);

  /* Accent */
  --dot-accent: #FF6B4A;
  --dot-accent-light: #FF8F76;

  /* Neutrals */
  --dot-bg: #FAFBFC;
  --dot-surface: #FFFFFF;
  --dot-surface-hover: #F5F6F8;
  --dot-border: #E2E5EA;
  --dot-border-light: #ECEEF2;
  --dot-text: #1A1D23;
  --dot-text-secondary: #6B7280;
  --dot-text-muted: #9CA3AF;

  /* Status */
  --dot-success: #22C55E;
  --dot-warning: #F59E0B;
  --dot-error: #EF4444;

  /* Spacing scale (4px base) */
  --sp-1: 4px;
  --sp-2: 8px;
  --sp-3: 12px;
  --sp-4: 16px;
  --sp-5: 20px;
  --sp-6: 24px;
  --sp-8: 32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Typography */
  --font-sans: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;

  --text-xs: 11px;
  --text-sm: 13px;
  --text-base: 15px;
  --text-lg: 17px;
  --text-xl: 20px;
  --text-2xl: 24px;

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.10);

  /* Dot grid pattern */
  --dot-grid-size: 24px;
  --dot-grid-color: rgba(0, 0, 0, 0.05);
  --dot-grid-dot-size: 1px;

  /* Transitions */
  --transition-fast: 120ms ease;
  --transition-base: 200ms ease;
  --transition-slow: 350ms ease;
}

/* --- Dot Grid Background --- */
.dot-grid-bg {
  background-image: radial-gradient(
    circle,
    var(--dot-grid-color) var(--dot-grid-dot-size),
    transparent var(--dot-grid-dot-size)
  );
  background-size: var(--dot-grid-size) var(--dot-grid-size);
}

/* --- Dot Decorations --- */
.dot-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--dot-primary);
  flex-shrink: 0;
}

.dot-indicator--success { background: var(--dot-success); }
.dot-indicator--warning { background: var(--dot-warning); }
.dot-indicator--error   { background: var(--dot-error); }
.dot-indicator--muted   { background: var(--dot-text-muted); }

.dot-indicator--pulse {
  animation: dotPulse 1.5s ease-in-out infinite;
}

@keyframes dotPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(0.85); }
}

/* --- Dot Loader --- */
.dot-loader {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.dot-loader__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--dot-primary);
  animation: dotBounce 1.2s ease-in-out infinite;
}

.dot-loader__dot:nth-child(2) { animation-delay: 0.15s; }
.dot-loader__dot:nth-child(3) { animation-delay: 0.30s; }

@keyframes dotBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.4; }
  40%           { transform: translateY(-8px); opacity: 1; }
}

/* --- Pill/Badge --- */
.dot-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  padding: 2px 10px;
  font-size: var(--text-xs);
  font-weight: 500;
  border-radius: var(--radius-full);
  background: var(--dot-primary-ghost);
  color: var(--dot-primary);
  white-space: nowrap;
}

.dot-badge--accent {
  background: rgba(255, 107, 74, 0.1);
  color: var(--dot-accent);
}

.dot-badge--neutral {
  background: var(--dot-surface-hover);
  color: var(--dot-text-secondary);
}

/* --- Button Styles --- */
.dot-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 500;
  border: none;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-fast);
  outline: none;
  white-space: nowrap;
}

.dot-btn:focus-visible {
  box-shadow: 0 0 0 2px var(--dot-surface), 0 0 0 4px var(--dot-primary);
}

.dot-btn--primary {
  background: var(--dot-primary);
  color: #fff;
}
.dot-btn--primary:hover { background: var(--dot-primary-dark); }
.dot-btn--primary:active { transform: scale(0.97); }

.dot-btn--ghost {
  background: transparent;
  color: var(--dot-text-secondary);
}
.dot-btn--ghost:hover {
  background: var(--dot-surface-hover);
  color: var(--dot-text);
}

.dot-btn--icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-full);
}

.dot-btn--sm {
  padding: var(--sp-1) var(--sp-3);
  font-size: var(--text-xs);
}

.dot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Card --- */
.dot-card {
  background: var(--dot-surface);
  border: 1px solid var(--dot-border-light);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-6);
}

/* --- Scrollbar --- */
.dot-scrollbar::-webkit-scrollbar {
  width: 6px;
}
.dot-scrollbar::-webkit-scrollbar-track {
  background: transparent;
}
.dot-scrollbar::-webkit-scrollbar-thumb {
  background: var(--dot-border);
  border-radius: var(--radius-full);
}
.dot-scrollbar::-webkit-scrollbar-thumb:hover {
  background: var(--dot-text-muted);
}
