/* Loaded after styles.css so the VA history popup wins older overrides. */
.icon-btn {
  position: relative;
  display: inline-grid;
  width: 48px;
  height: 48px;
  min-height: 48px;
  flex: 0 0 48px;
  place-items: center;
  padding: 0 !important;
  line-height: 1;
}

.va-history-trigger span {
  display: grid;
  place-items: center;
  font-size: 21px;
  line-height: 1;
}

.va-history-card {
  width: min(760px, 100%);
  max-height: min(88vh, 780px);
}

.va-history-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.va-history-filter label {
  min-width: 0;
}

.va-history-filter .small-btn {
  height: 46px;
  min-height: 46px;
  white-space: nowrap;
}

.va-history-summary {
  margin-top: 12px;
}

.va-history-list {
  display: grid;
  gap: 8px;
  max-height: min(58vh, 1040px);
  overflow-y: auto;
  padding-right: 3px;
  overscroll-behavior: contain;
}

.va-history-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  border: 1px solid var(--panel-edge);
  border-radius: 14px;
  padding: 9px 10px;
  background-color: rgba(255, 255, 255, 0.82);
  box-shadow: var(--card-depth);
  overflow: visible;
}

.va-history-main {
  min-width: 0;
  overflow: hidden;
}

.va-history-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  pointer-events: auto;
}

.va-eye-btn {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  padding: 0;
  font-size: 14px;
}

.va-eye-btn.revealing {
  border-color: rgba(37, 99, 235, 0.34);
  background: rgba(37, 99, 235, 0.12);
}

.va-history-actions .copy-btn {
  min-width: 72px;
  min-height: 38px;
  white-space: nowrap;
  position: relative;
  z-index: 2;
}

@media (max-width: 700px) {
  .va-history-filter {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .va-history-filter .small-btn {
    grid-column: 1 / -1;
  }

  .va-history-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .va-history-actions {
    justify-content: flex-end;
    flex-wrap: wrap;
  }
}
