/* Compact compass actions only; shared IQ and political styles stay unchanged. */
#political-compass-chart.pc-approved .pc-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}
#political-compass-chart.pc-approved .pc-actions .pc-action {
  box-sizing: border-box;
  flex: 0 0 44px;
  width: 44px;
  min-width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 10px;
  gap: 0;
  border: 1px solid #c5d2e0;
  border-radius: 7px;
  background: #fff;
  color: #2e6497;
  box-shadow: none;
  touch-action: manipulation;
  transition: background-color 120ms ease, border-color 120ms ease;
}
#political-compass-chart.pc-approved .pc-actions .pc-reset {
  border-color: #c83643;
  background: #d6424f;
  color: #fff;
}
#political-compass-chart.pc-approved .pc-actions .pc-action:hover:not(:disabled),
#political-compass-chart.pc-approved .pc-actions .pc-action:active:not(:disabled) {
  border-color: #91b4d5;
  background: #e7f0fb;
}
#political-compass-chart.pc-approved .pc-actions .pc-reset:hover:not(:disabled),
#political-compass-chart.pc-approved .pc-actions .pc-reset:active:not(:disabled) {
  border-color: #a62431;
  background: #b62d3b;
}
#political-compass-chart.pc-approved .pc-actions .pc-action:focus-visible {
  outline: 2px solid #155fa5;
  outline-offset: 3px;
}
#political-compass-chart.pc-approved .pc-actions .pc-action:disabled {
  opacity: .5;
  cursor: default;
}
#political-compass-chart.pc-approved .pc-actions .pc-action svg {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  pointer-events: none;
}

/* Keep the period selector and all three actions on one mobile row. */
@media (max-width: 680px) {
  #political-compass-chart.pc-approved .pc-toolbar {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    width: 100%;
    gap: 8px;
    margin-bottom: 18px;
  }
  #political-compass-chart.pc-approved .pc-period {flex: 1 1 0; min-width: 0;}
  #political-compass-chart.pc-approved .pc-period button {
    min-width: 0;
    min-height: 44px;
    padding: 6px;
    font: 700 12px/1.2 Arial,sans-serif;
    white-space: normal;
  }
  #political-compass-chart.pc-approved .pc-period button + button {flex: 0 0 auto; min-width: 42px;}
  #political-compass-chart.pc-approved .pc-actions {flex: 0 0 auto; gap: 6px;}
}

#pc-share-dialog {
  width: min(500px,calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px);
  box-sizing: border-box; padding: 24px; border: 1px solid #d4dce7; border-radius: 18px;
  color: #192b42; background: #fff; box-shadow: 0 20px 70px #172d4b40;
  font: 14px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif; overflow: auto;
}
#pc-share-dialog::backdrop {background: #16274180;}
#pc-share-dialog [hidden] {display:none!important;}
#pc-share-dialog h3 {margin:0 40px 8px 0;font:750 25px/1.2 system-ui,sans-serif;color:inherit;}
#pc-share-dialog .pc-share-description {margin:0 0 16px;color:#63738a;}
#pc-share-dialog .pc-share-close {position:absolute;right:12px;top:12px;width:36px;height:36px;padding:0;border-radius:50%;font:26px/1 system-ui;color:#b52036;background:#fff5f6;border:1px solid #e5c5cb;}
#pc-share-dialog button {cursor:pointer;font-family:inherit;}
#pc-share-dialog .pc-share-preview {display:block;max-width:100%;height:250px;width:100%;object-fit:contain;background:#f7f9fb;border:1px solid #e1e7ef;border-radius:8px;}
#pc-share-dialog .pc-share-status {margin:12px 0;color:#536a85;font-size:13px;}
#pc-share-dialog .pc-share-actions {display:flex;gap:8px;flex-wrap:wrap;}
#pc-share-dialog .pc-share-actions button,#pc-share-dialog .pc-share-retry {min-height:42px;padding:9px 14px;border:1px solid #c6d0dd;border-radius:8px;background:#fff;color:#253a55;font-size:13px;font-weight:650;}
#pc-share-dialog .pc-share-actions .pc-share-primary {background:#ffd33e;border-color:#ecb82b;color:#192b42;}
#pc-share-dialog .pc-share-actions button:disabled {opacity:.5;cursor:default;}
#pc-share-dialog .pc-share-retry {margin:0 0 12px;}
#pc-share-dialog .pc-share-link {box-sizing:border-box;width:100%;padding:10px;margin-top:12px;border:1px solid #b9c8da;border-radius:8px;}
#pc-share-dialog :is(button,input):focus-visible {outline:3px solid #3783b7;outline-offset:3px;}
@media(max-width:400px){#pc-share-dialog{padding:20px;}#pc-share-dialog .pc-share-preview{height:200px;}}

/* Match the timeline's Download and Share actions to the IQ controls too. */
#political-compass-line-chart[data-political-history].p-history .p-history-actions :is(#downloadButton,#p-history-share) {
  background: #fff; border: 1px solid #c5d2e0; color: #2e6497; border-radius: 7px;
}
#political-compass-line-chart[data-political-history].p-history .p-history-actions :is(#downloadButton,#p-history-share):not(:disabled):hover {
  background: #edf4fc; border-color: #8eb0d2;
}
