/*
 * SaaS Motion Pro — css/tools/ai.css (shared by all AI tools + license UI)
 * © 2026 Sabbir Hossen — SaaS Motion Pro. All rights reserved.
 */
.ai-head { display: flex; align-items: flex-start; gap: 8px; }
.ai-head h1 { margin-bottom: 2px; }
.ai-set-btn { height: 28px; min-height: 28px; padding: 0 9px; flex: none; }
.ai-set-btn span { font-size: 11px; }
@media (max-width: 300px) { .ai-set-btn span { display: none; } }

.ai-badge-btn { cursor: pointer; }
.ai-badge-btn:hover { color: var(--text); border-color: var(--accent-line); }

/* Progress / cancel */
.ai-progress {
  display: flex; flex-direction: column; gap: 8px;
  padding: 10px 12px; border-radius: var(--r-md);
  background: var(--bg); border: 1px solid var(--border-strong);
  font-size: 11.5px; color: var(--text-2);
}
.ai-progress[hidden] { display: none; }
.ai-progress .ai-msg { overflow-wrap: anywhere; }
.ai-progress .ai-msg a { color: var(--accent-hi); }
.ai-progress .ai-spin { width: 12px; height: 12px; border-radius: 50%; flex: none; border: 2px solid var(--border-strong); }
.ai-progress.busy .ai-spin { border-top-color: var(--accent-hi); animation: spin 0.7s linear infinite; }
.ai-progress.ok { border-color: rgba(52, 211, 153, 0.35); }
.ai-progress.ok .ai-spin { background: var(--ok); border-color: var(--ok); }
.ai-progress.err { border-color: rgba(248, 113, 113, 0.45); color: var(--text); }
.ai-progress.err .ai-spin { background: var(--err); border-color: var(--err); }
.ai-progress.ok .progress, .ai-progress.err .progress { display: none; }
.progress.indet > i { animation: ai-indet 1.2s var(--ease) infinite; }
@keyframes ai-indet { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }

/* Settings modal */
.ai-modal-backdrop {
  position: fixed; inset: 0; z-index: 120; background: rgba(5, 6, 10, 0.6);
  display: flex; align-items: flex-start; justify-content: center; padding: 24px 10px;
}
.ai-modal {
  width: 100%; max-width: 520px; max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--border-strong); border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.ai-modal-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.ai-modal-head h2 { font-size: 14px; }
.ai-modal-body { padding: 12px 14px 16px; overflow-y: auto; }
.ai-modal .card.focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.ai-modal a { color: var(--accent-hi); }
.ai-warn { padding: 8px 10px; border-radius: var(--r-md); background: rgba(251, 191, 36, 0.08); border: 1px solid rgba(251, 191, 36, 0.25); color: var(--text-2); }
.ai-adv { margin-top: 8px; }
.ai-adv summary { cursor: pointer; font-size: 10.5px; color: var(--text-3); margin-bottom: 6px; }

/* Common bits */
.ai-src { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ai-src .grow { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-textarea {
  width: 100%; min-height: 84px; resize: vertical; padding: 8px 10px; line-height: 1.45;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--r-md); outline: none;
}
.ai-textarea:focus { border-color: var(--accent); }
.ai-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 300px) { .ai-grid2 { grid-template-columns: 1fr; } }
.ai-color { width: 34px; height: 28px; padding: 0; border: 1px solid var(--border); border-radius: var(--r-sm); background: var(--bg); cursor: pointer; }
.ai-setup { border-style: dashed; }
.ai-setup ol { margin: 6px 0 0; padding-left: 18px; color: var(--text-2); line-height: 1.7; }
