/* lab-ai-preview.css — MateGift Lab AI Merch Consultant Editorial Design System */

:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
  --font-serif: "ChosunCentennial", "Batang", "Apple Myungjo", Georgia, serif;

  --bg-page: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-subtle: #f1f5f9;
  --bg-brand-accent: #0f172a;

  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-light: #94a3b8;
  --text-on-dark: #ffffff;

  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #3b82f6;

  --primary: #1e293b;
  --primary-hover: #0f172a;
  --accent: #2563eb;
  --accent-soft: #eff6ff;

  --badge-brand: #3b82f6;
  --badge-utility: #0d9488;
  --badge-delight: #8b5cf6;
  --badge-status: #d97706;
  --badge-eco: #16a34a;

  --warning-bg: #fffbeb;
  --warning-border: #fde68a;
  --warning-text: #b45309;

  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.preview-banner {
  background: #0f172a;
  color: #94a3b8;
  font-size: 0.8rem;
  padding: 6px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #1e293b;
}

.preview-badge-status {
  background: #334155;
  color: #38bdf8;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.75rem;
}

.app-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 16px 0;
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-wrap {
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.brand-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.brand-subline {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
}

.nav-tag {
  background: #f1f5f9;
  color: #475569;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
  border: 1px solid #e2e8f0;
}

/* Hero Section */
.hero-section {
  padding: 40px 0 24px;
  text-align: center;
}

.hero-eyebrow {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

.hero-title {
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.3;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 640px;
  margin: 0 auto 32px;
}

/* Intake Form Card */
.intake-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  text-align: left;
  margin-bottom: 32px;
}

.intake-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.intake-input-main {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  outline: none;
  transition: border-color 0.15s;
}

.intake-input-main:focus {
  border-color: var(--accent);
}

.quick-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.chip {
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.825rem;
  padding: 6px 12px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.15s;
}

.chip:hover, .chip.active {
  background: var(--text-main);
  color: var(--text-on-dark);
  border-color: var(--text-main);
}

.intake-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.input-affix {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  background: #fff;
  padding: 0 12px;
}

.input-affix input {
  border: none;
  outline: none;
  width: 100%;
  padding: 10px 0;
  font-size: 0.95rem;
}

.input-affix span {
  font-size: 0.85rem;
  color: var(--text-light);
  font-weight: 500;
}

.btn-plan {
  width: 100%;
  background: var(--text-main);
  color: var(--text-on-dark);
  font-size: 1.05rem;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}

.btn-plan:hover {
  background: #1e293b;
}

.btn-plan:active {
  transform: scale(0.99);
}

/* Strategy Tabs Navigation */
.strategy-tabs-bar {
  display: flex;
  background: var(--bg-surface-subtle);
  padding: 6px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  gap: 6px;
}

.strat-tab {
  flex: 1;
  text-align: center;
  padding: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
}

.strat-tab.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: var(--shadow-sm);
}

/* Section Hierarchy styling */
.plan-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 60px;
}

.plan-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}

/* Section 1: Campaign Summary */
.sec-campaign-summary {
  background: #ffffff;
  border-left: 4px solid var(--accent);
}

.summary-headline {
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.4;
  color: var(--text-main);
  margin-bottom: 12px;
}

.summary-meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-chip {
  background: var(--bg-surface-subtle);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  color: #475569;
}

.meta-chip strong {
  color: var(--text-main);
}

/* Section 2: AI Campaign Strategy */
.sec-ai-strategy {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #cbd5e1;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.strategy-callout {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
  line-height: 1.5;
  margin-bottom: 12px;
}

.strategy-explanation {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.6;
}

/* Section 3: Campaign Composition */
.composition-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.comp-item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.comp-role {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
}

.role-brand { background: #dbeafe; color: #1d4ed8; }
.role-utility { background: #ccfbf1; color: #0f766e; }
.role-delight { background: #ede9fe; color: #6d28d9; }
.role-status { background: #fef3c7; color: #b45309; }
.role-eco { background: #dcfce7; color: #15803d; }
.role-attract { background: #fee2e2; color: #b91c1c; }
.role-conversion { background: #ffedd5; color: #c2410c; }
.role-retention { background: #e0e7ff; color: #4338ca; }
.role-share { background: #fce7f3; color: #be185d; }

.comp-title-wrap h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 2px;
}

.comp-title-wrap p {
  font-size: 0.825rem;
  color: var(--text-muted);
}

.comp-price-wrap {
  text-align: right;
}

.comp-price {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-main);
}

.comp-moq {
  font-size: 0.75rem;
  color: var(--text-light);
}

/* Section 4: Why This Composition Works */
.evidence-list {
  list-style: none;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evidence-bullet {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.5;
}

.evidence-bullet::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

/* Sections 5 & 6: Branding & Packaging */
.strategy-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.sub-strat-box {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.sub-strat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.sub-strat-header h4 {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-main);
}

.badge-verify {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  color: var(--warning-text);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.badge-confirmed {
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  color: #15803d;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.sub-strat-body {
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}

/* Section 7: Complementary Item Strategy */
.complementary-card {
  background: #fdfefe;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-top: 12px;
}

.comp-tag {
  font-size: 0.75rem;
  background: #e2e8f0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
  margin-bottom: 6px;
  display: inline-block;
}

/* Section 8: Verification Panel (Dedicated Trust Panel) */
.sec-verification-panel {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius-lg);
  padding: 24px;
}

.verify-panel-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 8px;
}

.verify-panel-intro {
  font-size: 0.875rem;
  color: #b45309;
  margin-bottom: 16px;
}

.verify-checklist {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.verify-check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: #78350f;
  background: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid #fef3c7;
}

.verify-check-icon {
  color: #d97706;
  font-weight: bold;
}

/* Section 9: CTA Bar */
.sec-cta-bar {
  display: flex;
  gap: 12px;
  margin-top: 8px;
}

.btn-cta-primary {
  flex: 2;
  background: #2563eb;
  color: #ffffff;
  border: none;
  font-size: 1rem;
  font-weight: 700;
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
  transition: background 0.15s;
}

.btn-cta-primary:hover {
  background: #1d4ed8;
}

.btn-cta-secondary {
  flex: 1;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-strong);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
}

.btn-cta-secondary:hover {
  background: var(--bg-surface-subtle);
}

/* Async Skeleton Loader */
.ai-skeleton {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 4px;
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton-text {
  height: 16px;
  margin-bottom: 8px;
  width: 80%;
}

.skeleton-text.short {
  width: 45%;
}

.skeleton-box {
  height: 80px;
  width: 100%;
  margin-bottom: 12px;
  border-radius: var(--radius-md);
}

.ai-loading-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 9999px;
  margin-bottom: 12px;
}

.spinner {
  width: 14px;
  height: 14px;
  border: 2px solid #93c5fd;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fallback Notice */
.ai-fallback-notice {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
  color: var(--text-muted);
  font-size: 0.875rem;
  text-align: center;
}

/* Telemetry Badge */
.telemetry-row {
  margin-top: 24px;
  padding: 12px 16px;
  background: #f1f5f9;
  border-radius: var(--radius-md);
  font-size: 0.75rem;
  color: #64748b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  backdrop-filter: blur(2px);
}

.modal-content {
  background: #ffffff;
  border-radius: var(--radius-lg);
  width: 90%;
  max-width: 500px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--text-light);
}

/* Responsive & Mobile Optimization (360px, 390px, 430px) */
@media (max-width: 768px) {
  .app-container {
    padding: 0 14px;
  }
  .hero-title {
    font-size: 1.6rem;
  }
  .hero-subtitle {
    font-size: 0.95rem;
  }
  .intake-card {
    padding: 20px 16px;
  }
  .intake-grid {
    grid-template-columns: 1fr;
  }
  .strategy-tabs-bar {
    flex-direction: column;
    gap: 4px;
  }
  .strat-tab {
    padding: 10px 12px;
    font-size: 0.85rem;
    text-align: left;
  }
  .strategy-two-col {
    grid-template-columns: 1fr;
  }
  .verify-checklist {
    grid-template-columns: 1fr;
  }
  .sec-cta-bar {
    flex-direction: column;
    position: sticky;
    bottom: 12px;
    z-index: 40;
    background: rgba(248, 250, 252, 0.95);
    padding: 10px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
  }
  .btn-cta-primary {
    min-height: 48px;
    font-size: 1rem;
  }
  .btn-cta-secondary {
    min-height: 44px;
    font-size: 0.9rem;
  }
  .comp-item {
    grid-template-columns: 1fr;
    text-align: left;
    gap: 10px;
    padding: 14px;
  }
  .comp-price-wrap {
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 8px;
  }
  .telemetry-row {
    flex-direction: column;
    gap: 6px;
    text-align: left;
  }
}

/* 360px ultra-compact mobile */
@media (max-width: 360px) {
  .hero-title {
    font-size: 1.4rem;
  }
  .intake-input-main {
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  .summary-headline {
    font-size: 1.2rem;
  }
  .strategy-callout {
    font-size: 1.1rem;
  }
}
