/* ==========================================================================
   Helper notes — semantic contextual note component
   ========================================================================== */

.ds-helper-note {
  width: 100%;
  max-width: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-2-5, 10px) var(--space-3, 12px);
  border: 1px solid transparent;
  border-radius: var(--radius-md, 10px);
}

.ds-helper-note--no-icon {
  grid-template-columns: minmax(0, 1fr);
}

.ds-helper-note--no-icon .ds-helper-note__icon {
  display: none;
}

.ds-helper-note--compact {
  padding: var(--space-2, 8px) var(--space-2-5, 10px);
}

.ds-helper-note--with-actions {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.ds-helper-note__icon {
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  align-self: center;
  border-radius: var(--radius-pill);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
}

.ds-helper-note__copy {
  min-width: 0;
  display: grid;
  align-content: center;
  gap: var(--space-1);
}

.ds-helper-note__label {
  /* TY-01 eyebrow-kicker */
  margin: 0;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.25;
}

.ds-helper-note__text {
  /* TY-04 subtext-meta-copy */
  margin: 0;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  color: var(--helper);
}

.ds-helper-note__text strong {
  color: var(--text);
  font-weight: 600;
}

.ds-helper-note__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  align-self: center;
}

.ds-helper-note--with-actions .ds-helper-note__copy {
  padding-right: var(--space-2);
}

/* Guidance / info tone.
   The marker treatment intentionally follows the accepted guidance anchor marker language. */
.ds-helper-note--guidance {
  background: var(--guidance-surface-soft);
  border-color: var(--guidance-border);
}

.ds-helper-note--guidance .ds-helper-note__icon {
  background: rgba(110,168,255,.18);
  border: 1px solid rgba(110,168,255,.28);
  color: var(--guidance-blue);
}

.ds-helper-note--guidance .ds-helper-note__label {
  color: var(--guidance-blue);
}

/* Warning tone */
.ds-helper-note--warning {
  background: var(--warning-note-surface);
  border-color: var(--warning-note-border);
}

.ds-helper-note--warning .ds-helper-note__icon {
  background: var(--warning-note-surface);
  border: 1px solid var(--warning-note-border);
  color: var(--warning-note-accent);
}

.ds-helper-note--warning .ds-helper-note__label {
  color: var(--warning-note-accent);
}

/* Success / happy-state tone */
.ds-helper-note--success {
  background: var(--success-note-surface);
  border-color: var(--success-note-border);
}

.ds-helper-note--success .ds-helper-note__icon {
  background: var(--success-note-surface);
  border: 1px solid var(--success-note-border);
  color: var(--success-note-accent);
}

.ds-helper-note--success .ds-helper-note__label {
  color: var(--success-note-accent);
}

/* Error tone */
.ds-helper-note--error {
  background: var(--error-note-surface);
  border-color: var(--error-note-border);
}

.ds-helper-note--error .ds-helper-note__icon {
  background: var(--error-note-surface);
  border: 1px solid var(--error-note-border);
  color: var(--error-note-accent);
}

.ds-helper-note--error .ds-helper-note__label {
  color: var(--error-note-accent);
}

@media (max-width: 720px) {
  .ds-helper-note--with-actions {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ds-helper-note--with-actions .ds-helper-note__actions {
    grid-column: 2;
    justify-content: flex-start;
    padding-top: var(--space-1);
  }

  .ds-helper-note--with-actions .ds-helper-note__copy {
    padding-right: 0;
  }
}
