/* Contextual help inherits the existing site or admin palette. */
.dd-ux-help-control{display:inline-flex;vertical-align:middle;margin-inline:6px;flex:0 0 auto}
.dd-ux-help-control[hidden],.dd-ux-help-panel[hidden]{display:none!important}
.dd-ux-help-trigger{display:inline-grid;place-items:center;width:32px;height:32px;min-width:32px;min-height:32px;padding:0;border:1px solid var(--line,var(--admin-border,#d6cad2));border-radius:50%;background:var(--surface,var(--admin-surface,#fff));color:var(--accent,var(--admin-accent,#a42f5b));font:600 14px/1 system-ui,sans-serif;cursor:pointer;vertical-align:middle}
.dd-ux-help-trigger:focus-visible,.dd-ux-help-dismiss:focus-visible{outline:3px solid var(--accent,var(--admin-accent,#a42f5b));outline-offset:3px}
.dd-ux-help-panel{position:fixed;inset:auto 16px 16px auto;box-sizing:border-box;z-index:2500;width:min(360px,calc(100vw - 32px));max-width:calc(100vw - 32px);max-height:min(420px,calc(100dvh - 32px));overflow:auto;margin:0;padding:18px;border:1px solid var(--line,var(--admin-border,#d6cad2));border-radius:14px;background:var(--surface,var(--admin-surface,#fff));color:var(--text,var(--admin-text,#261f28));box-shadow:0 14px 44px #0003;font:14px/1.55 system-ui,sans-serif;overflow-wrap:anywhere}
.dd-ux-help-panel::backdrop{background:transparent;pointer-events:none}
.dd-ux-help-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:10px}
.dd-ux-help-header h2{margin:0;font:600 16px/1.4 system-ui,sans-serif;color:inherit}
.dd-ux-help-dismiss{display:inline-grid;place-items:center;flex:0 0 auto;min-width:32px;min-height:32px;padding:0;border:1px solid var(--line,var(--admin-border,#d6cad2));border-radius:8px;background:transparent;color:inherit;font:22px/1 system-ui,sans-serif;cursor:pointer}
.dd-ux-help-text{margin:0!important;white-space:pre-line;color:inherit!important;font:inherit}
@media(max-width:600px),(pointer:coarse){.dd-ux-help-trigger{width:44px;height:44px;min-width:44px;min-height:44px}.dd-ux-help-dismiss{min-width:44px;min-height:44px}.dd-ux-help-panel{inset:auto 12px 12px 12px;width:auto;max-width:calc(100vw - 24px);max-height:calc(75dvh - 24px);padding:16px}}

/* Opt-in title/context hosts keep the same inline control beside their caption. */
[data-dd-help-container] > .dd-ux-help-control{align-self:center;white-space:nowrap}

/* Field help belongs to the caption, while its button stays outside the label. */
.dd-ux-help-field{display:block;position:relative;min-width:0;max-width:100%}
.dd-ux-help-field>label{min-width:0}
.dd-ux-help-caption{display:block;box-sizing:border-box;min-height:32px;padding-inline-end:44px;align-content:center}
.dd-ux-help-field-actions{display:flex;align-items:center;gap:4px;position:absolute;inset-block-start:0;inset-inline-end:0}
.dd-ux-help-field-actions>.dd-ux-help-control{margin:0}
.dd-ux-help-field--check>label{padding-inline-end:56px}
.dd-ux-help-field--check>.dd-ux-help-field-actions{inset-block-start:8px;inset-inline-end:8px}
.profile-settings-grid>.dd-ux-help-field>label{display:grid;gap:7px;margin:0}
body.community-app #profile-privacy-settings .settings-privacy>.dd-ux-help-field>label{display:grid;gap:8px}
body.community-app #profile-privacy-settings .settings-privacy>.dd-ux-help-field--check>label{display:flex;align-items:flex-start}
/* Component dimensions must survive page-wide rules for form submit buttons. */
.dd-ux-help-control>.dd-ux-help-trigger{box-sizing:border-box;width:32px!important;height:32px!important;min-width:32px!important;max-width:32px!important;min-height:32px!important;max-height:32px!important;margin:0!important;padding:0!important;align-self:center;flex:0 0 auto}
@media(max-width:600px),(pointer:coarse){
 .dd-ux-help-control>.dd-ux-help-trigger{width:44px!important;height:44px!important;min-width:44px!important;max-width:44px!important;min-height:44px!important;max-height:44px!important}
 .dd-ux-help-caption{min-height:44px;padding-inline-end:56px}
 .dd-ux-help-field--check>label{padding-inline-end:64px}
}

/* Keep the consent card's spacing outside the shared positioning shell. */
body.community-app .settings-privacy>.dd-ux-help-field--check:has(>.profile-settings-sensitive){margin-block-start:18px}
body.community-app .settings-privacy>.dd-ux-help-field--check>label.profile-settings-sensitive{margin-block-start:0}
