/* =========================================================
   MAIS CONTROL — Component styles
   ========================================================= */

/* === BUTTONS === */
.mc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--text-base);
  line-height: 1;
  letter-spacing: var(--tracking-snug);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  padding: 0 16px;
  height: 40px;
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-out);
  white-space: nowrap;
  user-select: none;
}
.mc-btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 1px; }
.mc-btn[disabled], .mc-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.mc-btn--primary {
  background: var(--brand);
  color: var(--text-on-brand);
  box-shadow: var(--shadow-xs);
}
.mc-btn--primary:hover:not(:disabled) {
  background: var(--brand-hover);
  box-shadow: var(--shadow-brand);
  transform: translateY(-1px);
}
.mc-btn--primary:active:not(:disabled) { transform: translateY(0); }

.mc-btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}
.mc-btn--secondary:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: var(--mc-slate-400);
}

.mc-btn--ghost {
  background: transparent;
  color: var(--text-2);
}
.mc-btn--ghost:hover:not(:disabled) {
  background: var(--surface-3);
  color: var(--text);
}

.mc-btn--soft {
  background: var(--brand-soft);
  color: var(--brand);
}
.mc-btn--soft:hover:not(:disabled) { background: var(--brand-soft-hover); }

.mc-btn--success {
  background: var(--success);
  color: white;
}
.mc-btn--success:hover:not(:disabled) { filter: brightness(0.95); }

.mc-btn--danger {
  background: var(--danger);
  color: white;
}
.mc-btn--danger:hover:not(:disabled) { filter: brightness(0.95); }

.mc-btn--sm { height: 32px; padding: 0 12px; font-size: var(--text-sm); border-radius: var(--radius-sm); }
.mc-btn--lg { height: 48px; padding: 0 24px; font-size: var(--text-md); border-radius: var(--radius-lg); }
.mc-btn--xl { height: 56px; padding: 0 28px; font-size: var(--text-lg); border-radius: var(--radius-xl); }
.mc-btn--icon { width: 40px; height: 40px; padding: 0; }
.mc-btn--icon.mc-btn--sm { width: 32px; height: 32px; }

/* === INPUTS === */
.mc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.mc-label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  letter-spacing: var(--tracking-snug);
}
.mc-helper {
  font-size: var(--text-xs);
  color: var(--text-3);
}
.mc-helper--error { color: var(--danger); }

.mc-input,
.mc-select,
.mc-textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  transition: all var(--dur-fast) var(--ease-out);
  box-shadow: var(--shadow-xs);
}
.mc-textarea { height: auto; padding: 10px 12px; line-height: 1.5; resize: vertical; min-height: 88px; }
.mc-input::placeholder, .mc-textarea::placeholder { color: var(--text-3); }
.mc-input:hover, .mc-select:hover, .mc-textarea:hover { border-color: var(--mc-slate-400); }
.mc-input:focus, .mc-select:focus, .mc-textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.mc-input--error { border-color: var(--danger); }
.mc-input--error:focus { box-shadow: 0 0 0 3px color-mix(in oklch, var(--danger) 25%, transparent); }

.mc-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.mc-input-wrap .mc-input { padding-left: 40px; }
.mc-input-wrap__icon {
  position: absolute;
  left: 12px;
  width: 18px;
  height: 18px;
  color: var(--text-3);
  pointer-events: none;
}

/* === CARDS === */
.mc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.mc-card__header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.mc-card__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: var(--tracking-snug);
  margin: 0;
}
.mc-card__sub { font-size: var(--text-sm); color: var(--text-2); margin: 4px 0 0; }
.mc-card__body { padding: 24px; }
.mc-card__footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* === BADGES === */
.mc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: var(--tracking-snug);
  white-space: nowrap;
}
.mc-badge__dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}
.mc-badge--neutral { background: var(--surface-3); color: var(--text-2); }
.mc-badge--brand   { background: var(--brand-soft); color: var(--brand); }
.mc-badge--success { background: var(--success-soft); color: var(--success); }
.mc-badge--warning { background: var(--warning-soft); color: var(--warning); }
.mc-badge--danger  { background: var(--danger-soft); color: var(--danger); }
.mc-badge--info    { background: var(--info-soft); color: var(--info); }

/* === TABLE === */
.mc-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.mc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.mc-table thead th {
  text-align: left;
  font-weight: 600;
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-3);
  background: var(--surface-2);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.mc-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.mc-table tbody tr:last-child td { border-bottom: none; }
.mc-table tbody tr { transition: background var(--dur-fast); }
.mc-table tbody tr:hover { background: var(--surface-2); }
.mc-table .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.mc-table .mono { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); }

/* === SEMANTIC SURFACES === */
.mc-callout {
  display: flex;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-lg);
  border: 1px solid;
  align-items: flex-start;
  font-size: var(--text-sm);
  line-height: 1.5;
}
.mc-callout--info    { background: var(--brand-soft);   border-color: color-mix(in oklch, var(--brand) 18%, transparent); color: var(--text); }
.mc-callout--success { background: var(--success-soft); border-color: color-mix(in oklch, var(--success) 25%, transparent); color: var(--text); }
.mc-callout--warning { background: var(--warning-soft); border-color: color-mix(in oklch, var(--warning) 30%, transparent); color: var(--text); }
.mc-callout--danger  { background: var(--danger-soft);  border-color: color-mix(in oklch, var(--danger) 25%, transparent); color: var(--text); }
.mc-callout__icon { flex-shrink: 0; width: 20px; height: 20px; }
.mc-callout--info    .mc-callout__icon { color: var(--brand); }
.mc-callout--success .mc-callout__icon { color: var(--success); }
.mc-callout--warning .mc-callout__icon { color: var(--warning); }
.mc-callout--danger  .mc-callout__icon { color: var(--danger); }
.mc-callout__title { font-weight: 600; margin: 0 0 2px; }

/* === SWATCH === */
.swatch {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.swatch__chip {
  height: 64px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.04);
}
.swatch__name { font-size: var(--text-xs); font-weight: 600; color: var(--text); }
.swatch__hex  { font-family: var(--font-mono); font-size: var(--text-2xs); color: var(--text-3); }

.scale-row {
  display: grid;
  grid-template-columns: repeat(11, 1fr);
  gap: 6px;
}
.scale-row .swatch__chip { height: 56px; border-radius: var(--radius-sm); }
.scale-row .swatch__name { font-size: 10px; }
.scale-row .swatch__hex  { font-size: 9px; }

/* === SECTION === */
.section {
  padding: 96px 64px;
  border-bottom: 1px solid var(--border);
}
.section__eyebrow {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 12px;
}
.section__title {
  font-family: var(--font-display);
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: var(--tracking-tight);
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--text);
}
.section__lead {
  font-size: var(--text-lg);
  color: var(--text-2);
  max-width: 60ch;
  margin: 0 0 56px;
  line-height: 1.55;
}

.subhead {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin: 0 0 16px;
}
