/* Help Tooltip Styles */

/* Help icon button */
.help-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background-color: rgb(229 231 235); /* gray-200 */
  color: rgb(75 85 99); /* gray-600 */
  border: none;
  cursor: help;
  transition: all 0.2s;
  margin-left: 0.25rem;
  flex-shrink: 0;
}

.help-icon-button:hover {
  background-color: rgb(209 213 219); /* gray-300 */
  color: rgb(55 65 81); /* gray-700 */
  transform: scale(1.1);
}

.help-icon-button svg {
  width: 0.875rem;
  height: 0.875rem;
}

/* Inline help icon (next to labels) */
.help-icon-inline {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.375rem;
}

/* Help popover */
.help-popover {
  position: absolute;
  z-index: 9999;
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1),
              0 4px 6px -2px rgba(0, 0, 0, 0.05),
              0 0 0 1px rgba(0, 0, 0, 0.05);
  padding: 0;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.help-popover.show {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.help-popover-content {
  padding: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgb(55 65 81); /* gray-700 */
}

.help-popover-content p {
  margin: 0 0 0.5rem 0;
}

.help-popover-content p:last-child {
  margin-bottom: 0;
}

.help-popover-content ul,
.help-popover-content ol {
  margin: 0.5rem 0;
  padding-left: 1.5rem;
}

.help-popover-content li {
  margin: 0.25rem 0;
}

.help-popover-content strong {
  font-weight: 600;
  color: rgb(31 41 55); /* gray-800 */
}

.help-popover-content code {
  background-color: rgb(243 244 246); /* gray-100 */
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-size: 0.875em;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* Popover arrow */
.help-popover-arrow {
  position: absolute;
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* Arrow positioning based on popover position */
.help-popover[data-position="top"] .help-popover-arrow {
  bottom: -6px;
  left: 50%;
  margin-left: -6px;
  border-top: none;
  border-left: none;
}

.help-popover[data-position="bottom"] .help-popover-arrow {
  top: -6px;
  left: 50%;
  margin-left: -6px;
  border-bottom: none;
  border-right: none;
}

.help-popover[data-position="left"] .help-popover-arrow {
  right: -6px;
  top: 50%;
  margin-top: -6px;
  border-left: none;
  border-bottom: none;
}

.help-popover[data-position="right"] .help-popover-arrow {
  left: -6px;
  top: 50%;
  margin-top: -6px;
  border-right: none;
  border-top: none;
}

/* Help panel (for larger help sections) */
.help-panel {
  background-color: rgba(232, 107, 74, 0.05);
  border-left: 3px solid #E86B4A; /* fitcloud-coral */
  padding: 1rem;
  margin: 1rem 0;
  border-radius: 0.375rem;
}

.help-panel-title {
  font-weight: 600;
  color: rgb(55 65 81); /* gray-700 */
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  font-size: 0.875rem;
}

.help-panel-title svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  color: #E86B4A; /* fitcloud-coral */
}

.help-panel-content {
  font-size: 0.875rem;
  color: rgb(75 85 99); /* gray-600 */
  line-height: 1.5;
}

.help-panel-content ul {
  margin: 0.5rem 0;
  padding-left: 1.25rem;
}

.help-panel-content li {
  margin: 0.25rem 0;
}

/* Help badge (for "What's This?" links) */
.help-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 500;
  color: #E86B4A; /* fitcloud-coral */
  background-color: rgba(232, 107, 74, 0.1);
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  border: none;
}

.help-badge:hover {
  background-color: rgba(232, 107, 74, 0.2);
  color: #D25A3A; /* fitcloud-coral-dark */
  text-decoration: none;
}

.help-badge svg {
  width: 0.875rem;
  height: 0.875rem;
  margin-right: 0.25rem;
}

/* Required field indicator with help */
.field-with-help {
  position: relative;
}

.field-with-help label {
  display: flex;
  align-items: center;
}

/* Help text (static, below inputs) */
.help-text {
  font-size: 0.875rem;
  color: rgb(107 114 128); /* gray-500 */
  margin-top: 0.375rem;
  line-height: 1.4;
}

.help-text-with-icon {
  display: flex;
  align-items: flex-start;
}

.help-text-with-icon svg {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
  margin-top: 0.125rem;
  flex-shrink: 0;
  color: rgb(156 163 175); /* gray-400 */
}

/* Collapsible help section */
.help-collapsible {
  border: 1px solid rgb(229 231 235); /* gray-200 */
  border-radius: 0.5rem;
  margin: 1rem 0;
  overflow: hidden;
}

.help-collapsible-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background-color: rgb(249 250 251); /* gray-50 */
  border: none;
  cursor: pointer;
  transition: background-color 0.2s;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgb(55 65 81); /* gray-700 */
}

.help-collapsible-trigger:hover {
  background-color: rgb(243 244 246); /* gray-100 */
}

.help-collapsible-trigger svg {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 0.2s;
}

.help-collapsible-trigger[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.help-collapsible-content {
  padding: 1rem;
  background-color: white;
  font-size: 0.875rem;
  color: rgb(75 85 99); /* gray-600 */
  line-height: 1.5;
  display: none;
}

.help-collapsible-content.show {
  display: block;
}

/* Responsive */
@media (max-width: 640px) {
  .help-popover {
    max-width: calc(100vw - 2rem) !important;
  }

  .help-panel {
    padding: 0.75rem;
    margin: 0.75rem 0;
  }
}
