/* Controles compartilhados do painel: menus de seleção e interruptores. Carregado por último. */
/* Tokens em core/tokens.css. */

/* Gatilho */
.rp-control .rp-trigger{min-height:44px;padding:8px 14px;gap:10px;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-black);box-shadow:none;color:var(--hc-text);font-size:13px;transition:border-color .12s}
.rp-control .rp-trigger:hover:not(:disabled){border-color:var(--hc-line-strong);background:var(--hc-black);box-shadow:none}
.rp-control .rp-trigger.rp-open,.rp-control .rp-trigger[aria-expanded="true"]{border-color:var(--hc-violet);background:var(--hc-black);box-shadow:none}
.rp-control .rp-trigger:focus-visible{outline:2px solid var(--hc-violet);outline-offset:2px}
.rp-control .rp-selected-text strong{font-size:13px;font-weight:400;line-height:1.4}
.rp-control .rp-placeholder,.rp-control .rp-placeholder strong{color:var(--hc-muted)}
.rp-chevron{display:grid;place-items:center;color:var(--hc-muted);transition:transform .16s ease}
.rp-chevron svg{display:block;width:16px;height:16px}
.rp-control .rp-trigger[aria-expanded="true"] .rp-chevron{color:#c9a5ff;transform:rotate(180deg)}

/* Seleção múltipla */
.rp-control.rp-multiple{min-height:44px;padding:6px 10px;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-black);box-shadow:none}
.rp-control.rp-multiple:hover{border-color:var(--hc-line-strong)}
.rp-control.rp-multiple:focus-within,.rp-control.rp-multiple.rp-expanded{border-color:var(--hc-violet);box-shadow:none}
.rp-control.rp-multiple .rp-trigger,.rp-control.rp-multiple .rp-trigger:hover:not(:disabled),.rp-control.rp-multiple .rp-trigger[aria-expanded="true"]{min-height:28px;padding:2px;border:0;background:transparent}
.rp-control .rp-chip{border:1px solid #8b45ff55;border-radius:7px;background:#8b45ff1f;padding:4px 7px;font-size:12px;color:#e3d3ff}
.rp-control .rp-chip:hover{background:#8b45ff38}

/* Painel suspenso */
.rp-popup.rp-compact{padding:0;gap:0;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-panel);box-shadow:0 18px 44px #000c;backdrop-filter:none;-webkit-backdrop-filter:none;animation:hc-open .12s ease-out}
@keyframes hc-open{from{opacity:0;transform:translateY(-4px)}}
.rp-compact .rp-search-wrap{margin:0;padding:8px;border-bottom:1px solid var(--hc-line)}
.rp-compact .rp-search-wrap input{height:40px;min-height:40px;padding:0 12px;border:1px solid var(--hc-line-strong);border-radius:9px;background:var(--hc-black);box-shadow:none;color:var(--hc-text);font-size:13px}
.rp-compact .rp-search-wrap input::placeholder{color:var(--hc-muted)}
.rp-compact .rp-search-wrap input:focus{border-color:var(--hc-violet);box-shadow:none;outline:none}
.rp-compact .rp-search-wrap input::-webkit-search-cancel-button{appearance:none}
.rp-compact .rp-options{padding:4px}
.rp-compact .rp-option{min-height:40px;padding:6px 10px;gap:8px;border:0;border-radius:8px;color:#d9d2e4;font-size:13px;transition:background .1s}
.rp-compact .rp-option-text strong{font-size:13px;font-weight:400;line-height:1.4}
.rp-compact .rp-option:hover,.rp-compact .rp-option.rp-focused{padding-left:10px;background:#8b45ff1f;color:#fff}
.rp-compact .rp-option.rp-chosen,.rp-compact .rp-option.rp-chosen.rp-focused{background:#8b45ff33;color:#fff}
.rp-compact .rp-option .rp-check{width:auto;height:auto;background:none;color:#c9a5ff;font-size:13px;animation:none}
.rp-control .rp-selected>.rp-symbol,.rp-compact .rp-option>.rp-symbol{color:var(--hc-muted)}
.rp-control .rp-selected>.rp-role-symbol,.rp-compact .rp-option>.rp-role-symbol{color:var(--resource-color)}
.rp-compact .rp-group{padding:10px 10px 4px;color:var(--hc-muted);font-size:12px;font-weight:500;letter-spacing:0;text-transform:none}
.rp-compact .rp-tools{margin:0;padding:6px 8px;border-bottom:1px solid var(--hc-line)}
.rp-compact .rp-tools button{font-size:12px;border-radius:7px}
.rp-compact .rp-tools button[aria-pressed=true]{background:#8b45ff2b;color:#e3d3ff}
.rp-compact .rp-option .rp-checkbox{width:16px;height:16px;flex-basis:16px;border-color:var(--hc-line-strong)}
.rp-compact .rp-option.rp-chosen .rp-checkbox{border-color:var(--hc-violet);background:var(--hc-violet);color:#fff}
.rp-compact .rp-selection-status{padding:6px 12px 0}
.rp-compact .rp-footer{margin:0;padding:8px 12px;border-top:1px solid var(--hc-line);color:var(--hc-muted);font-size:12px}
.rp-compact .rp-footer button{border:0;border-radius:8px;background:var(--hc-violet);color:#fff;font-size:12px;padding:6px 12px}
.rp-popup.rp-single .rp-footer{display:none}
.rp-compact .rp-empty{padding:26px 12px}

/* A barra de rolagem é o único destaque do painel. */
.rp-popup .rp-options{scrollbar-width:thin;scrollbar-color:var(--hc-violet) transparent}
@supports selector(::-webkit-scrollbar){
 .rp-popup .rp-options{scrollbar-width:auto;scrollbar-color:auto}
 .rp-options::-webkit-scrollbar{width:10px}
 .rp-options::-webkit-scrollbar-track{background:transparent}
 .rp-options::-webkit-scrollbar-thumb{min-height:32px;border:2px solid transparent;border-radius:10px;background:var(--hc-violet);background-clip:padding-box}
 .rp-options::-webkit-scrollbar-thumb:hover{background:#a06bff;background-clip:padding-box}
}

/* Menu de seleção múltipla em lista */
.hm-multi summary{min-height:44px;align-items:center;padding:8px 14px;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-black);color:var(--hc-text);font-size:13px}
.hm-multi summary:hover{border-color:var(--hc-line-strong)}
.hm-multi[open] summary{border-color:var(--hc-violet)}
.hm-multi .hm-multi-popup{padding:8px;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-panel);box-shadow:0 18px 44px #000c}
.hm-multi-popup label{border-radius:8px;font-size:13px;color:#d9d2e4}
.hm-multi-popup label:hover{background:#8b45ff1f}
.hm-multi-popup>div{scrollbar-width:thin;scrollbar-color:var(--hc-violet) transparent}

/* Interruptores: uma única pílula para todos os formatos do painel. */
.cm-toggle>input[type=checkbox],.checkbox-label>input[type=checkbox],.gateway-switches input[type=checkbox],.ms-inline-option>input[type=checkbox],.hm-toggle input+i,.hm-modal .hm-toggle input+i,.switch input+span,.access-switch,.toggle{appearance:none;display:block;position:relative;flex:0 0 44px;width:44px;height:24px;min-height:24px;margin:0;padding:0;border:0;border-radius:24px;background:var(--hc-off);box-shadow:none;cursor:pointer;transition:background .16s ease}
.cm-toggle>input[type=checkbox]:before,.checkbox-label>input[type=checkbox]:before,.gateway-switches input[type=checkbox]:before,.ms-inline-option>input[type=checkbox]:before,.hm-toggle input+i:after,.switch input+span:after,.access-switch:after,.toggle:before{content:"";position:absolute;left:3px;top:3px;width:18px;height:18px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #0006;transition:transform .16s ease}
.cm-toggle>input[type=checkbox]:checked,.checkbox-label>input[type=checkbox]:checked,.gateway-switches input[type=checkbox]:checked,.ms-inline-option>input[type=checkbox]:checked,.hm-toggle input:checked+i,.switch input:checked+span,.access-cat input:checked+.access-switch,.toggle.on{background:var(--hc-violet)}
.cm-toggle>input[type=checkbox]:checked:before,.checkbox-label>input[type=checkbox]:checked:before,.gateway-switches input[type=checkbox]:checked:before,.ms-inline-option>input[type=checkbox]:checked:before,.hm-toggle input:checked+i:after,.switch input:checked+span:after,.access-cat input:checked+.access-switch:after{background:#fff;transform:translateX(20px)}
.toggle:before{left:3px}.toggle.on:before{left:3px;transform:translateX(20px)}
.cm-toggle>input[type=checkbox]:disabled,.checkbox-label>input[type=checkbox]:disabled,.gateway-switches input[type=checkbox]:disabled,.ms-inline-option>input[type=checkbox]:disabled,.hm-toggle input:disabled+i,.switch input:disabled+span{opacity:.5;cursor:not-allowed}
.cm-toggle>input[type=checkbox]:focus-visible,.checkbox-label>input[type=checkbox]:focus-visible,.gateway-switches input[type=checkbox]:focus-visible,.ms-inline-option>input[type=checkbox]:focus-visible,.switch input:focus-visible+span,.hm-toggle input:focus-visible+i{outline:2px solid #c9a5ff;outline-offset:2px}
.hm-toggle input{width:44px}
.checkbox-label:has(>input[type=checkbox]),.gateway-switches label,.ms-inline-option:has(>input[type=checkbox]){display:flex;align-items:center;gap:12px}

/* Botão Setar e sua janela */
.top-set{display:inline-flex;align-items:center;gap:8px;height:40px;padding:0 14px;border:1px solid var(--hc-line);border-radius:8px;background:var(--hc-panel);color:#e3d3ff;font:600 13px var(--font);cursor:pointer}
.top-set:hover{border-color:var(--hc-violet);color:#fff}
.top-set:focus-visible,.set-option:focus-visible{outline:2px solid #c9a5ff;outline-offset:2px}
.set-options{display:grid;gap:10px}
.set-option{display:grid;gap:4px;width:100%;padding:16px;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-panel);color:var(--hc-text);font:inherit;text-align:left;cursor:pointer}
.set-option:hover{border-color:var(--hc-violet);background:#1a1426}
.set-option strong{font-size:15px;font-weight:600}
.set-option small{font-size:13px;color:#a79db8;line-height:1.4}
.set-form{display:grid;gap:12px}
@media(max-width:700px){.top-set span{display:none}.top-set{padding:0 11px}}

/* Barra lateral: cada categoria é um cartão legível, com o estado ativo preenchido em roxo. */
.shell.discord-workspace .sidebar{background:var(--hc-black);border-right:1px solid var(--hc-line)}
.shell.discord-workspace .sb-brand{border-bottom:1px solid var(--hc-line)}
.shell.discord-workspace .dw-sidebar-top{background:var(--hc-black);border-bottom:1px solid var(--hc-line)}
.shell.discord-workspace .dw-bot-picker>summary{min-height:60px;border:1px solid var(--hc-line);background:var(--hc-panel)}
.shell.discord-workspace .dw-bot-picker>summary:hover{border-color:var(--hc-line-strong)}
.shell.discord-workspace .dw-bot-identity strong{font-size:15px;font-weight:600;color:#fff}
.shell.discord-workspace .dw-bot-identity small{font-size:12px;color:#a79db8}
.shell.discord-workspace .dw-config-search{height:44px;border:1px solid var(--hc-line);border-radius:12px;background:var(--hc-panel)}
.shell.discord-workspace .dw-config-search:focus-within{border-color:var(--hc-violet)}
.shell.discord-workspace .dw-config-search input{font-size:14px;color:var(--hc-text)}
.shell.discord-workspace .dw-config-search input::placeholder{color:#a79db8}

.shell.discord-workspace .dw-nav-scroll{padding:14px 12px 18px;scrollbar-width:thin;scrollbar-color:var(--hc-violet) transparent}
@supports selector(::-webkit-scrollbar){
 .shell.discord-workspace .dw-nav-scroll{scrollbar-width:auto;scrollbar-color:auto}
 .shell.discord-workspace .dw-nav-scroll::-webkit-scrollbar{width:8px}
 .shell.discord-workspace .dw-nav-scroll::-webkit-scrollbar-thumb{min-height:40px;border:1px solid transparent;border-radius:8px;background:var(--hc-violet);background-clip:padding-box}
 .shell.discord-workspace .dw-nav-scroll::-webkit-scrollbar-track{background:transparent}
}

.shell.discord-workspace .dw-category{margin:0 0 8px}
.shell.discord-workspace .dw-category>summary{min-height:58px;gap:12px;padding:10px 12px;border:1px solid #241a35;border-radius:14px;background:var(--hc-panel);color:#f3eefa;font-size:15px;font-weight:600;line-height:1.3;letter-spacing:.005em}
.shell.discord-workspace .dw-category>summary:hover{transform:none;border-color:var(--hc-line-strong);background:#1a1426;color:#fff}
.shell.discord-workspace .dw-category[open]>summary{border-color:#8b45ff8c;background:#8b45ff2e;color:#fff}
.shell.discord-workspace .dw-category>summary>span.dw-category-icon{width:38px;height:38px;flex:0 0 38px!important;border-radius:11px;background:#1f1830;box-shadow:none;color:#c9a5ff}
.shell.discord-workspace .dw-category>summary>span.dw-category-icon svg{width:20px;height:20px}
.shell.discord-workspace .dw-category>summary:hover>span.dw-category-icon{background:#2a2040;color:#e3d3ff}
.shell.discord-workspace .dw-category[open]>summary>span.dw-category-icon{background:var(--hc-violet);box-shadow:none;color:#fff}
.shell.discord-workspace .dw-category-arrow{flex:0 0 18px!important;color:#b6a9cb}
.shell.discord-workspace .dw-category-arrow svg{width:16px;height:16px}
.shell.discord-workspace .dw-category[open]>summary .dw-category-arrow{color:#fff}

.shell.discord-workspace .dw-category .hm-nav-children{gap:2px;margin:8px 0 12px 30px;padding:0 0 0 12px;border-left:1px solid var(--hc-line-strong)}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item{position:relative;min-height:42px;align-items:center;padding:8px 10px 8px 26px;border-radius:10px;background:none;color:#ded7ea;font-size:14px;font-weight:500;line-height:1.35}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item:before{content:"";display:block;position:absolute;left:10px;top:calc(50% - 3px);bottom:auto;width:6px;height:6px;border-radius:50%;background:#7a6a96;box-shadow:none}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item:hover{padding-left:26px;background:#8b45ff1f;color:#fff}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item:hover:before{background:#c9a5ff}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item.active{background:#8b45ff33;box-shadow:none;color:#fff;font-weight:600}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item.active:before{display:block;background:#c9a5ff}
.shell.discord-workspace .dw-category .hm-nav-children .sb-item:focus-visible{outline:2px solid #c9a5ff;outline-offset:-2px}

.shell.discord-workspace .dw-workspace-links .sb-item{min-height:44px;font-size:14px;font-weight:500;color:#cfc7dc}
.shell.discord-workspace .dw-workspace-links .sb-item:hover{color:#fff}

@media(max-width:700px){
 .rp-compact .rp-search-wrap input{font-size:16px}
 .rp-compact .rp-option{min-height:44px}
}
.motion-off{
 .rp-popup.rp-compact{animation:none}
 .rp-chevron,.rp-control .rp-trigger,.rp-compact .rp-option{transition:none}
 .cm-toggle>input[type=checkbox],.cm-toggle>input[type=checkbox]:before,.checkbox-label>input[type=checkbox],.checkbox-label>input[type=checkbox]:before,.gateway-switches input[type=checkbox],.gateway-switches input[type=checkbox]:before,.ms-inline-option>input[type=checkbox],.ms-inline-option>input[type=checkbox]:before,.hm-toggle input+i,.hm-toggle input+i:after,.switch input+span,.switch input+span:after,.access-switch,.access-switch:after,.toggle,.toggle:before{transition:none}
}
