/* Shared disclosure geometry: identical to the canonical Interface menu. */
:root {
  --portal-chevron-color: #526f8f;
  --portal-chevron-size: 18px;
  --portal-chevron-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23526f8f' stroke-width='1.9'><path d='m5 7 5 5 5-5'/></svg>");
}
html[data-theme="dark"] {
  --portal-chevron-color: #a8bdd0;
  --portal-chevron-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23a8bdd0' stroke-width='1.9'><path d='m5 7 5 5 5-5'/></svg>");
}
html body .portal-chevron {
  display:inline-block; width:var(--portal-chevron-size); height:var(--portal-chevron-size);
  flex:0 0 var(--portal-chevron-size); vertical-align:middle;
  background:var(--portal-chevron-color); mask:var(--portal-chevron-image) center / contain no-repeat;
}
.portal-chevron-right { transform:rotate(-90deg); }
.portal-chevron-left { transform:rotate(90deg); }
[aria-expanded="true"] > .portal-chevron { transform:rotate(180deg); }
.group-toggle[aria-expanded="true"] > .portal-chevron-right,
.spp-reports-toggle[aria-expanded="true"] > .portal-chevron-right { transform:none; }
/* Single-value selects keep native semantics; listboxes and multi-selects keep their presentation. */
html body select:not([multiple]):not([size]), html body select:not([multiple])[size="1"] {
  appearance:none; background-image:var(--portal-chevron-image) !important;
  background-position:right 10px center !important; background-size:18px 18px !important;
  background-repeat:no-repeat !important; padding-inline-end:36px !important;
}
/* Native details share a single marker; the compact info disclosure already has its own info icon. */
html body details:not(.compact-source-status):not(.period-picker) > summary {
  position:relative; list-style:none; padding-inline-start:30px;
}
html body details:not(.compact-source-status) > summary::-webkit-details-marker { display:none; }
html body details:not(.compact-source-status) > summary::marker { content:''; }
html body details:not(.compact-source-status):not(.period-picker) > summary::before,
html body .period-picker > summary::after {
  content:''; position:absolute; width:18px; height:18px; left:6px; top:50%;
  background:var(--portal-chevron-color); mask:var(--portal-chevron-image) center / contain no-repeat;
  transform:translateY(-50%) rotate(-90deg); pointer-events:none;
}
html body details[open]:not(.compact-source-status):not(.period-picker) > summary::before { transform:translateY(-50%); }
html body .period-picker > summary::after { left:auto; right:12px; transform:translateY(-50%); }
html body .period-picker[open] > summary::after { transform:translateY(-50%) rotate(180deg); }
@media(forced-colors:active) {
  .portal-chevron, html body details:not(.compact-source-status) > summary::before,
  html body .period-picker > summary::after { background:ButtonText; }
  html body select:not([multiple]):not([size]), html body select:not([multiple])[size="1"] { appearance:auto; background-image:none !important; }
}
