/* Turonet · «Completar amb les bases» (bases.js): the dialog that sends the bases to TuroBot, waits and reviews what it read, and the
   «Actualitzar les bases» button when they may have changed. Light and dark here. */
.bases-dialog {
  --bases-soft: #f5f7f8;
  --bases-line: #e4e8eb;
  --bases-warn-bg: #fbf1dc;
  --bases-warn-line: #f0dcae;
  --bases-warn: #7a4f06;
  --bases-spin: #356745;
}
html.dark .bases-dialog {
  --bases-soft: #172133;
  --bases-line: #334155;
  --bases-warn-bg: #3a2f17;
  --bases-warn-line: #5a4720;
  --bases-warn: #f3c76b;
  --bases-spin: #86c79a;
}
#dialog-body .bases-dialog p.bases-hint {
  font-size: 13px;
  margin: -12px 0 18px;
}
#dialog-body .bases-dialog p.bases-hint:last-child {
  margin: 6px 0 0;
}
.bases-dialog input[type="file"] {
  padding: 9px;
  font-size: 14px;
}
.bases-existing {
  border: 1px solid var(--bases-line);
  border-radius: 8px;
  padding: 10px 14px 12px;
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}
.bases-existing legend {
  font-size: 14px;
  font-weight: 550;
  padding: 0 4px;
}
.bases-paste {
  margin: 0 0 18px;
}
.bases-paste summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 550;
  padding: 4px 0;
  margin-bottom: 10px;
}
.bases-paste textarea {
  min-height: 150px;
  font-size: 14px;
}
.bases-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  cursor: pointer;
}
.bases-check input {
  accent-color: var(--green);
  width: 17px;
  height: 17px;
  margin: 2px 0 0;
  flex: none;
}
.bases-check input:disabled + span {
  color: var(--muted);
}
.bases-check span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.bases-check small {
  color: var(--muted);
  font-size: 12.5px;
}
.bases-check .pill {
  padding: 2px 7px;
  margin-left: 4px;
  font-size: 11.5px;
  white-space: normal;
}
.bases-check ul {
  margin: 4px 0 0;
  padding-left: 18px;
  color: var(--muted);
}
.bases-review h3 {
  font-size: 14px;
  margin: 20px 0 10px;
}
.bases-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--bases-soft);
}
.bases-link {
  color: var(--muted);
  font-size: 12.5px;
}
/* «Actualitzar les bases» when they may have changed (finance.js: basesButton) */
.button.bases-stale {
  background: #fff3d9;
  border-color: #ecc56f;
  color: #7a4f06;
}
.button.bases-stale:hover {
  background: #ffeac0;
}
html.dark .button.bases-stale {
  background: #3a2f17;
  border-color: #7a5d23;
  color: #f3c76b;
}
html.dark .button.bases-stale:hover {
  background: #4a3b1c;
}
.bases-mark {
  display: inline-grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #a86400;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}
html.dark .bases-mark {
  background: #f3c76b;
  color: #3a2f17;
}
#dialog-body .bases-dialog .notice {
  margin: 0 0 16px;
  font-size: 13.5px;
}
#dialog-body .bases-dialog .notice.warning {
  background: var(--bases-warn-bg);
  border-color: var(--bases-warn-line);
  color: var(--bases-warn);
}
.bases-dialog .notice ul {
  margin: 6px 0 0;
  padding-left: 18px;
}
.bases-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 0 8px;
}
#dialog-body .bases-progress p {
  margin: 0;
  color: var(--ink);
  font-weight: 550;
}
#dialog-body .bases-dialog .bases-progress + p.bases-hint {
  margin: 0 0 18px 38px;
}
.bases-spinner {
  width: 24px;
  height: 24px;
  flex: none;
  border-radius: 50%;
  border: 3px solid var(--bases-line);
  border-top-color: var(--bases-spin);
  animation: bases-spin 0.9s linear infinite;
}
@keyframes bases-spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .bases-spinner {
    animation: none;
    border-top-color: var(--bases-line);
    border-right-color: var(--bases-spin);
  }
}
