/**
 * Info Hint Component
 *
 * (i)-Symbol hinter einem Feldnamen mit kurzer Erklärung.
 * Verwendet mit: templates/components/_info_hint.html.twig
 */

.info-hint-label-row {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.info-hint-label-row > .text-input-label,
.info-hint-label-row > .subsection-title {
  margin-bottom: 0;
}

.info-hint-label-row:has(> .subsection-title) {
  margin-bottom: 10px;
}

.form-group:has(> .info-hint-label-row) {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-hint {
  position: relative;
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
}

.info-hint-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  cursor: help;
}

.info-hint-trigger:hover,
.info-hint.is-open .info-hint-trigger {
  color: var(--primary-color);
}

.info-hint-trigger:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 1px;
}

.info-hint-bubble {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: var(--z-dropdown);
  width: max-content;
  max-width: min(320px, calc(100vw - 32px));
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-md);
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

.info-hint.is-open .info-hint-bubble {
  display: block;
}

.toggle-item-wrapper {
  display: flex;
  align-items: center;
  gap: 4px;
}
