/* Compact role mapping, using shared workspace surfaces and controls. */
.rr-layout { display:grid; grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr); gap:24px; align-items:start; }
.rr-editor-column { display:grid; gap:24px; min-width:0; }
.rr-choices { padding-top:22px; border-top:1px solid var(--line); min-width:0; }
.reaction-roles-page .rr-editor,.reaction-roles-page .rr-preview { padding:22px; min-width:0; margin:0; border:1px solid var(--line); }
.reaction-roles-page .rr-editor { overflow:visible; }
.reaction-roles-page :is(.rr-editor,.rr-preview) h2 { font-size:17px; margin:0; }
.rr-editor label:not(.welcome-toggle) { display:block; font-size:13px; font-weight:650; margin:0 0 8px; }
.rr-message > label { margin-top:18px !important; }
.rr-editor :is(input,textarea) { width:100%; max-width:100%; box-sizing:border-box; }
.reaction-roles-page .rr-editor textarea { resize:vertical; min-height:96px; line-height:1.55; }
.rr-options-heading,.rr-preview-heading { display:flex; gap:12px; align-items:center; justify-content:space-between; }
.rr-note { font-size:12px; color:var(--muted); margin:0; }
.rr-choice-settings { display:grid; grid-template-columns:1fr 1fr; gap:16px; padding:20px 0; }
.rr-settings { border:0; padding:0; margin:0; min-width:0; }
.rr-settings legend { font-size:12px; color:var(--muted); font-weight:600; margin-bottom:8px; }
.rr-settings > div { display:inline-flex; gap:3px; padding:3px; border:1px solid var(--line); background:var(--surface-2); border-radius:var(--editor-radius); max-width:100%; }
.reaction-roles-page .rr-settings .button { min-height:36px; padding:7px 10px; font-size:12px; border:1px solid transparent; border-radius:5px; background:transparent; box-shadow:none; color:var(--muted); }
.reaction-roles-page .rr-settings [aria-pressed=true] { border-color:var(--line); background:var(--surface); color:var(--ink); box-shadow:0 1px 3px #0002; }
.rr-column-labels,.rr-option { display:grid; grid-template-columns:minmax(0,1.15fr) 14px minmax(0,1fr) 34px 34px; gap:8px; align-items:center; }
.rr-column-labels { font-size:12px; font-weight:600; color:var(--muted); padding-bottom:8px; }
.rr-option { padding:9px 0; min-width:0; border-bottom:1px solid var(--line); }
.rr-option > * { min-width:0; }
.reaction-roles-page .rr-option input { min-height:44px; }
.reaction-roles-page .rr-remove { min-width:34px; width:34px; min-height:40px; padding:7px; color:var(--muted); background:transparent; border:0; }
.rr-remove svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.6; }
.reaction-roles-page .rr-remove:hover { color:var(--danger); }
.reaction-roles-page .rr-add { display:flex; gap:8px; justify-content:center; width:100%; min-height:44px; margin-top:12px; border-style:dashed; box-shadow:none; }
.rr-add > span { font-size:20px; line-height:1; }
.rr-empty { margin:0; padding:16px 0; color:var(--muted); }
.rr-picker { position:relative; min-width:0; }
.reaction-roles-page .rr-picker-toggle { display:flex; align-items:center; gap:8px; width:100%; min-height:44px; padding:10px 12px; text-align:left; font-size:14px; font-weight:500; }
.rr-resource-symbol { color:var(--muted); flex:0 0 auto; font-weight:600; }
.rr-selected { display:block; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; flex:1; }
.rr-picker-toggle svg { width:16px; height:16px; flex:0 0 auto; fill:none; stroke:var(--muted); stroke-width:1.6; }
.reaction-roles-page .rr-picker-toggle[aria-invalid=true] { border:2px solid var(--danger); }
.rr-picker-popup { position:absolute; z-index:80; left:0; top:calc(100% + 6px); width:max(100%,240px); max-width:calc(100vw - 60px); padding:10px; background:var(--surface); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow); box-sizing:border-box; }
.rr-option .rr-picker-popup { left:auto; right:0; }
.rr-picker-above .rr-picker-popup { top:auto; bottom:calc(100% + 6px); }
.reaction-roles-page .rr-picker .rr-picker-results { max-height:200px; overflow:auto; margin:8px 0 0; padding:0; border:0; }
.rr-picker .rr-resource-choice { display:block; width:100%; min-height:44px; padding:10px; text-align:left; color:var(--ink); background:transparent; border:0; border-radius:6px; font:inherit; font-size:14px; cursor:pointer; }
.rr-picker .rr-resource-choice[aria-pressed=true] { color:var(--accent-text); background:var(--accent-soft); }
.rr-picker .rr-resource-choice:hover:not(:disabled) { background:var(--surface-2); }
.rr-picker .rr-resource-choice:focus-visible { outline:2px solid var(--accent); outline-offset:-2px; }
.rr-picker .rr-resource-choice:disabled { cursor:not-allowed; color:var(--muted); }
.rr-picker .rr-resource-choice small { display:block; }
.rr-preview { position:sticky; top:calc(var(--module-action-rail-offset,80px) + 14px); }
.rr-preview-heading { margin-bottom:18px; }
.rr-preview-channel { padding:12px 16px; border:1px solid var(--line); border-bottom:0; border-radius:8px 8px 0 0; font-size:13px; color:#b5bac1; background:#25262b; }
.rr-discord-post { display:flex; gap:10px; padding:18px 14px; color:#f2f3f5; background:#313338; border-radius:0 0 8px 8px; }
.rr-avatar { display:grid; place-items:center; width:32px; height:32px; flex:0 0 32px; border-radius:50%; background:#194452; color:#7ee5f7; font-size:19px; font-weight:750; }
.rr-discord-body { min-width:0; flex:1; }
.rr-discord-body > strong { display:flex; align-items:center; gap:5px; font-size:13px; }
.rr-preview-content { white-space:pre-wrap; overflow-wrap:anywhere; color:#f2f3f5; font-size:14px; line-height:1.55; margin:7px 0 14px; }
.rr-preview-buttons { display:grid; gap:8px; }
.rr-button-row { display:flex; flex-wrap:wrap; gap:6px; }
.rr-preview-buttons .button { white-space:normal; overflow-wrap:anywhere; min-width:0; max-width:100%; }
.rr-discord-post .rr-preview-buttons .button { min-height:36px; padding:8px 10px; background:#4e5058; color:#fff; border:0; box-shadow:none; font-size:12px; }
.rr-preview-effect { font-size:13px; line-height:1.6; color:var(--muted); overflow-wrap:anywhere; margin:14px 0 0; }
.rr-preview-caption { font-size:12px; color:var(--muted); margin:14px 0 0; }
.rr-preview-empty { font-size:13px; color:#b5bac1; margin:0; }
.rr-preview-empty-message { padding:18px 14px; border:1px dashed #767881; border-radius:var(--editor-radius); color:#b5bac1; margin:12px 0; font-size:13px; line-height:1.6; }
.rr-preview-empty-message strong { display:block; color:#f2f3f5; font-size:14px; }
.rr-preview-empty-message p { margin:4px 0 0; }
.rr-bot-label { font-size:9px; border-radius:3px; padding:2px 4px; background:#5865f2; color:#fff; }
.rr-preview-buttons [aria-pressed=true] { outline:2px solid #55cce8; outline-offset:1px; }
.rr-select-menu { border:1px solid #767881; border-radius:5px; padding:10px; color:#f2f3f5; font-size:13px; }
.rr-select-menu summary { cursor:pointer; }
#dashboard-view .rr-select-menu > summary { color:#f2f3f5; background:#1e1f22; border:1px solid #4e5058; box-shadow:none; padding:10px; min-height:40px; font-size:13px; }
.rr-select-menu fieldset { border:0; margin-top:12px; padding:0; min-width:0; }
.rr-select-menu legend { font-size:12px; }
.rr-select-menu label { display:flex; gap:10px; padding:8px 0; overflow-wrap:anywhere; }
.rr-select-menu input { flex:0 0 auto; width:auto; }
.reaction-roles-page .rr-field-error:empty,.reaction-roles-page #rr-feedback:empty,.reaction-roles-page .rr-preview-effect:empty { display:none; }
.rr-field-error { font-size:13px; margin:6px 0; }
.reaction-roles-page .rr-sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap; border:0; }
@media(min-width:761px) and (max-width:1100px) { .rr-layout { grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr); gap:16px; }.reaction-roles-page .rr-editor,.reaction-roles-page .rr-preview { padding:16px; } }
@media(max-width:760px) {
 .rr-layout { grid-template-columns:minmax(0,1fr); }
 .reaction-roles-page .rr-editor,.reaction-roles-page .rr-preview { padding:16px; }
 .rr-layout,.rr-editor-column { gap:14px; }
 .rr-choice-settings { grid-template-columns:minmax(0,1fr); gap:14px; padding:18px 0; }
 .rr-column-labels { display:none; }
 .rr-option { grid-template-columns:28px minmax(0,1fr) 36px 36px; gap:6px; padding:12px 0; }
 .rr-option .rr-picker-popup { left:auto; right:0; }
}
.rr-message-heading { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:16px; }
.rr-message-heading .rr-picker > label { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.rr-message-heading .rr-picker { max-width:55%; }
.rr-message-heading .rr-picker-toggle { min-height:34px; padding:5px 10px; font-size:12px; border-color:transparent; box-shadow:none; }
.rr-message-heading .rr-picker-popup { left:auto;right:0; }
.rr-choice-label { display:flex; align-items:center; min-width:0; border-radius:6px; background:var(--role-button-bg,#4e5058); color:white; padding:0 5px; }
.reaction-roles-page .rr-choice-label input { min-width:0; min-height:42px; padding:7px 3px; border:0; box-shadow:none; background:transparent; color:inherit; font-size:13px; }
.reaction-roles-page .rr-choice-label .rr-emoji-input { width:30px; flex:0 0 30px; text-align:center; }
.rr-choice-label [data-rr-label] { flex:1; width:0; }
.rr-choice-label input::placeholder { color:#e0e1e5; }
#dashboard-view .reaction-roles-page .rr-choice-label input { background:transparent; color:#fff; border:0; border-radius:0; box-shadow:none; outline-offset:0; min-height:42px; padding:7px 3px; }
#dashboard-view .reaction-roles-page .rr-choice-label input:focus-visible { outline:2px solid var(--accent); }
.rr-role-arrow { color:var(--muted); }
.rr-style-picker { position:relative; }
.rr-style-toggle { width:32px; height:40px; border:0; background:transparent; color:var(--muted); cursor:pointer; }
.rr-style-tray { position:absolute; right:0; top:100%; z-index:80; display:flex; gap:6px; padding:10px; border:1px solid var(--line); border-radius:8px; background:var(--surface); box-shadow:var(--shadow); }
.rr-style-tray button { width:32px; height:32px; border:2px solid transparent; border-radius:5px; color:white; cursor:pointer; background:var(--role-button-bg); }
.rr-style-tray [aria-pressed=true] { border-color:var(--accent); }
.rr-button-primary { --role-button-bg:#5865f2; }
.rr-button-success { --role-button-bg:#248046; }
.rr-button-secondary { --role-button-bg:#4e5058; }
.rr-button-danger { --role-button-bg:#da373c; }
.rr-discord-post .rr-preview-buttons .button { background:var(--role-button-bg,#4e5058); }
.rr-discord-body .welcome-message { background:none; border:0; padding:0; margin:0 0 10px; width:100%; }
.rr-discord-body .welcome-message > strong { color:#f2f3f5; font-size:13px; }
.rr-discord-body .welcome-message > small { color:#b5bac1; font-size:10px; display:inline; margin-left:7px; }
.rr-discord-body .welcome-message > p { color:#f2f3f5; font-size:14px; white-space:pre-wrap; }
.rr-discord-body .welcome-embed { position:relative; margin-top:9px; background:#2b2d31; padding:14px 13px; border-radius:4px; color:#e0e1e5; }
.rr-discord-body .welcome-embed h3 { font-size:15px; color:#fff; margin:0 0 8px; }
.rr-discord-body .welcome-embed h3:empty { display:none; }
.rr-discord-body .welcome-embed p { color:#e0e1e5; font-size:13px; line-height:1.6; white-space:pre-wrap; margin:0; }
.rr-discord-body .welcome-embed .message-text { color:inherit; }
.rr-discord-body .welcome-embed a { color:#4eb3ff; }
.rr-discord-body .welcome-thumbnail { width:55px; height:55px; object-fit:contain; float:right; margin:0 0 10px 12px; border-radius:6px; }
.rr-discord-body .welcome-main-image { display:block; width:100%; max-height:240px; object-fit:contain; margin-top:14px; border-radius:5px; }
.rr-mobile-tabs { display:none; }
:root[data-theme=light] .rr-preview-channel { background:#e8e9ed; color:#5c5e66; }
:root[data-theme=light] .rr-discord-post { background:#f2f3f5; color:#313338; }
:root[data-theme=light] :is(.rr-preview-empty,.rr-preview-empty-message) { color:#5c5e66; }
:root[data-theme=light] .rr-preview-empty-message strong { color:#313338; }
:root[data-theme=light] .rr-discord-body .welcome-message > strong { color:#313338; }
:root[data-theme=light] .rr-discord-body .welcome-message > small { color:#686a72; }
:root[data-theme=light] .rr-discord-body .welcome-message > p { color:#313338; }
:root[data-theme=light] .rr-discord-body .welcome-embed { background:#fff; color:#313338; }
:root[data-theme=light] .rr-discord-body .welcome-embed h3 { color:#17191c; }
:root[data-theme=light] .rr-discord-body .welcome-embed p { color:#404249; }
:root[data-theme=light] .rr-discord-body .welcome-embed a { color:#0067ad; }
@media(max-width:760px) {
 .rr-mobile-tabs { display:flex; gap:6px; margin:0 0 15px; position:sticky; top:0; z-index:20; background:var(--bg); padding:6px 0; }
 .rr-mobile-tabs button { flex:1; min-height:40px; color:var(--muted); background:transparent; border:1px solid transparent; border-radius:6px; font:inherit; }
 .rr-mobile-tabs [aria-pressed=true] { background:var(--surface); color:var(--ink); border-color:var(--line); }
 [data-rr-workspace-view=edit] > .rr-preview,[data-rr-workspace-view=preview] > .rr-editor-column { display:none; }
 .rr-message-heading { gap:8px; }
 .rr-message-heading .rr-picker { max-width:58%; }
 .rr-choice-settings { grid-template-columns:1fr; gap:14px; }
 .reaction-roles-page .rr-settings .button { padding:7px 12px; font-size:13px; min-height:40px; }
 .rr-settings legend { font-size:12px; }
 .reaction-roles-page .rr-choice-label .rr-emoji-input { width:25px;flex-basis:25px; }
 .reaction-roles-page .rr-option input { font-size:16px; }
 .rr-choice-label { grid-column:1/3; }
 .rr-option .rr-role-arrow { grid-column:1; grid-row:2; justify-self:end; }
 .rr-option .rr-picker { grid-column:2/5; grid-row:2; }
 .reaction-roles-page .rr-option .rr-picker-toggle { padding:8px 10px; gap:6px; font-size:14px; }
 .rr-option .rr-style-picker { grid-column:3; grid-row:1; }
 .rr-style-toggle { width:36px; }
 .reaction-roles-page .rr-remove { grid-column:4; grid-row:1; width:36px;min-width:36px;padding:7px; }
 .rr-option:has(.rr-style-picker[hidden]) { grid-template-columns:28px minmax(0,1fr) 36px 36px; }
 .rr-preview { position:static; }
}
