/* copy-buttons.css — shared styling for Copy / Copy for AI buttons. */

.cb-group {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-left: 10px;
  vertical-align: middle;
}

/* Button groups are absolutely positioned inside their h2 so the h2
   itself can stay in Redoc's normal block layout — that keeps the
   title text flush with the left edge of the rest of the section
   content (putting h2 into `display: flex` shifted the title due to
   Redoc's anchor-hash pseudo-element and text-indent rules).
   Scoped to decorated h2s so other `.cb-group` usages (e.g. the WS
   page's top-bar button) stay unaffected. */
.cb-h2-flex > .cb-group,
.cb-h2-wrap > .cb-group-block {
  position: absolute !important;
  top: 50% !important;
  right: 0 !important;
  transform: translateY(-50%) !important;
  display: inline-flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  gap: 8px !important;
  margin: 0 !important;
}

/* Section (tag) heading — visually distinct from operation headings:
   larger, heavier, with an accent underline. */
.cb-h2-flex {
  position: relative !important;
  font-size: 26px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  padding-bottom: 12px !important;
  margin-top: 32px !important;
  margin-bottom: 18px !important;
  border-bottom: 2px solid rgba(15, 118, 110, 0.35) !important;
}

/* Operation (non-section) heading — normal body hierarchy. */
.cb-h2-wrap {
  position: relative !important;
  font-size: 18px !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  margin-top: 24px !important;
  margin-bottom: 10px !important;
}

.cb-btn {
  font: 600 12px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease,
              color 0.12s ease, box-shadow 0.12s ease;
  white-space: nowrap;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);

  /* Primary = human. Green. */
  background: #059669;
  border: 1px solid #059669;
  color: #ffffff;
}

.cb-btn:hover  { background: #047857; border-color: #047857; }
.cb-btn:active { background: #065f46; border-color: #065f46; box-shadow: none; }

/* Secondary = AI. Blue. */
.cb-btn-secondary {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}
.cb-btn-secondary:hover  { background: #1d4ed8; border-color: #1d4ed8; }
.cb-btn-secondary:active { background: #1e40af; border-color: #1e40af; }

.cb-btn.cb-flash {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

/* Dark top-bar variant (used on the WS page top bar). */
.cb-btn-topbar {
  background: rgba(255, 255, 255, 0.08);
  color: #f3f4f6;
  border-color: rgba(255, 255, 255, 0.2);
}
.cb-btn-topbar:hover  { background: rgba(255, 255, 255, 0.16); }
.cb-btn-topbar:active { background: rgba(255, 255, 255, 0.24); }

/* WS event-card buttons: align to the right of the card head, before toggle.
   Kept inline + compact because the card head is a single flex row. */
.cb-group-ws { margin-left: auto; margin-right: 10px; gap: 6px; }
.card-head .cb-group-ws .cb-btn { font-size: 11px; padding: 6px 10px; }
