/* Obsidian — New Antibot wizard (landscape modal) */

.modal-card.modal-antibot {
  width: min(980px, 94vw);
  max-width: min(980px, 94vw);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 18px 22px 16px;
}

.modal-card.modal-antibot .modal-header {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.modal-card.modal-antibot .antibot-step-hint {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.modal-card.modal-antibot .antibot-tabs {
  flex-shrink: 0;
  margin-bottom: 0;
  border-bottom: 1px solid var(--border);
  gap: 0;
}

.modal-card.modal-antibot .antibot-tabs .tab-btn {
  flex: 1;
  text-align: center;
  padding: 10px 8px;
  font-size: 10px;
}

.modal-card.modal-antibot .antibot-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 14px 0 12px;
  padding-right: 4px;
}

.modal-card.modal-antibot .antibot-footer {
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-bottom: 0;
}

.antibot-footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Step panels */
.antibot-step-panel[hidden] {
  display: none !important;
}

.antibot-step-panel[data-antibot-panel="basics"].active {
  display: block;
}

.antibot-step-panel[data-antibot-panel="basics"] .form-field {
  max-width: 420px;
}

/* Protection — two columns */
.antibot-step-panel[data-antibot-panel="protection"] {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}

.antibot-step-panel[data-antibot-panel="protection"].active {
  display: grid;
}

.antibot-step-panel[data-antibot-panel="protection"] .antibot-advanced {
  grid-column: 1 / -1;
}

.antibot-step-panel[data-antibot-panel="protection"] .antibot-captcha-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.antibot-step-panel[data-antibot-panel="protection"] .captcha-style-card {
  max-width: none;
  min-width: 0;
}

/* Routing — wide grid */
.antibot-step-panel[data-antibot-panel="routing"] {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  align-items: start;
}

.antibot-step-panel[data-antibot-panel="routing"].active {
  display: grid;
}

.antibot-routing-lead,
.antibot-os-list {
  grid-column: 1 / -1;
}

.antibot-os-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.antibot-os-row {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.antibot-os-label {
  margin: 0;
  white-space: nowrap;
}

.antibot-os-row .antibot-os-url:disabled {
  opacity: 0.45;
}

/* Review — three-column board */
.antibot-step-panel[data-antibot-panel="review"] {
  display: none;
}

.antibot-step-panel[data-antibot-panel="review"].active {
  display: block;
}

.antibot-review-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1.35fr);
  gap: 12px;
  align-items: stretch;
}

.antibot-review-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-height: 0;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.antibot-review-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.antibot-review-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.antibot-review-edit {
  appearance: none;
  border: none;
  background: transparent;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent, var(--blue));
  cursor: pointer;
}

.antibot-review-edit:hover {
  text-decoration: underline;
}

.antibot-review-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 12px;
  line-height: 1.35;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 55%, transparent);
}

.antibot-review-row:last-child {
  border-bottom: none;
}

.antibot-review-key {
  flex: 0 0 auto;
  max-width: 46%;
  color: var(--muted);
  font-size: 11px;
}

.antibot-review-val-wrap {
  flex: 1 1 auto;
  min-width: 0;
  text-align: right;
}

.antibot-review-val {
  display: block;
  font-size: 11px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  color: var(--text);
  word-break: break-word;
}

.antibot-review-pill {
  display: inline-block;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.antibot-review-pill.is-on {
  color: #22c55e;
  border-color: color-mix(in srgb, #22c55e 45%, var(--border));
  background: color-mix(in srgb, #22c55e 12%, transparent);
}

.antibot-review-pill.is-off {
  color: var(--muted);
  background: var(--bg);
}

.antibot-deploy-hint {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.45;
}

@media (max-width: 820px) {
  .modal-card.modal-antibot {
    width: min(100%, 94vw);
    max-width: 94vw;
    max-height: 92vh;
  }

  .antibot-step-panel[data-antibot-panel="protection"].active,
  .antibot-step-panel[data-antibot-panel="routing"].active {
    grid-template-columns: 1fr;
  }

  .antibot-os-list {
    grid-template-columns: 1fr;
  }

  .antibot-review-list {
    grid-template-columns: 1fr;
  }

  .antibot-step-panel[data-antibot-panel="protection"] .antibot-captcha-row {
    grid-template-columns: 1fr 1fr;
  }
}
