/* Import your own strategy (import.html) and the import card on the
   strategy page (js/import-card.js). Theme variables only, so both themes work. */
.im-card {
  background: var(--bg-card);
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.im-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}
.im-intro {
  color: var(--text-secondary);
  margin: 0 0 14px;
  max-width: 78ch;
  line-height: 1.5;
}
.im-steps {
  display: grid;
  gap: 16px;
}
.im-step {
  background: var(--bg-tertiary);
  border-radius: 8px;
  padding: 14px 16px;
}
.im-step h4 {
  margin: 0 0 10px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-primary);
}
.im-step h4 .im-num {
  display: inline-flex;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  margin-right: 8px;
}
.im-form {
  display: grid;
  gap: 10px;
}
/* Every field label in the form, steps 2 and 3 included (they sat outside .im-form). */
.im-form label,
.im-inline > label,
.im-label {
  display: grid;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.im-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: start; /* labels line up even beside a taller drop zone */
}
.im-inline > label,
.im-inline > .im-label {
  flex: 1 1 160px;
  min-width: 0;
}
/* Fields are the site's .filter-control (sf-field) and themed combos; only
   the code box differs: taller and monospaced. */
textarea.im-code {
  min-height: 220px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.82rem;
}
.im-btn {
  border: none;
  border-radius: 20px;
  padding: 8px 16px;
  cursor: pointer;
  font: inherit;
  background: var(--bg-hover);
  color: var(--text-primary);
}
.im-btn.primary {
  background: var(--primary);
  color: #fff;
}
.im-btn:disabled {
  opacity: 0.5;
  cursor: default;
}
/* Hover and keyboard focus read like .sd-ctl-btn: primary fill, no ring. */
.im-btn:hover:not(:disabled),
.im-btn:focus-visible {
  outline: none;
  background: var(--primary);
  color: #fff;
}
.im-btn.primary:hover:not(:disabled),
.im-btn.primary:focus-visible {
  background: var(--primary-dark);
}
.im-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 8px;
}
.im-note {
  font-size: 0.85rem;
  color: var(--text-secondary);
  min-height: 1.2em;
  margin: 6px 0 0;
}
.im-ok {
  color: var(--success, #26a69a);
}
.im-err {
  color: var(--danger, #ef5350);
}
.im-muted {
  color: var(--text-muted);
  font-size: 0.82rem;
}
.im-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 20px;
  padding: 3px 12px;
  font-size: 0.8rem;
  background: var(--bg-hover);
  color: var(--text-primary);
}
.im-pill.good {
  background: rgba(38, 166, 154, 0.16);
  color: var(--success, #26a69a);
}
.im-pill.bad {
  background: rgba(239, 83, 80, 0.14);
  color: var(--danger, #ef5350);
}
.im-pill.info {
  background: rgba(41, 98, 255, 0.12);
  color: var(--primary);
}
.im-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 6px;
}
.im-list li {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.85rem;
  line-height: 1.45;
}
.im-list li.blocking {
  color: var(--danger, #ef5350);
}
.im-kv {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.im-kv > div {
  background: var(--bg-secondary);
  border-radius: 8px;
  padding: 8px 12px;
  min-width: 0;
}
.im-kv span {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.im-kv strong {
  display: block;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
/* The consent box is the site's .sf-modal-check; only its spacing is ours. */
.im-own {
  margin: 12px 0 4px;
  font-size: 0.9rem;
  color: var(--text-primary);
  cursor: pointer;
}
.im-table-wrap {
  overflow-x: auto;
  margin-top: 8px;
}
.im-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.im-table th,
.im-table td {
  text-align: left;
  padding: 7px 10px;
  white-space: nowrap;
  vertical-align: top;
}
.im-table th {
  color: var(--text-muted);
  font-weight: 600;
  background: var(--bg-hover);
}
.im-table td.wrap {
  white-space: normal;
  min-width: 200px;
}
.im-dest {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.im-dest button {
  text-align: left;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
  display: grid;
  gap: 4px;
}
.im-dest button:hover,
.im-dest button:focus-visible {
  outline: none;
  background: var(--bg-hover);
}
.im-dest button strong {
  font-size: 0.92rem;
}
.im-dest button span {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
}
.im-dest button:disabled {
  opacity: 0.5;
  cursor: default;
}
@media (max-width: 768px) {
  .im-card {
    padding: 14px 14px;
  }
  .im-step {
    padding: 12px 12px;
  }
  .im-table th,
  .im-table td {
    padding: 6px 8px;
  }
}
