/**
 * VariantView Utility Classes
 *
 * Functional CSS utilities for quick styling adjustments.
 * Uses consistent naming: .vv-{property}-{value}
 */

/* ════════════════════════════════════════════════════════════════════════════
   TEXT UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

/* Font Family */
.vv-font-sans { font-family: var(--vv-font-family-sans); }
.vv-font-mono { font-family: var(--vv-font-family-mono); }

/* Font Size */
.vv-text-xs { font-size: var(--vv-font-size-xs); }
.vv-text-sm { font-size: var(--vv-font-size-sm); }
.vv-text-base { font-size: var(--vv-font-size-base); }
.vv-text-md { font-size: var(--vv-font-size-md); }
.vv-text-lg { font-size: var(--vv-font-size-lg); }
.vv-text-xl { font-size: var(--vv-font-size-xl); }
.vv-text-2xl { font-size: var(--vv-font-size-2xl); }

/* Font Weight */
.vv-font-normal { font-weight: var(--vv-font-weight-normal); }
.vv-font-medium { font-weight: var(--vv-font-weight-medium); }
.vv-font-semibold { font-weight: var(--vv-font-weight-semibold); }
.vv-font-bold { font-weight: var(--vv-font-weight-bold); }

/* Text Alignment */
.vv-text-left { text-align: left; }
.vv-text-center { text-align: center; }
.vv-text-right { text-align: right; }

/* Text Transform */
.vv-uppercase { text-transform: uppercase; letter-spacing: var(--vv-letter-spacing-caps); }
.vv-lowercase { text-transform: lowercase; }
.vv-capitalize { text-transform: capitalize; }
.vv-normal-case { text-transform: none; }

/* Line Height */
.vv-leading-tight { line-height: var(--vv-line-height-tight); }
.vv-leading-normal { line-height: var(--vv-line-height-normal); }
.vv-leading-relaxed { line-height: var(--vv-line-height-relaxed); }

/* Text Color (Semantic) */
.vv-text-primary { color: var(--vv-color-text-primary); }
.vv-text-secondary { color: var(--vv-color-text-secondary); }
.vv-text-tertiary { color: var(--vv-color-text-tertiary); }
.vv-text-disabled { color: var(--vv-color-text-disabled); }

/* Numeric Colors */
.vv-text-positive { color: var(--vv-color-numeric-positive); }
.vv-text-negative { color: var(--vv-color-numeric-negative); }
.vv-text-warning { color: var(--vv-color-warning); }
.vv-text-danger { color: var(--vv-color-signal-overvalued); font-weight: 600; }

/* Sentiment Colors (for text content, not numbers) */
.vv-text-bullish { color: var(--vv-color-sentiment-positive); }
.vv-text-bearish { color: var(--vv-color-sentiment-negative); }
.vv-text-insight { color: var(--vv-color-insight-text); }
.vv-text-interactive { color: var(--vv-color-interactive); }

/* Truncation */
.vv-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.vv-line-clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tabular Numbers (for aligned columns) */
.vv-tabular-nums { font-variant-numeric: tabular-nums; }

/* ════════════════════════════════════════════════════════════════════════════
   SPACING UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

/* Margin */
.vv-m-0 { margin: var(--vv-space-0); }
.vv-m-1 { margin: var(--vv-space-1); }
.vv-m-2 { margin: var(--vv-space-2); }
.vv-m-3 { margin: var(--vv-space-3); }
.vv-m-4 { margin: var(--vv-space-4); }
.vv-m-5 { margin: var(--vv-space-5); }
.vv-m-6 { margin: var(--vv-space-6); }
.vv-m-8 { margin: var(--vv-space-8); }

.vv-mt-0 { margin-top: var(--vv-space-0); }
.vv-mt-1 { margin-top: var(--vv-space-1); }
.vv-mt-2 { margin-top: var(--vv-space-2); }
.vv-mt-3 { margin-top: var(--vv-space-3); }
.vv-mt-4 { margin-top: var(--vv-space-4); }
.vv-mt-5 { margin-top: var(--vv-space-5); }
.vv-mt-6 { margin-top: var(--vv-space-6); }
.vv-mt-8 { margin-top: var(--vv-space-8); }

.vv-mb-0 { margin-bottom: var(--vv-space-0); }
.vv-mb-1 { margin-bottom: var(--vv-space-1); }
.vv-mb-2 { margin-bottom: var(--vv-space-2); }
.vv-mb-3 { margin-bottom: var(--vv-space-3); }
.vv-mb-4 { margin-bottom: var(--vv-space-4); }
.vv-mb-5 { margin-bottom: var(--vv-space-5); }
.vv-mb-6 { margin-bottom: var(--vv-space-6); }
.vv-mb-8 { margin-bottom: var(--vv-space-8); }

.vv-ml-0 { margin-left: var(--vv-space-0); }
.vv-ml-1 { margin-left: var(--vv-space-1); }
.vv-ml-2 { margin-left: var(--vv-space-2); }
.vv-ml-3 { margin-left: var(--vv-space-3); }
.vv-ml-4 { margin-left: var(--vv-space-4); }

.vv-mr-0 { margin-right: var(--vv-space-0); }
.vv-mr-1 { margin-right: var(--vv-space-1); }
.vv-mr-2 { margin-right: var(--vv-space-2); }
.vv-mr-3 { margin-right: var(--vv-space-3); }
.vv-mr-4 { margin-right: var(--vv-space-4); }

.vv-mx-auto { margin-left: auto; margin-right: auto; }

/* Padding */
.vv-p-0 { padding: var(--vv-space-0); }
.vv-p-1 { padding: var(--vv-space-1); }
.vv-p-2 { padding: var(--vv-space-2); }
.vv-p-3 { padding: var(--vv-space-3); }
.vv-p-4 { padding: var(--vv-space-4); }
.vv-p-5 { padding: var(--vv-space-5); }
.vv-p-6 { padding: var(--vv-space-6); }
.vv-p-8 { padding: var(--vv-space-8); }

.vv-pt-0 { padding-top: var(--vv-space-0); }
.vv-pt-1 { padding-top: var(--vv-space-1); }
.vv-pt-2 { padding-top: var(--vv-space-2); }
.vv-pt-3 { padding-top: var(--vv-space-3); }
.vv-pt-4 { padding-top: var(--vv-space-4); }
.vv-pt-5 { padding-top: var(--vv-space-5); }

.vv-pb-0 { padding-bottom: var(--vv-space-0); }
.vv-pb-1 { padding-bottom: var(--vv-space-1); }
.vv-pb-2 { padding-bottom: var(--vv-space-2); }
.vv-pb-3 { padding-bottom: var(--vv-space-3); }
.vv-pb-4 { padding-bottom: var(--vv-space-4); }
.vv-pb-5 { padding-bottom: var(--vv-space-5); }

.vv-px-0 { padding-left: var(--vv-space-0); padding-right: var(--vv-space-0); }
.vv-px-2 { padding-left: var(--vv-space-2); padding-right: var(--vv-space-2); }
.vv-px-4 { padding-left: var(--vv-space-4); padding-right: var(--vv-space-4); }

.vv-py-0 { padding-top: var(--vv-space-0); padding-bottom: var(--vv-space-0); }
.vv-py-2 { padding-top: var(--vv-space-2); padding-bottom: var(--vv-space-2); }
.vv-py-4 { padding-top: var(--vv-space-4); padding-bottom: var(--vv-space-4); }

/* Gap */
.vv-gap-1 { gap: var(--vv-space-1); }
.vv-gap-2 { gap: var(--vv-space-2); }
.vv-gap-3 { gap: var(--vv-space-3); }
.vv-gap-4 { gap: var(--vv-space-4); }
.vv-gap-5 { gap: var(--vv-space-5); }
.vv-gap-6 { gap: var(--vv-space-6); }

/* ════════════════════════════════════════════════════════════════════════════
   DISPLAY & LAYOUT UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

.vv-hidden { display: none; }
.vv-block { display: block; }
.vv-inline { display: inline; }
.vv-inline-block { display: inline-block; }
.vv-flex { display: flex; }
.vv-inline-flex { display: inline-flex; }
.vv-grid { display: grid; }

/* Flex Direction */
.vv-flex-row { flex-direction: row; }
.vv-flex-col { flex-direction: column; }

/* Flex Wrap */
.vv-flex-wrap { flex-wrap: wrap; }
.vv-flex-nowrap { flex-wrap: nowrap; }

/* Justify Content */
.vv-justify-start { justify-content: flex-start; }
.vv-justify-center { justify-content: center; }
.vv-justify-end { justify-content: flex-end; }
.vv-justify-between { justify-content: space-between; }

/* Align Items */
.vv-items-start { align-items: flex-start; }
.vv-items-center { align-items: center; }
.vv-items-end { align-items: flex-end; }
.vv-items-baseline { align-items: baseline; }

/* Flex Grow/Shrink */
.vv-flex-1 { flex: 1 1 0%; }
.vv-flex-auto { flex: 1 1 auto; }
.vv-flex-none { flex: none; }

/* Width */
.vv-w-full { width: 100%; }
.vv-w-auto { width: auto; }
.vv-max-w-content { max-width: var(--vv-max-width-content); }
.vv-max-w-narrow { max-width: var(--vv-max-width-narrow); }

/* ════════════════════════════════════════════════════════════════════════════
   BACKGROUND UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

.vv-bg-primary { background-color: var(--vv-color-surface-primary); }
.vv-bg-secondary { background-color: var(--vv-color-surface-secondary); }
.vv-bg-tertiary { background-color: var(--vv-color-surface-tertiary); }
.vv-bg-card { background-color: var(--vv-color-surface-card, var(--vv-color-surface-primary)); }

.vv-bg-positive { background-color: var(--vv-color-sentiment-positive-bg); }
.vv-bg-negative { background-color: var(--vv-color-sentiment-negative-bg); }
.vv-bg-insight { background-color: var(--vv-color-insight-bg); }
.vv-bg-interactive { background-color: var(--vv-color-interactive-bg); }

/* ════════════════════════════════════════════════════════════════════════════
   BORDER UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

.vv-border { border: var(--vv-border-width) solid var(--vv-color-border-primary); }
.vv-border-light { border: var(--vv-border-width) solid var(--vv-color-border-light); }
.vv-border-t { border-top: var(--vv-border-width) solid var(--vv-color-border-primary); }
.vv-border-b { border-bottom: var(--vv-border-width) solid var(--vv-color-border-primary); }
.vv-border-l { border-left: var(--vv-border-width) solid var(--vv-color-border-primary); }
.vv-border-r { border-right: var(--vv-border-width) solid var(--vv-color-border-primary); }
.vv-border-none { border: none; }

/* Border Radius */
.vv-rounded-none { border-radius: 0; }
.vv-rounded-sm { border-radius: var(--vv-radius-sm); }
.vv-rounded { border-radius: var(--vv-radius-md); }
.vv-rounded-lg { border-radius: var(--vv-radius-lg); }
.vv-rounded-full { border-radius: var(--vv-radius-full); }

/* ════════════════════════════════════════════════════════════════════════════
   SHADOW UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

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

/* ════════════════════════════════════════════════════════════════════════════
   VISIBILITY UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

.vv-visible { visibility: visible; }
.vv-invisible { visibility: hidden; }
.vv-opacity-0 { opacity: 0; }
.vv-opacity-50 { opacity: 0.5; }
.vv-opacity-100 { opacity: 1; }

/* ════════════════════════════════════════════════════════════════════════════
   RESPONSIVE UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

/* Hide on mobile, show on tablet+ */
@media (max-width: 767px) {
  .vv-hide-mobile { display: none !important; }
}

/* Hide on tablet+, show on mobile */
@media (min-width: 768px) {
  .vv-hide-desktop { display: none !important; }
}

/* Stack on mobile */
@media (max-width: 639px) {
  .vv-stack-mobile {
    flex-direction: column;
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   INTERACTION UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

.vv-cursor-pointer { cursor: pointer; }
.vv-cursor-help { cursor: help; }
.vv-cursor-ew-resize { cursor: ew-resize; }
.vv-select-none { user-select: none; }
.vv-select-all { user-select: all; }

/* ════════════════════════════════════════════════════════════════════════════
   ACCESSIBILITY UTILITIES
   ════════════════════════════════════════════════════════════════════════════ */

/**
 * Screen reader only - visually hidden but accessible to screen readers
 * Per CLAUDE.md Section 5: Used for hidden data tables in visualizations
 */
.vv-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
