/*
 * global_source.css
 * Mobile-first CSS for all GLOBAL_SOURCE_PHASE_01 surfaces.
 * Prefix: gs-  |  Base: 375px → 640px → 1024px
 */

/* ============================================================
   1. CSS Custom Properties
   ============================================================ */
:root {
  --gs-bg-deep:     #0a0f1e;
  --gs-bg-navy:     #0f1f3d;
  --gs-bg-blue:     #1a3a5c;
  --gs-green:       #10b981;
  --gs-blue:        #3b82f6;
  --gs-teal:        #06b6d4;
  --gs-amber:       #f59e0b;
  --gs-red:         #ef4444;
  --gs-purple:      #8b5cf6;
  --gs-text-light:  #e2e8f0;
  --gs-text-muted:  #94a3b8;
  --gs-text-dim:    #64748b;
  --gs-border:      rgba(255, 255, 255, 0.07);
  --gs-border-soft: rgba(255, 255, 255, 0.04);
  --gs-radius:      14px;
  --gs-radius-sm:   10px;
  --gs-radius-chip: 999px;
  --gs-shadow:      0 2px 8px rgba(0, 0, 0, 0.12), 0 8px 24px rgba(0, 0, 0, 0.08);
  --gs-shadow-sm:   0 1px 4px rgba(0, 0, 0, 0.10);
  --gs-transition:  0.2s ease;
  --gs-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ============================================================
   2. Base Utilities
   ============================================================ */
.gs-scroll-x {
  display: flex;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding-bottom: 2px;
}
.gs-scroll-x::-webkit-scrollbar { display: none; }

.gs-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.gs-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gs-divider {
  height: 1px;
  background: var(--gs-border);
  margin: 10px 0;
}

.gs-empty-state {
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
  color: var(--gs-text-dim);
  font-family: var(--gs-font);
}

/* ============================================================
   3. .gs-global-hero — Dark gradient hero
   ============================================================ */
.gs-global-hero {
  background: linear-gradient(145deg, #0a0f1e 0%, #0f1f3d 50%, #0a1628 100%);
  border-radius: var(--gs-radius);
  padding: 20px 16px 16px;
  font-family: var(--gs-font);
  color: var(--gs-text-light);
  position: relative;
  overflow: hidden;
  box-shadow: var(--gs-shadow);
}
.gs-global-hero::before {
  content: '';
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.10) 0%, transparent 70%);
  pointer-events: none;
}
.gs-hero-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--gs-text-light);
  letter-spacing: -0.3px;
}
.gs-hero-tagline {
  font-size: 13px;
  color: #cbd5e1;
  line-height: 1.4;
}
.gs-hero-origin {
  font-size: 11px;
  color: var(--gs-text-dim);
  letter-spacing: 0.3px;
  margin-top: 2px;
}

/* ============================================================
   4. .gs-stat-card — Semi-transparent stat tile
   ============================================================ */
.gs-stat-card {
  background: rgba(255, 255, 255, 0.07);
  border-radius: var(--gs-radius-sm);
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  font-family: var(--gs-font);
}
.gs-stat-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--gs-text-light);
  line-height: 1;
  margin-bottom: 3px;
}
.gs-stat-label {
  font-size: 10px;
  color: var(--gs-text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ============================================================
   5. .gs-region-chip — Flag + name chip
   ============================================================ */
.gs-region-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: var(--gs-radius-chip);
  border: 1px solid rgba(16, 185, 129, 0.35);
  background: rgba(16, 185, 129, 0.07);
  font-size: 12px;
  color: #a7f3d0;
  white-space: nowrap;
  cursor: pointer;
  text-decoration: none;
  flex-shrink: 0;
  transition: var(--gs-transition);
  font-family: var(--gs-font);
}
.gs-region-chip:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.60);
  color: #6ee7b7;
}

/* ============================================================
   6. .gs-factory-card — OEM factory card
   ============================================================ */
.gs-factory-card {
  background: var(--gs-bg-navy);
  border-radius: 12px;
  border: 1px solid var(--gs-border);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: var(--gs-transition);
  text-decoration: none;
  color: var(--gs-text-light);
  font-family: var(--gs-font);
  box-shadow: var(--gs-shadow-sm);
}
.gs-factory-card:hover {
  border-color: rgba(59, 130, 246, 0.30);
  background: var(--gs-bg-blue);
  transform: translateY(-1px);
  box-shadow: var(--gs-shadow);
}
.gs-factory-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--gs-radius-chip);
}
.gs-factory-badge.oem {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid #3b82f6;
  color: #93c5fd;
}
.gs-factory-badge.odm {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid #10b981;
  color: #6ee7b7;
}
.gs-factory-badge.white-label {
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid #8b5cf6;
  color: #c4b5fd;
}
.gs-factory-cta {
  font-size: 11px;
  color: var(--gs-blue);
  font-weight: 600;
}

/* ============================================================
   7. .gs-factory-grid — Responsive OEM grid
   ============================================================ */
.gs-factory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ============================================================
   8. .gs-import-timing-card — Import timing surface
   ============================================================ */
.gs-import-timing-card {
  background: var(--gs-bg-navy);
  border-radius: var(--gs-radius);
  border: 1px solid var(--gs-border);
  padding: 16px;
  box-shadow: var(--gs-shadow);
  color: var(--gs-text-light);
  font-family: var(--gs-font);
}
.gs-timing-window-chip {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--gs-radius-chip);
}
.gs-lane-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.gs-lane-icon {
  font-size: 15px;
  width: 22px;
  flex-shrink: 0;
}
.gs-lane-days {
  font-weight: 600;
  color: var(--gs-text-light);
}
.gs-lane-status {
  font-weight: 400;
  color: var(--gs-text-muted);
}
.gs-lane-bar {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  letter-spacing: -1px;
  white-space: nowrap;
  flex-shrink: 0;
}
.gs-import-cta {
  display: inline-block;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gs-blue);
  text-decoration: none;
  transition: var(--gs-transition);
}
.gs-import-cta:hover { color: #60a5fa; }

/* ============================================================
   9. .gs-country-card — Country sourcing card
   ============================================================ */
.gs-country-card {
  background: var(--gs-bg-navy);
  border-radius: var(--gs-radius);
  border: 1px solid var(--gs-border);
  padding: 16px;
  box-shadow: var(--gs-shadow);
  color: var(--gs-text-light);
  font-family: var(--gs-font);
}
.gs-country-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--gs-bg-navy);
  border-radius: 12px;
  border: 1px solid var(--gs-border);
  padding: 12px 16px;
  color: var(--gs-text-light);
  text-decoration: none;
  transition: var(--gs-transition);
  font-family: var(--gs-font);
}
.gs-country-banner:hover {
  border-color: rgba(59, 130, 246, 0.30);
}
.gs-region-score-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}
.gs-region-score-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 9px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 8px;
  border: 1px solid var(--gs-border-soft);
  text-decoration: none;
  transition: var(--gs-transition);
}
.gs-region-score-item:hover {
  background: rgba(59, 130, 246, 0.08);
  border-color: rgba(59, 130, 246, 0.25);
}

/* ============================================================
   10. .gs-cluster-card — Factory cluster card
   ============================================================ */
.gs-cluster-card {
  background: var(--gs-bg-navy);
  border-radius: var(--gs-radius);
  border: 1px solid var(--gs-border);
  padding: 16px;
  box-shadow: var(--gs-shadow);
  color: var(--gs-text-light);
  font-family: var(--gs-font);
}
.gs-cluster-city {
  font-size: 16px;
  font-weight: 700;
  color: var(--gs-text-light);
}
.gs-cluster-desc {
  font-size: 12px;
  color: var(--gs-text-muted);
  line-height: 1.4;
}
.gs-cluster-stat-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--gs-text-muted);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  padding: 5px 9px;
  border: 1px solid var(--gs-border-soft);
}
.gs-cluster-notes {
  font-size: 12px;
  color: var(--gs-text-dim);
  line-height: 1.5;
}
.gs-cluster-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--gs-bg-navy);
  border-radius: var(--gs-radius-sm);
  border: 1px solid var(--gs-border);
  text-decoration: none;
  color: var(--gs-text-light);
  font-size: 13px;
  transition: var(--gs-transition);
  font-family: var(--gs-font);
}
.gs-cluster-strip:hover { border-color: rgba(59, 130, 246, 0.30); }

/* ============================================================
   11. .gs-score-ring — Circular score indicator (36px)
   ============================================================ */
.gs-score-ring {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
}
.gs-score-ring.excellent {
  background: rgba(16, 185, 129, 0.15);
  border: 2px solid #10b981;
  color: #10b981;
}
.gs-score-ring.good {
  background: rgba(59, 130, 246, 0.15);
  border: 2px solid #3b82f6;
  color: #3b82f6;
}
.gs-score-ring.fair {
  background: rgba(245, 158, 11, 0.15);
  border: 2px solid #f59e0b;
  color: #f59e0b;
}
.gs-score-ring.poor {
  background: rgba(239, 68, 68, 0.12);
  border: 2px solid #ef4444;
  color: #ef4444;
}

/* ============================================================
   12. .gs-trust-bar — Horizontal confidence bar
   ============================================================ */
.gs-trust-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  letter-spacing: -1px;
}
.gs-trust-bar-track {
  flex: 1;
  height: 5px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--gs-radius-chip);
  overflow: hidden;
}
.gs-trust-bar-fill {
  height: 100%;
  border-radius: var(--gs-radius-chip);
  transition: width 0.4s ease;
}
.gs-trust-bar-fill.excellent { background: #10b981; }
.gs-trust-bar-fill.good      { background: #06b6d4; }
.gs-trust-bar-fill.fair      { background: #f59e0b; }
.gs-trust-bar-fill.poor      { background: #ef4444; }
.gs-trust-band-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--gs-radius-chip);
}

/* ============================================================
   13. .gs-feed-item — Procurement feed item card
   ============================================================ */
.gs-feed-item {
  display: flex;
  border-left: 3px solid var(--gs-blue);
  padding: 12px 14px 10px 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: var(--gs-transition);
  cursor: pointer;
  font-family: var(--gs-font);
}
.gs-feed-item:hover {
  background: rgba(255, 255, 255, 0.02);
}
.gs-feed-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--gs-text-light);
  margin-bottom: 3px;
}
.gs-feed-message {
  font-size: 12px;
  color: var(--gs-text-muted);
  line-height: 1.45;
}
.gs-feed-type-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--gs-radius-chip);
}
.gs-feed-priority-chip {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--gs-radius-chip);
}
.gs-feed-time {
  font-size: 10px;
  color: var(--gs-text-dim);
}
.gs-feed-panel {
  background: var(--gs-bg-navy);
  border-radius: var(--gs-radius);
  border: 1px solid var(--gs-border);
  overflow: hidden;
  box-shadow: var(--gs-shadow);
}
.gs-feed-footer {
  padding: 8px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 10px;
  color: #334155;
  text-align: center;
  font-family: var(--gs-font);
}

/* ============================================================
   14. .gs-specialization-chip — Industry cluster chip
   ============================================================ */
.gs-specialization-chip {
  font-size: 11px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.20);
  color: #93c5fd;
  border-radius: var(--gs-radius-chip);
  padding: 3px 9px;
  white-space: nowrap;
  font-family: var(--gs-font);
}
.gs-industry-chip {
  font-size: 11px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #93c5fd;
  border-radius: var(--gs-radius-chip);
  padding: 3px 10px;
  white-space: nowrap;
  font-family: var(--gs-font);
}

/* ============================================================
   15. Animations
   ============================================================ */
@keyframes gsPulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.55; }
}
@keyframes gsSlideIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.gs-animate-pulse {
  animation: gsPulse 2s ease-in-out infinite;
}
.gs-animate-slide-in {
  animation: gsSlideIn 0.28s ease forwards;
}

/* ============================================================
   16. Mobile Breakpoints
   ============================================================ */

/* 640px — tablet / large phone */
@media (min-width: 640px) {
  .gs-global-hero {
    padding: 24px 24px 20px;
  }
  .gs-factory-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gs-region-score-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gs-stat-value {
    font-size: 18px;
  }
  .gs-cluster-city {
    font-size: 18px;
  }
}

/* 1024px — desktop */
@media (min-width: 1024px) {
  .gs-global-hero {
    padding: 28px 32px 24px;
  }
  .gs-factory-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .gs-cluster-strip {
    font-size: 14px;
  }
  .gs-feed-message {
    font-size: 13px;
  }
  .gs-import-timing-card {
    padding: 20px;
  }
  .gs-country-card {
    padding: 20px;
  }
  .gs-cluster-card {
    padding: 20px;
  }
}
