/* SOF Dashboard Info Help V1.2 */
.sof-info-help-field-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.sof-info-help-field-wrap > input,
.sof-info-help-field-wrap > select,
.sof-info-help-field-wrap > textarea {
  flex: 1 1 auto;
  min-width: 0;
}

.sof-info-help {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  margin-left: 0;
  vertical-align: middle;
  z-index: 20;
}

.sof-info-help-label-end {
  margin-left: 8px;
}

.sof-info-help-button {
  width: 20px;
  height: 20px;
  min-width: 20px;
  padding: 0;
  border: 1px solid rgba(88, 225, 255, 0.98);
  border-radius: 50%;
  background: rgba(6, 44, 73, 0.98);
  color: rgba(255, 255, 255, 0.98);
  box-shadow:
    inset 0 0 12px rgba(93, 220, 255, 0.18),
    0 0 14px rgba(53, 205, 255, 0.34);
  font: 700 12px/18px system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  text-align: center;
  cursor: help;
  appearance: none;
  -webkit-appearance: none;
}

.sof-info-help-button:hover,
.sof-info-help-button:focus-visible,
.sof-info-help.is-open .sof-info-help-button {
  border-color: rgba(148, 239, 255, 1);
  background: rgba(9, 67, 104, 1);
  color: #ffffff;
  outline: none;
  box-shadow:
    inset 0 0 14px rgba(124, 233, 255, 0.26),
    0 0 18px rgba(77, 214, 255, 0.52);
}

.sof-info-help-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  width: min(280px, calc(100vw - 44px));
  padding: 10px 12px;
  border: 1px solid rgba(102, 208, 255, 0.42);
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(10, 27, 42, 0.98), rgba(5, 18, 30, 0.98));
  color: rgba(230, 247, 255, 0.96);
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.035);
  font: 400 12px/1.48 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  text-align: left;
  white-space: normal;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-3px);
  pointer-events: none;
  transition:
    opacity 120ms ease,
    transform 120ms ease,
    visibility 120ms ease;
}

.sof-info-help:hover .sof-info-help-tooltip,
.sof-info-help:focus-within .sof-info-help-tooltip,
.sof-info-help.is-open .sof-info-help-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

@media (max-width: 720px) {
  .sof-info-help-field-wrap {
    gap: 8px;
  }

  .sof-info-help-tooltip {
    width: min(250px, calc(100vw - 32px));
  }
}

@media (prefers-reduced-motion: reduce) {
  .sof-info-help-tooltip {
    transition: none;
  }
}
