/* Shieldy Extra Utilities collapse controls r34
   UI-only disclosure layer. The authoritative feature switches, settings,
   save pipelines and hidden attributes remain owned by the existing code. */

body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-head-actions-r34{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:10px!important;
  flex:0 0 auto!important;
  margin-left:auto!important;
}

/* Always use Shieldy's green visual language. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34{
  appearance:none!important;
  -webkit-appearance:none!important;
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  flex:0 0 36px!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  min-height:36px!important;
  margin:0!important;
  padding:0!important;
  border:1px solid rgba(45,164,78,.48)!important;
  border-radius:10px!important;
  background:rgba(45,164,78,.08)!important;
  color:#1f883d!important;
  box-shadow:0 1px 2px rgba(15,23,42,.05)!important;
  cursor:pointer!important;
  opacity:1!important;
  transition:background .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,transform .16s ease!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34:hover,
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34:focus-visible,
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34[aria-expanded="true"]{
  border-color:#2da44e!important;
  background:rgba(45,164,78,.15)!important;
  color:#157347!important;
  outline:none!important;
  box-shadow:0 0 0 3px rgba(45,164,78,.12)!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34:active{
  transform:translateY(1px)!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34 svg{
  display:block!important;
  width:18px!important;
  height:18px!important;
  fill:none!important;
  stroke:currentColor!important;
  stroke-width:2.25!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
  transform:rotate(0deg)!important;
  transition:transform .18s ease!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34[aria-expanded="true"] svg{
  transform:rotate(180deg)!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34:disabled{
  border-color:rgba(45,164,78,.25)!important;
  background:rgba(45,164,78,.04)!important;
  color:rgba(31,136,61,.52)!important;
  opacity:1!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
}

/* Chevron is immediately LEFT of the real ON/OFF switch. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-head-actions-r34 > .normalized-switch{
  flex:0 0 auto!important;
  margin:0!important;
}

/* Manual UI collapse. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="1"] .jj-tool-collapse-target-r34{
  display:none!important;
}

/* Generic OFF-module inspection. This selector intentionally beats the old
   #panel-bot-control ... [hidden] {display:none!important} rule. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] .jj-tool-collapse-target-r34[hidden]{
  display:block!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] .feature-settings-body.jj-tool-collapse-target-r34[hidden]{
  display:grid!important;
}

/* Specific body display types. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-reviews-card.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] #shieldy-reviews-body.jj-tool-collapse-target-r34[hidden],
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-forum-card.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] #shieldy-forum-body.jj-tool-collapse-target-r34[hidden]{
  display:grid!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-reminder-foundation.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] #sh-reminder-body.jj-tool-collapse-target-r34[hidden],
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-info-channels.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] .shieldy-info-body.jj-tool-collapse-target-r34[hidden]{
  display:block!important;
}

/* Complaints have TWO legacy hiding layers:
   1) .jj-report-off-clean hides [data-report-body]
   2) report JS hides .shieldy-report-layout itself when report_enabled=false.
   Manual disclosure must override both layers without touching those states. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] [data-report-body].jj-tool-collapse-target-r34{
  display:block!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"] .shieldy-report-layout[hidden]{
  display:grid!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-tool-collapsible-r34[data-jj-ui-collapsed-r34="0"].jj-report-off-clean:not(.jj-report-save-failed) [data-report-body]{
  display:block!important;
}

/* When complaints are collapsed after an unsaved ON/OFF change, keep only
   their dedicated action row available. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-report-dirty-r34[data-jj-ui-collapsed-r34="1"] [data-report-body]{
  display:block!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-report-dirty-r34[data-jj-ui-collapsed-r34="1"] .shieldy-report-layout{
  display:none!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-report-dirty-r34 .shieldy-report-actions{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:10px!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"]
#shieldy-report-settings.jj-report-dirty-r34[data-jj-ui-collapsed-r34="1"] .shieldy-report-actions{
  margin-top:0!important;
  padding-top:14px!important;
  border-top:1px solid var(--account-border,#d8dee4)!important;
}

/* Stable header alignment, including Reviews and Forum. */
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapsible-r34
:is(.card-title,.shieldy-info-head,.shieldy-poll-heading,.shieldy-community-head){
  display:flex!important;
  align-items:flex-start!important;
  gap:12px!important;
}
body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapsible-r34
:is(.card-title,.shieldy-info-head,.shieldy-poll-heading,.shieldy-community-head) > :first-child{
  min-width:0!important;
  flex:1 1 auto!important;
}

/* Dark mode keeps the same green identity. */
html[data-theme="dark"] body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34{
  border-color:rgba(63,185,80,.42)!important;
  background:rgba(46,160,67,.11)!important;
  color:#56d364!important;
}
html[data-theme="dark"] body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34:hover,
html[data-theme="dark"] body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34:focus-visible,
html[data-theme="dark"] body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34[aria-expanded="true"]{
  border-color:#3fb950!important;
  background:rgba(46,160,67,.18)!important;
  color:#7ee787!important;
}

@media(max-width:720px){
  body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-head-actions-r34{gap:8px!important}
  body[data-account-page="bots"] #panel-bot-control [data-module-panel="sh-other"] .jj-tool-collapse-toggle-r34{
    flex-basis:34px!important;width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
  }
}
