/* Discreet help for owner pages. No tracking, no motion. */

details.oc-help {
  display: inline-block;
  position: relative;
  margin: 0 0 0 0.35rem;
  vertical-align: middle;
  max-width: 100%;
}

summary.oc-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  padding: 0;
  border: 1px solid var(--line, #d5d0c8);
  border-radius: 999px;
  background: var(--paper, #fffcf8);
  color: var(--muted, #5c675f);
  font: inherit;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
  list-style: none;
}

summary.oc-help-btn::-webkit-details-marker {
  display: none;
}

summary.oc-help-btn:hover {
  border-color: var(--muted, #5c675f);
  color: var(--ink, #1c2420);
}

summary.oc-help-btn:focus-visible {
  outline: 2px solid var(--green, #0f6e50);
  outline-offset: 2px;
}

h2:has(+ details.oc-help),
h3:has(+ details.oc-help) {
  display: inline-block;
  margin-right: 0.15rem;
  vertical-align: middle;
}

form div:has(> label + details.oc-help) {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 0.3rem;
}

form div:has(> label + details.oc-help) > label {
  display: inline;
  width: auto;
  margin-bottom: 0.15rem;
}

form div:has(> label + details.oc-help) > input,
form div:has(> label + details.oc-help) > select,
form div:has(> label + details.oc-help) > textarea {
  flex: 1 0 100%;
  min-width: 0;
  width: 100%;
}

label.extra + details.oc-help,
label.check + details.oc-help {
  display: inline-block;
  margin: 0.15rem 0 0.45rem 0.2rem;
}

.oc-help-panel {
  position: absolute;
  z-index: 40;
  top: calc(100% + 0.35rem);
  left: 0;
  width: min(22rem, calc(100vw - 1.25rem));
  max-height: min(16rem, calc(100vh - 1.5rem));
  overflow: auto;
  padding: 0.7rem 0.8rem 0.55rem;
  background: var(--paper, #fffcf8);
  color: var(--ink, #1c2420);
  border: 1px solid var(--line, #e3ddd3);
  border-radius: 0.55rem;
  box-shadow: 0 8px 24px rgba(28, 36, 32, 0.08);
  font-size: 0.92rem;
  font-weight: 400;
  line-height: 1.45;
  text-align: left;
}

.oc-help-panel p {
  margin: 0 0 0.4rem;
}

.oc-help-k {
  font-weight: 650;
}

.oc-help-close {
  display: inline-block;
  margin: 0.1rem 0 0;
  padding: 0.15rem 0;
  border: 0;
  background: transparent;
  color: var(--green-dark, #0c5740);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}

.oc-help-close:focus-visible {
  outline: 2px solid var(--green, #0f6e50);
  outline-offset: 2px;
}

@media (max-width: 640px) {
  .oc-help-panel {
    width: min(22rem, calc(100vw - 1rem));
  }
}
