/* ATLAS — AI-vraagfunctie, AI-instellingen en Preflight-zelftest */

.atlas-ai-box {
  margin: 22px 0 6px;
  padding: 18px 20px;
  border: 1px solid #d9e1ec;
  border-radius: 16px;
  background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
}
.atlas-ai-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; color: #17243d; font-size: 15px; }
.atlas-ai-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 30px; height: 22px; padding: 0 7px; border-radius: 99px;
  background: #165cf5; color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .06em;
}
.atlas-ai-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.atlas-ai-chip {
  border: 1px solid #d9e1ec; background: #fff; color: #33435e; border-radius: 99px;
  padding: 7px 12px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  transition: border-color .12s, color .12s, background .12s;
}
.atlas-ai-chip:hover { border-color: #165cf5; color: #165cf5; background: #f3f7ff; }
.atlas-ai-form { display: flex; gap: 8px; }
.atlas-ai-input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px; border: 1px solid #d9e1ec; border-radius: 10px;
  font: inherit; font-size: 14px; color: #18253a; background: #fff; outline: none;
}
.atlas-ai-input:focus { border-color: #165cf5; box-shadow: 0 0 0 3px rgba(22, 92, 245, .12); }
.atlas-ai-send { height: 42px; padding: 0 18px !important; white-space: nowrap; }
.atlas-ai-answer { margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: #fff; border: 1px solid #e8edf4; color: #26344d; font-size: 14px; line-height: 1.55; }
.atlas-ai-answer.is-error { border-color: #f3c7c7; background: #fff6f6; color: #b42323; }
.atlas-ai-answer p { margin: 0 0 8px; }
.atlas-ai-answer p:last-child { margin-bottom: 0; }
.atlas-ai-answer ul, .atlas-ai-answer ol { margin: 4px 0 8px 20px; padding: 0; }
.atlas-ai-answer li { margin: 3px 0; }
.atlas-ai-q { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px dashed #e1e7f0; color: #6b7a92; font-weight: 600; font-size: 13px; }
.atlas-ai-note { display: block; margin-top: 10px; color: #8a97ab; font-size: 11.5px; }
.atlas-ai-thinking { display: flex; align-items: center; gap: 6px; color: #6b7a92; font-size: 13px; }
.atlas-ai-thinking span { width: 6px; height: 6px; border-radius: 50%; background: #165cf5; animation: atlasAiDot 1s infinite ease-in-out; }
.atlas-ai-thinking span:nth-child(2) { animation-delay: .15s; }
.atlas-ai-thinking span:nth-child(3) { animation-delay: .3s; margin-right: 4px; }
@keyframes atlasAiDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

/* Vraag-venster vanuit Beheer */
.atlas-ai-modal { position: fixed; inset: 0; z-index: 10001; display: flex; align-items: flex-start; justify-content: center; padding: 60px 20px; overflow: auto; background: rgba(16, 32, 58, .45); }
.atlas-ai-modal-card { position: relative; width: min(760px, 100%); padding: 10px 14px 6px; border-radius: 18px; background: #fff; box-shadow: 0 24px 60px rgba(16, 32, 58, .3); }
.atlas-ai-modal-card .atlas-ai-box { margin: 8px 0; border: 0; background: none; padding: 10px 8px; }
.atlas-ai-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: 0; border-radius: 10px; background: #f1f4f9; color: #33435e; cursor: pointer; font-size: 15px; z-index: 1; }

/* Beheer: zelftest + AI-instellingen */
.atlas-admin-extra { display: grid; gap: 14px; margin-top: 16px; }
.atlas-selftest, .atlas-ai-settings { border: 1px solid #e3e9f2; border-radius: 14px; padding: 14px 16px; background: #fbfcfe; }
.atlas-selftest-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; color: #17243d; }
.atlas-selftest-head span { color: #6b7a92; font-size: 12.5px; font-weight: 600; text-align: right; }
.atlas-selftest-intro, .atlas-ai-settings-intro { margin: 6px 0 12px; color: #6b7a92; font-size: 12.5px; line-height: 1.5; }
.atlas-st-wrap { max-height: 520px; overflow: auto; border: 1px solid #e8edf4; border-radius: 10px; background: #fff; }
.atlas-st-table { width: 100%; border-collapse: collapse; font-size: 12.5px; color: #33435e; }
.atlas-st-table th { position: sticky; top: 0; background: #fafbfd; text-align: left; padding: 9px 10px; font-size: 10.5px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #8a97ab; border-bottom: 1px solid #e8edf4; }
.atlas-st-table td { padding: 9px 10px; border-bottom: 1px solid #eef2f7; vertical-align: top; }
.atlas-st-table td small { display: block; color: #8a97ab; font-size: 11px; margin-top: 2px; }
.atlas-st-file { font-weight: 700; color: #17243d; word-break: break-word; max-width: 260px; }
.atlas-st-table ul { margin: 0; padding-left: 16px; }
.atlas-st-table li { margin: 2px 0; }
.atlas-st-table li.bad { color: #b42323; }
.atlas-st-table li.mid { color: #a35f00; }
.atlas-st-score { display: inline-block; min-width: 40px; padding: 3px 8px; border-radius: 99px; text-align: center; font-weight: 800; background: #eef2f7; }
.atlas-st-score.ok { background: #e8f7ee; color: #17803d; }
.atlas-st-score.mid { background: #fff3df; color: #b86a00; }
.atlas-st-score.bad { background: #fdecec; color: #c62828; }
.atlas-st-okmsg { color: #17803d; font-weight: 600; }
.atlas-st-error { color: #b42323; }
.atlas-st-saved { display: block; margin-top: 8px; color: #8a97ab; font-size: 11.5px; }

.atlas-ai-settings summary { cursor: pointer; font-weight: 700; color: #17243d; }
.atlas-ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.atlas-ai-grid label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 700; color: #536783; }
.atlas-ai-grid .atlas-ai-wide { grid-column: 1 / -1; }
.atlas-ai-grid input[type="text"], .atlas-ai-grid input[type="password"], .atlas-ai-grid select {
  height: 38px; padding: 0 10px; border: 1px solid #d9e1ec; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 500; color: #18253a; background: #fff;
}
.atlas-ai-grid .atlas-ai-check { flex-direction: row; align-items: center; gap: 8px; grid-column: 1 / -1; font-weight: 600; }
.atlas-ai-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.atlas-ai-settings-msg { margin-top: 10px; font-size: 12.5px; color: #17803d; min-height: 1em; }
.atlas-ai-settings-msg.is-error { color: #b42323; }

@media (max-width: 640px) {
  .atlas-ai-form { flex-direction: column; }
  .atlas-ai-send { width: 100%; }
  .atlas-ai-grid { grid-template-columns: 1fr; }
  .atlas-ai-modal { padding: 0; }
  .atlas-ai-modal-card { border-radius: 0; min-height: 100%; }
}

@media print {
  .atlas-ai-box { display: none !important; }
}
