/**
 * MOOVON Design System v1.0
 * Based on Figma Design: 디스탯 1.0
 * Date: 2026-03-17
 * 
 * This design system provides consistent styling across the entire application.
 */

:root {
  /* ==================== 
     PRIMARY COLORS 
     ==================== */
  --primary-blue: #2E4A8B;          /* Brand primary - buttons, logo */
  --primary-dark: #1A1A1A;          /* Dark text primary */
  --primary-black: #000000;         /* Black - CTA buttons */
  
  /* ==================== 
     SECONDARY COLORS 
     ==================== */
  --secondary-blue: #3B5BA5;        /* Links, accents */
  --secondary-blue-hover: #2E4A8B;  /* Link hover state */
  
  /* ==================== 
     BACKGROUND COLORS 
     ==================== */
  --bg-white: #FFFFFF;              /* Main background */
  --bg-gray-light: #F5F5F5;         /* Section background */
  --bg-gray-lighter: #F9F9F9;       /* Card background */
  --bg-overlay: rgba(107, 107, 107, 0.6);  /* Modal overlay */
  
  /* ==================== 
     BORDER COLORS 
     ==================== */
  --border-default: #E5E5E5;        /* Default borders */
  --border-light: #EBEBEB;          /* Light borders */
  --border-medium: #D0D0D0;         /* Medium borders */
  --border-dark: #B0B0B0;           /* Dark borders */
  
  /* ==================== 
     TEXT COLORS 
     ==================== */
  --text-primary: #1A1A1A;          /* Primary text */
  --text-secondary: #4A4A4A;        /* Secondary text */
  --text-tertiary: #6A6A6A;         /* Tertiary text */
  --text-quaternary: #8A8A8A;       /* Quaternary text */
  --text-placeholder: #B8B8B8;      /* Placeholder text */
  --text-link: #3B5BA5;             /* Link text */
  --text-white: #FFFFFF;            /* White text */
  
  /* ==================== 
     STATE COLORS 
     ==================== */
  --error-red: #E94B4B;             /* Error state */
  --error-light: #FFEBEE;           /* Error background */
  --success-green: #4CAF50;         /* Success state */
  --success-light: #E8F5E9;         /* Success background */
  --warning-orange: #FF9800;        /* Warning state */
  --warning-light: #FFF3E0;         /* Warning background */
  --disabled-gray: #E0E0E0;         /* Disabled state */
  --disabled-text: #C5C5C5;         /* Disabled text */
  
  /* ==================== 
     SPACING SYSTEM 
     ==================== */
  --spacing-xxs: 4px;
  --spacing-xs: 8px;
  --spacing-sm: 12px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 40px;
  --spacing-3xl: 60px;
  --spacing-4xl: 80px;
  
  /* ==================== 
     BORDER RADIUS 
     ==================== */
  --radius-xs: 4px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 20px;
  --radius-pill: 24px;
  --radius-full: 9999px;
  
  /* ==================== 
     TYPOGRAPHY 
     ==================== */
  /* Font Families */
  --font-primary: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-secondary: 'Noto Sans KR', sans-serif;
  
  /* Font Sizes */
  --font-xs: 13px;
  --font-sm: 14px;
  --font-md: 15px;
  --font-base: 16px;
  --font-lg: 18px;
  --font-xl: 20px;
  --font-2xl: 24px;
  --font-3xl: 32px;
  --font-4xl: 40px;
  --font-5xl: 48px;
  
  /* Font Weights */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Line Heights */
  --leading-tight: 1.2;
  --leading-snug: 1.4;
  --leading-normal: 1.5;
  --leading-relaxed: 1.6;
  --leading-loose: 1.8;
  
  /* ==================== 
     COMPONENT HEIGHTS 
     ==================== */
  --height-input: 54px;
  --height-button: 52px;
  --height-button-sm: 40px;
  --height-button-lg: 60px;
  
  /* ==================== 
     SHADOWS 
     ==================== */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-modal: 0 10px 40px rgba(0, 0, 0, 0.2);
  
  /* ==================== 
     TRANSITIONS 
     ==================== */
  --transition-fast: 150ms ease;
  --transition-base: 250ms ease;
  --transition-slow: 350ms ease;
  
  /* ==================== 
     Z-INDEX LAYERS 
     ==================== */
  --z-base: 1;
  --z-dropdown: 10;
  --z-sticky: 20;
  --z-fixed: 30;
  --z-modal-backdrop: 40;
  --z-modal: 50;
  --z-popover: 60;
  --z-tooltip: 70;
}

/* ==================== 
   COMPONENT STYLES 
   ==================== */

/* Primary Button */
.btn-primary {
  background-color: var(--primary-blue);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-md);
  height: var(--height-button);
  padding: 0 var(--spacing-md);
  font-size: var(--font-base);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background-color: #254080;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active {
  background-color: #1e3367;
  transform: translateY(0);
}

.btn-primary:disabled {
  background-color: var(--disabled-gray);
  color: var(--disabled-text);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Secondary Button (Black CTA) */
.btn-secondary {
  background-color: var(--primary-black);
  color: var(--text-white);
  border: none;
  border-radius: var(--radius-pill);
  height: var(--height-button);
  padding: 0 var(--spacing-lg);
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-secondary:hover {
  background-color: #2A2A2A;
  box-shadow: var(--shadow-md);
}

.btn-secondary:active {
  background-color: #000000;
}

/* Outline Button */
.btn-outline {
  background-color: transparent;
  color: var(--primary-blue);
  border: 2px solid var(--primary-blue);
  border-radius: var(--radius-md);
  height: var(--height-button);
  padding: 0 var(--spacing-md);
  font-size: var(--font-base);
  font-weight: var(--font-semibold);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-outline:hover {
  background-color: var(--primary-blue);
  color: var(--text-white);
}

/* Input Field Styles */
.input-field {
  width: 100%;
  height: var(--height-input);
  padding: 0 var(--spacing-md);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  font-size: var(--font-md);
  color: var(--text-primary);
  background-color: var(--bg-white);
  transition: all var(--transition-base);
}

.input-field::placeholder {
  color: var(--text-placeholder);
}

.input-field:focus {
  outline: none;
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(46, 74, 139, 0.1);
}

.input-field:hover {
  border-color: var(--border-medium);
}

.input-field.error {
  border-color: var(--error-red);
}

.input-field.error:focus {
  box-shadow: 0 0 0 3px rgba(233, 75, 75, 0.1);
}

.input-field:disabled {
  background-color: var(--bg-gray-light);
  color: var(--text-tertiary);
  cursor: not-allowed;
}

/* Error Message */
.error-message {
  color: var(--error-red);
  font-size: var(--font-sm);
  margin-top: var(--spacing-xs);
  display: flex;
  align-items: center;
  gap: var(--spacing-xxs);
}

/* Label Styles */
.label {
  display: block;
  font-size: var(--font-sm);
  font-weight: var(--font-medium);
  color: var(--text-secondary);
  margin-bottom: var(--spacing-xs);
}

.label.required::after {
  content: '*';
  color: var(--error-red);
  margin-left: var(--spacing-xxs);
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal-backdrop);
  padding: var(--spacing-lg);
}

.modal-content {
  background-color: var(--bg-white);
  border-radius: var(--radius-xl);
  padding: var(--spacing-lg);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-modal);
  animation: modalFadeIn var(--transition-base);
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-title {
  font-size: var(--font-xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  margin-bottom: var(--spacing-md);
}

.modal-body {
  font-size: var(--font-md);
  color: var(--text-secondary);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--spacing-lg);
}

/* Card Styles */
.card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--spacing-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Link Styles */
.link {
  color: var(--text-link);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.link:hover {
  color: var(--secondary-blue-hover);
  text-decoration: underline;
}

/* Badge Styles */
.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-pill);
  font-size: var(--font-xs);
  font-weight: var(--font-semibold);
}

.badge-primary {
  background-color: var(--primary-blue);
  color: var(--text-white);
}

.badge-error {
  background-color: var(--error-light);
  color: var(--error-red);
}

.badge-success {
  background-color: var(--success-light);
  color: var(--success-green);
}

/* Divider */
.divider {
  height: 1px;
  background-color: var(--border-default);
  margin: var(--spacing-lg) 0;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-xs { margin-top: var(--spacing-xs); }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.mb-xs { margin-bottom: var(--spacing-xs); }
.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-xs { gap: var(--spacing-xs); }
.gap-sm { gap: var(--spacing-sm); }
.gap-md { gap: var(--spacing-md); }
.gap-lg { gap: var(--spacing-lg); }

.w-full { width: 100%; }
.h-full { height: 100%; }

.rounded-sm { border-radius: var(--radius-sm); }
.rounded-md { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

.shadow-sm { box-shadow: var(--shadow-sm); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
