/* Final AI-workflow theme layer. Loaded after the legacy theme rules. */
.ai-source-analysis-panel,
.ai-manual-url-entry,
.ai-advanced-generation-options,
.ai-step[hidden],
.ai-thinking-panel[hidden] {
  display: none !important;
}

.ai-stepper {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  border-color: #e4d5b7 !important;
  background: #fbf8f1 !important;
}

.ai-stepper.listing-active {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.ai-step.active,
.ai-step.done {
  color: #4f3b16 !important;
  background: linear-gradient(135deg, #fffdf8 0%, #f7edd7 100%) !important;
}

.ai-step.active strong,
.ai-step.done strong {
  color: #fffaf0 !important;
  background: linear-gradient(145deg, #d7ad45, #9f741d) !important;
  box-shadow: 0 5px 13px rgba(151, 107, 25, 0.22) !important;
}

.ai-provider-switcher {
  grid-template-columns: minmax(210px, 0.72fr) minmax(210px, 0.72fr) minmax(380px, 1.45fr) !important;
  align-items: stretch !important;
  padding: 14px !important;
  border-color: #e4d5b7 !important;
  background: linear-gradient(135deg, #fffdf8 0%, #faf5e9 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88) !important;
}

.ai-provider-switcher select {
  border-color: #dccba7 !important;
  background: rgba(255, 255, 255, 0.94) !important;
}

.ai-provider-switcher select:focus {
  border-color: #c89a36 !important;
  box-shadow: 0 0 0 3px rgba(200, 154, 54, 0.12) !important;
  outline: none;
}

.ai-provider-hint {
  align-self: end !important;
  min-height: 42px !important;
  padding: 8px 11px !important;
  border: 1px solid rgba(195, 155, 73, 0.22) !important;
  border-radius: 10px !important;
  background: rgba(255, 250, 239, 0.86) !important;
}

.ai-provider-hint .badge,
.ai-provider-hint .badge.ok {
  flex: 0 0 auto;
  white-space: nowrap;
  color: #6a4a0e !important;
  background: linear-gradient(145deg, #f8e7b5, #edc965) !important;
  box-shadow: inset 0 0 0 1px rgba(148, 99, 12, 0.10) !important;
}

.ai-provider-hint small {
  color: #74664d !important;
  font-size: 11px !important;
}

.ai-generate-panel .ai-generate-actions .primary-button {
  border-color: #c79831 !important;
  color: #fffaf0 !important;
  background: linear-gradient(135deg, #342d22 0%, #5b4524 52%, #a67820 100%) !important;
}

.ai-generate-panel .ai-generate-actions .primary-button:disabled {
  color: #4f3b17 !important;
  background: linear-gradient(105deg, #f3ddb0 0%, #e0b853 50%, #f3ddb0 100%) !important;
  background-size: 220% 100% !important;
  opacity: 1 !important;
}

.ai-batch-note {
  border-left-color: #bf8d2c !important;
  color: #75664b !important;
  background: #fbf6eb !important;
}

@media (max-width: 1100px) {
  .ai-provider-switcher {
    grid-template-columns: 1fr 1fr !important;
  }
  .ai-provider-hint {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .ai-provider-switcher {
    grid-template-columns: 1fr !important;
  }
  .ai-provider-hint {
    grid-column: auto;
  }
}
