/* ================================================================
   PayStubCheck — tooltips.css
   Additive field-help tooltips for generator pages
   Never modifies form IDs, inputs, or Stripe wiring
   ================================================================ */

.psc-tip-wrap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.psc-tip-btn {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--border-2, #c8dab0);
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3, #7a8f68);
  font-family: 'DM Sans', sans-serif;
  padding: 0;
  line-height: 1;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
  vertical-align: middle;
  margin-left: 4px;
  position: relative;
  z-index: 1;
}

.psc-tip-btn:hover,
.psc-tip-btn:focus {
  background: var(--green, #5cb800);
  color: #fff;
  outline: none;
}

.psc-tip-popup {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1a2d0c;
  color: #eef7e4;
  font-size: 12.5px;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  line-height: 1.55;
  padding: 10px 14px;
  border-radius: 10px;
  min-width: 220px;
  max-width: 280px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 999;
  text-align: left;
  white-space: normal;
}

.psc-tip-popup::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #1a2d0c;
}

.psc-tip-btn:hover + .psc-tip-popup,
.psc-tip-btn:focus + .psc-tip-popup,
.psc-tip-btn[aria-expanded="true"] + .psc-tip-popup {
  opacity: 1;
}

/* Adjust popup position when near right edge */
.psc-tip-right .psc-tip-popup {
  left: auto;
  right: 0;
  transform: none;
}
.psc-tip-right .psc-tip-popup::after {
  left: auto;
  right: 10px;
  transform: none;
}

@media (max-width: 600px) {
  .psc-tip-popup {
    min-width: 180px;
    max-width: 240px;
    font-size: 12px;
  }
}
