/* ===================================
   LABEL ATOM - Form Label Component
   ===================================
   
   Single source of truth for form labels.
   Professional, clean typography.
*/

/* Base label styles */
.label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1_5);
  font-family: var(--font-family-sans);
  font-weight: var(--font-weight-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-1_5);
  line-height: var(--line-height-tight);
  cursor: default;
}

/* Label text wrapper */
.label-text {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-1);
}

/* Required indicator */
.label-required {
  color: var(--color-error);
  font-weight: var(--font-weight-semibold);
  font-size: 1.1em;
}

/* Tooltip icon */
.label-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: help;
  transition: color var(--duration-150) var(--easing-out);
}

.label-tooltip:hover {
  color: var(--text-secondary);
}

.label-tooltip svg {
  width: var(--icon-size-sm);
  height: var(--icon-size-sm);
  stroke-width: 2;
}

/* ===================================
   LABEL SIZES
   =================================== */

.label-sm {
  font-size: var(--text-xs);
  margin-bottom: var(--space-1);
}

.label-md {
  font-size: var(--text-sm);
  margin-bottom: var(--space-1_5);
}

.label-lg {
  font-size: var(--text-base);
  margin-bottom: var(--space-2);
}

/* ===================================
   LABEL STATES
   =================================== */

/* Disabled state */
.label-disabled {
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.7;
}

.label-disabled .label-required {
  opacity: 0.5;
}

/* ===================================
   ACCESSIBILITY
   =================================== */

/* Screen reader only text */
.label .sr-only {
  position: absolute;
  width: var(--space-px);
  height: var(--space-px);
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* ===================================
   RESPONSIVE ADJUSTMENTS
   =================================== */

@media (max-width: 640px) {
  .label {
    font-size: var(--text-sm);
  }
  
  .label-sm {
    font-size: var(--text-2xs);
  }
  
  .label-lg {
    font-size: var(--text-sm);
  }
}
