/* One-click connections (10.11.2026): WordPress sites in the Integrations drawer, ready code with "Kopiert", install links,
   the page dialog and the OAuth consent page (#/oauth). Tokens only (theme.css); no uppercase labels, no coloured side borders. */

/* ---------- drawer: ready code + buttons ---------- */
.ig-code { display: flex; flex-direction: column; gap: 10px; }
.ig-code .codebox { margin: 0; max-height: 180px; overflow: auto; font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; word-break: break-all; }
.ig-d .ig-code .codebox { margin: 0; }
.btn.is-copied, .btn.is-copied:hover { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.is-copied .ico { color: #fff; }
.ig-cta-note { flex: 1 1 200px; align-self: center; }
.ig-cta .btn[disabled] { opacity: .55; cursor: not-allowed; }
.ig-today { margin-top: 16px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--border); }
.ig-today h5 { margin: 0 0 10px; font-size: var(--fs-sm, 14px); }
.ig-today .ig-steps { margin-bottom: 12px; }
.ig-today-first { margin-top: 0; }
.ig-later { margin-top: 18px; }
.ig-later h5 { margin: 0 0 10px; font-size: var(--fs-sm, 14px); color: var(--muted); font-weight: 600; }
.ig-consent { display: flex; gap: 6px; align-items: flex-start; margin: 10px 0 0; }
.ig-consent .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; color: var(--ok); }
.ig-oauth { margin: 0 0 12px; }
.ig-links .btn[data-file] { color: var(--text-3); }
.ig-d > .alert { margin: 0; }

/* ---------- WordPress: connect form + connected sites ---------- */
.ig-wpform { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 10px; align-items: end; }
.ig-wpform .field { margin: 0; }
.ig-wpform .btn { height: 40px; white-space: nowrap; }
.ig-wpform p { grid-column: 1 / -1; margin: 2px 0 0; line-height: 1.5; }
.ig-wpform .alert { grid-column: 1 / -1; margin: 4px 0 0; }
.ig-more { margin-top: 4px; }
.ig-more summary { cursor: pointer; font-size: var(--fs-sm, 14px); color: var(--accent-text); font-weight: 500; padding: 4px 0; }
.ig-more[open] summary { margin-bottom: 10px; }
.ig-wps { display: flex; flex-direction: column; gap: 10px; }
.ig-wp { display: flex; flex-direction: column; gap: 10px; padding: 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-sm, none); }
.ig-wp-top { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ig-wp-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #21759b14; color: #21759b; flex: none; }
.ig-wp-ico .ico { width: 18px; height: 18px; }
.ig-wp-b { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.ig-wp-b b { font-size: var(--fs-md, 15px); overflow-wrap: anywhere; }
.ig-wp-b b a { color: var(--text); }
.ig-wp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ig-wp-chips .badge .ico { width: 12px; height: 12px; }
.ig-wp-page { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: var(--fs-sm, 14px); }
.ig-wp-page > span { display: inline-flex; gap: 6px; align-items: center; }
.ig-wp-page .ico { width: 15px; height: 15px; color: var(--text-3); }
.ig-wp-acts { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 10px; border-top: 1px solid var(--border); }
.ig-wp-off { margin-left: auto; color: var(--text-3); }
.ig-wp [data-wp-msg]:empty { display: none; }
.ig-wp .alert { margin: 0; }

/* ---------- page dialog + result ---------- */
.ig-radios { display: grid; gap: 8px; }
.ig-radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); cursor: pointer; background: var(--surface); }
.ig-radio:has(input:checked) { border-color: var(--accent); background: var(--accent-50); }
.ig-radio input { accent-color: var(--accent); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.ig-radio > span { display: flex; flex-direction: column; gap: 2px; }
.ig-page-how { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.ig-page-how .ico { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.ig-page [data-page-msg]:empty { display: none; }
.ig-done { text-align: center; padding: 8px 4px 4px; }
.ig-done-ico { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.ig-done-ico .ico { width: 28px; height: 28px; }
.ig-done h3 { margin: 0 0 6px; overflow-wrap: anywhere; }
.ig-done p { margin: 0 auto 16px; max-width: 420px; line-height: 1.5; }

/* ---------- OAuth consent page (#/oauth) ---------- */
.oa-pair { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.oa-link { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--text-3); }
.oa-link .ico { width: 15px; height: 15px; }
.oa-msl .logo-mark { width: 48px; height: 48px; border-radius: 13px; display: block; }
.oa-who { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.oa-who > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.oa-who b { overflow-wrap: anywhere; }
.oa-who-ico { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-50); color: var(--accent-text); flex: none; }
.oa-scopes { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--surface-2); }
.oa-scopes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.oa-scopes li { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-sm, 14px); line-height: 1.4; }
.oa-scopes li .ico { width: 16px; height: 16px; flex: none; margin-top: 1px; color: var(--accent-text); }
.oa-own { display: flex; gap: 8px; align-items: flex-start; margin: 0; }
.oa-own .ico { width: 14px; height: 14px; flex: none; margin-top: 1px; }
.oa [data-oa-box] { display: flex; flex-direction: column; gap: 14px; }
.oa [data-oa-box] > h2 { margin: 0; }
.oa [data-oa-box] .field { margin: 0; }
.oa [data-oa-box] > .btn-block + .btn-block { margin-top: -6px; }

@media (max-width: 640px) {
  .ig-wpform { grid-template-columns: 1fr; }
  .ig-wpform .btn { width: 100%; justify-content: center; }
  .ig-wp-acts .btn { flex: 1 1 auto; justify-content: center; }
  .ig-wp-off { margin-left: 0; }
  .ig-code .ig-cta .btn { flex: 1 1 100%; justify-content: center; }
}
/* a field group that is not a <label> (radio list) gets the same label look as label.field */
.ig-page div.field { display: flex; flex-direction: column; gap: 6px; }
.ig-page div.field > span:first-child { font-size: var(--fs-sm); font-weight: 500; color: var(--text-2); }
.ig-radio b { font-weight: 600; color: var(--text); }
.oa [data-oa-allow][disabled] { opacity: .45; cursor: not-allowed; filter: saturate(.6); }
