/* ==========================================================================
   CAPO Dashboard UI - Style Guide Showcase Styles
   These styles are ONLY for the style guide page itself,
   NOT part of the design system.
   ========================================================================== */

/* Header */
.sg-header {
  background: linear-gradient(135deg, #052E16 0%, #16A34A 100%);
  color: white;
  padding: 60px 40px 40px;
}

.sg-header__inner {
  max-width: 1200px;
  margin: 0 auto;
}

.sg-header__title {
  font-family: var(--font-primary);
  font-size: 48px;
  font-weight: var(--fw-semibold);
  line-height: 1.2;
  margin-bottom: 8px;
}

.sg-header__subtitle {
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: var(--fw-regular);
  opacity: 0.8;
  margin-bottom: 32px;
}

/* Navigation */
.sg-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sg-nav__link {
  display: inline-block;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: var(--fw-medium);
  transition: background 0.2s;
}

.sg-nav__link:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* Main */
.sg-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px 80px;
}

/* Sections */
.sg-section {
  margin-top: 64px;
}

.sg-section__title {
  font-family: var(--font-primary);
  font-size: 32px;
  font-weight: var(--fw-semibold);
  color: var(--color-primary-dark-shade);
  margin-bottom: 8px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--color-primary-900);
}

.sg-section__subtitle {
  font-family: var(--font-primary);
  font-size: 20px;
  font-weight: var(--fw-semibold);
  color: var(--color-grey-900);
  margin-top: 40px;
  margin-bottom: 16px;
}

.sg-section__desc {
  font-size: 16px;
  color: var(--color-grey-700);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Color Swatches */
.sg-swatches {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.sg-swatch {
  width: 120px;
  height: 100px;
  background: var(--sw-color);
  border-radius: 12px;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sg-swatch--bordered {
  border: 1px solid #E5E7EB;
}

.sg-swatch__label {
  font-size: 10px;
  font-weight: var(--fw-medium);
  line-height: 1.4;
  color: white;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  word-break: break-all;
}

/* Light swatches need dark text */
.sg-swatch[style*="#FFFFFF"] .sg-swatch__label,
.sg-swatch[style*="#F9FAFB"] .sg-swatch__label,
.sg-swatch[style*="#FEF6E6"] .sg-swatch__label,
.sg-swatch[style*="#E2FFF3"] .sg-swatch__label,
.sg-swatch[style*="#FBF1FF"] .sg-swatch__label,
.sg-swatch[style*="#FFE2E5"] .sg-swatch__label,
.sg-swatch[style*="#FFF4DE"] .sg-swatch__label,
.sg-swatch[style*="#DCFCE7"] .sg-swatch__label,
.sg-swatch[style*="#F3E8FF"] .sg-swatch__label,
.sg-swatch[style*="#F0F9FF"] .sg-swatch__label,
.sg-swatch[style*="#F0FDF4"] .sg-swatch__label,
.sg-swatch[style*="#FFCF00"] .sg-swatch__label {
  color: #333;
  text-shadow: none;
}

/* Typography Samples */
.sg-type-samples {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sg-type-sample {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-divider);
}

.sg-type-sample__label {
  flex-shrink: 0;
  width: 240px;
  font-size: 12px;
  font-weight: var(--fw-medium);
  color: var(--color-grey-700);
  font-family: monospace;
}

/* Spacing Samples */
.sg-spacing-samples {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sg-spacing-sample {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sg-spacing-bar {
  height: 24px;
  background: var(--color-primary-900);
  border-radius: 4px;
  min-width: 4px;
}

.sg-spacing-sample span {
  font-size: 13px;
  font-family: monospace;
  color: var(--color-grey-700);
}

/* Radius Samples */
.sg-radius-samples {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.sg-radius-sample {
  width: 80px;
  height: 80px;
  background: var(--color-primary-900);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sg-radius-sample span {
  font-size: 11px;
  font-weight: var(--fw-medium);
  color: white;
  text-align: center;
}

/* Shadow Samples */
.sg-shadow-samples {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.sg-shadow-sample {
  width: 300px;
  padding: 24px;
  background: white;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.6;
}

.sg-shadow-sample code {
  font-size: 11px;
  color: var(--color-grey-700);
  font-family: monospace;
}

/* Component Demo */
.sg-component-demo {
  padding: 32px;
  background: var(--color-surface-secondary);
  border-radius: 16px;
  border: 1px solid var(--color-divider);
  margin-bottom: 24px;
}

/* Dashboard Preview */
.sg-dashboard-preview {
  overflow-x: auto;
  border: 1px solid var(--color-divider);
  border-radius: 16px;
  background: var(--color-surface-secondary);
}

.sg-dashboard-preview .dashboard {
  min-width: 1200px;
}

/* Demo Link */
.sg-demo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 16px 32px;
  background: var(--color-primary-900);
  color: white;
  text-decoration: none;
  border-radius: 12px;
  font-family: var(--font-primary);
  font-size: 18px;
  font-weight: var(--fw-semibold);
  transition: opacity 0.2s, transform 0.15s;
  box-shadow: var(--shadow-elevated);
}

.sg-demo-link:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}

/* Footer */
.sg-footer {
  text-align: center;
  padding: 40px;
  color: var(--color-grey-700);
  font-size: 14px;
  border-top: 1px solid var(--color-divider);
  margin-top: 80px;
}
