/* Shared report and simple-view social chart popup. */
[data-chart-export-trigger] {
  cursor: pointer;
}

.salary-tech-table tbody tr[data-chart-export-trigger] {
  cursor: pointer;
}

[data-chart-export-trigger]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

[data-chart-export-trigger].is-pointer-return-focus:focus-visible {
  outline: none;
}

.chart-export-dialog {
  width: min(72rem, calc(100vw - 2rem), calc(133.333dvh - 22.5rem));
  max-width: none;
  max-height: none;
  padding: 0;
  overflow: hidden;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 1.4rem;
  background: rgba(25, 25, 25, 0.96);
  box-shadow: 0 2rem 5rem rgba(0, 0, 0, 0.56);
}

.chart-export-dialog.is-combined {
  width: min(42rem, calc(100vw - 2rem), calc(75dvh - 12.75rem));
  transform: scale(var(--chart-export-combined-scale, 1));
}

.chart-export-dialog:not([open]) {
  display: none;
}

.chart-export-dialog[open] {
  animation: chart-export-enter 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-export-dialog:focus {
  outline: none;
}

.chart-export-dialog::backdrop {
  background: rgba(8, 8, 8, 0.74);
  backdrop-filter: blur(0.45rem);
}

.chart-export-shell {
  display: grid;
  gap: 1rem;
  padding: 2rem;
}

.chart-export-actions {
  display: flex;
  align-items: center;
}

.chart-export-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.chart-export-heading {
  min-width: 0;
}

.chart-export-status {
  margin: 0;
}

.chart-export-header h2,
.chart-export-title {
  margin: 0;
  color: var(--paper);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.15;
}

.chart-export-title em {
  color: var(--accent);
  font-style: normal;
}

.chart-export-close {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  place-items: center;
  padding: 0;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  font: inherit;
  font-size: 0;
  line-height: 1;
  cursor: pointer;
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.chart-export-close-icon {
  position: relative;
  z-index: 1;
  width: 0.82rem;
  height: 0.82rem;
}

.chart-export-close-icon::before,
.chart-export-close-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(45deg);
}

.chart-export-close-icon::after {
  transform: translate(-50%, -50%) rotate(-45deg);
}

.chart-export-switcher {
  display: grid;
  grid-template-columns: repeat(var(--chart-export-option-count, 3), minmax(0, 1fr));
  gap: 0.35rem;
  padding: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.035);
}

.chart-export-switcher[hidden] {
  display: none;
}

.chart-export-switch {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.65rem;
  padding: 0.7rem 0.9rem;
  overflow: hidden;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 0.62rem;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  transition: color 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.chart-export-switch > span:first-child {
  flex: 0 0 auto;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
}

.chart-export-switch > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1;
}

.chart-export-switch:hover {
  color: var(--paper);
  background: rgba(255, 255, 255, 0.045);
}

.chart-export-switch[aria-pressed="true"] {
  color: var(--paper);
  border-color: rgba(255, 193, 50, 0.34);
  background: rgba(255, 193, 50, 0.09);
}

.chart-export-preview {
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.9rem;
  background: #141414;
}

.chart-export-preview canvas {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: var(--chart-export-ratio, 4 / 3);
}

.chart-export-actions {
  justify-content: flex-end;
  gap: 0.75rem;
}

.chart-export-status {
  flex: 1;
  color: var(--muted);
  font-size: 0.86rem;
}

.chart-export-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 2.8rem;
  padding: 0.6rem 1.15rem;
  border-radius: 0.75rem;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease,
    opacity 160ms ease;
}

.chart-export-action-icon {
  width: 0.95rem;
  height: 0.95rem;
  flex: 0 0 auto;
  stroke: currentColor;
}

.chart-export-copy {
  position: relative;
  overflow: hidden;
  color: var(--paper);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
}

.chart-export-copy-default {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition:
    opacity 160ms ease,
    filter 220ms ease,
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-export-copy-feedback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: inherit;
  font: inherit;
  opacity: 0;
  pointer-events: none;
  filter: blur(5px);
  transform: translateY(0.18rem);
  transition:
    opacity 180ms ease,
    filter 240ms ease,
    transform 240ms cubic-bezier(0.16, 1, 0.3, 1);
  white-space: nowrap;
}

.chart-export-copy.is-copied .chart-export-copy-default {
  opacity: 0;
  filter: blur(5px);
  transform: translateY(-0.18rem);
}

.chart-export-copy.is-copied .chart-export-copy-feedback {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

.chart-export-download {
  color: #181818;
  border: 1px solid rgba(255, 193, 50, 0.7);
  background: linear-gradient(135deg, #ffc132 0%, #f7b320 100%);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22);
}

.chart-export-close:hover,
.chart-export-copy:hover {
  color: var(--paper);
  border-color: rgba(255, 193, 50, 0.48);
  background: rgba(255, 193, 50, 0.08);
  box-shadow: 0 0 0.85rem rgba(255, 193, 50, 0.22);
}

.chart-export-download:hover {
  border-color: #ffd675;
  background: linear-gradient(135deg, #ffd36a 0%, #ffc132 100%);
  box-shadow: 0 0 0.75rem rgba(255, 193, 50, 0.25);
}

.chart-export-close:active,
.chart-export-copy:active {
  background: rgba(255, 193, 50, 0.12);
}

.chart-export-download:active {
  background: linear-gradient(135deg, #f7b320 0%, #eb9f0c 100%);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.chart-export-action:focus-visible,
.chart-export-close:focus-visible,
.chart-export-switch:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

@keyframes chart-export-enter {
  from {
    opacity: 0;
    transform: translateY(0.65rem) scale(0.985);
  }
}

@media (max-width: 44rem) {
  .chart-export-dialog {
    width: min(calc(100vw - 1rem), calc(133.333dvh - 22.5rem));
  }

  .chart-export-dialog.is-combined {
    width: min(calc(100vw - 1rem), calc(75dvh - 10.75rem));
  }

  .chart-export-shell {
    padding: 1.25rem;
  }

  .chart-export-header {
    align-items: flex-start;
  }

  .chart-export-title {
    font-size: 1.35rem;
  }

  .chart-export-actions {
    flex-wrap: wrap;
  }

  .chart-export-status {
    flex-basis: 100%;
    min-height: 1.2em;
  }

  .chart-export-action {
    flex: 1;
  }
}

@media (max-height: 44rem) {
  .chart-export-shell {
    padding: 1.25rem;
  }

  .chart-export-actions {
    flex-wrap: wrap;
  }

  .chart-export-status {
    flex-basis: 100%;
    min-height: 1.2em;
  }
}

@media (prefers-reduced-motion: reduce) {
  .chart-export-dialog[open] {
    animation: none;
  }

  .chart-export-copy-default,
  .chart-export-copy-feedback {
    transition-duration: 0.01ms;
  }
}
