/* AI Dispute Resolution (v0.13.0). Uses the console's tokens (styles.css :root). */
.ai-panel { border: 1px solid var(--line); border-left: 4px solid var(--teal); border-radius: 10px;
  padding: .7rem .9rem; margin-top: .6rem; background: #FAFBFD; }
.ai-panel.compact { background: #fff; }
.ai-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.ai-mode { font-size: .74rem; color: var(--mut); margin-left: auto; }
.ai-pill { display: inline-block; font-size: .72rem; font-weight: 700; padding: .1rem .55rem; border-radius: 999px;
  background: var(--line); color: var(--ink); }
.ai-pill.ok { background: #DDEFE5; color: #1F5E43; }
.ai-pill.warn { background: #FBEBCD; color: #7A5212; }
.ai-pill.bad { background: #F6D8D4; color: #8E2A1F; }
/* an AI recommendation is visibly NOT a decision: dashed, labelled */
.ai-rec { border: 1px dashed var(--teal); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; background: #fff; }
.ai-rec.bad { border-color: var(--red); }
.ai-rec-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .07em; color: var(--mut); }
.ai-rec p { margin-top: .25rem; font-size: .86rem; }
/* a completed resolution: solid */
.ai-final { border: 2px solid var(--green); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; background: #F1F8F4; }
.ai-final.auto { border-color: var(--deep); background: #EEF0F8; }
.ai-reasons ul, .ai-list { margin: .3rem 0 .4rem 1.1rem; font-size: .84rem; }
.ai-reasons code { font-size: .74rem; background: var(--bg); padding: 0 .3rem; border-radius: 4px; }
.ai-panel h4 { font-size: .82rem; color: var(--deep); margin: .7rem 0 .2rem; }
.ai-ref { font: inherit; font-size: .7rem; padding: 0 .35rem; border: 1px solid var(--line); border-radius: 5px;
  background: #fff; color: var(--blue); cursor: pointer; }
.ai-ref:focus-visible, .ai-row:focus-visible { outline: 3px solid var(--amber); outline-offset: 1px; }
.ai-refbox { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; background: #fff; font-size: .84rem; }
.ai-refbox pre { white-space: pre-wrap; font-size: .74rem; max-height: 220px; overflow: auto; margin-top: .3rem; }
.ai-checks td { padding: .15rem .5rem; font-size: .8rem; }
.ai-more { margin-top: .6rem; font-size: .82rem; }
.ai-more table td { font-size: .76rem; padding: .15rem .4rem; vertical-align: top; }
.ai-panel textarea, #air-admin textarea { width: 100%; font: inherit; padding: .4rem .55rem; border: 1px solid var(--line); border-radius: 8px; }
.ai-queue .ai-row { cursor: pointer; }
.ai-queue .ai-row:hover { background: var(--bg); }
.ai-casehead { margin-bottom: .3rem; }
.air-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 1100px) { .air-grid { grid-template-columns: 1fr; } }

/* v0.16.0 — proposed outcome, money, information request, vendor settings */
.ai-proposal { border: 1px solid var(--line, #d0d7e2); border-left: 4px solid #1F6F8B; border-radius: 8px;
  padding: .6rem .8rem; margin: .6rem 0; background: #F4F9FB; }
.ai-proposal .ai-rec-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #4A5A6A; margin-bottom: .2rem; }
.ai-money { margin-top: .3rem; font-size: .9rem; }
.ai-info { border: 1px dashed #B7791F; border-radius: 8px; padding: .5rem .8rem; margin: .6rem 0; background: #FFF9EE; }
.ai-cfg { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .8rem 1.2rem; margin: .4rem 0 .6rem; }
.ai-cfg > div { border: 1px solid var(--line, #d0d7e2); border-radius: 8px; padding: .6rem .8rem; background: #fff; }
.ai-cfg .ai-checks td:first-child { color: #4A5A6A; padding-right: .8rem; }

/* v0.16.1 — the assistant's reply to the disputant */
.ai-reply { border: 1px solid var(--line, #d0d7e2); border-left: 4px solid #2F855A; border-radius: 8px;
  padding: .6rem .8rem; margin: .6rem 0; background: #F3FAF5; }
.ai-reply.bad { border-left-color: #A0AEC0; background: #F7F8FA; }
.ai-reply .ai-rec-label { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: #4A5A6A; margin-bottom: .2rem; }
.ai-reply p { margin: .2rem 0; font-style: italic; }

/* v0.17.5 — analysis in progress */
.ai-working { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid #BFD9E4; border-left: 4px solid #1F6F8B;
  border-radius: 8px; background: #EEF6FA; padding: .6rem .8rem; margin: .6rem 0; }
.spinner { flex: none; display: inline-block; width: 1.1rem; height: 1.1rem; border-radius: 50%;
  border: 3px solid rgba(31, 111, 139, .2); border-top-color: #1F6F8B; animation: ai-spin .8s linear infinite; }
.btn .spinner { width: .85rem; height: .85rem; border-width: 2px; vertical-align: -2px; margin-right: .4rem; }
@keyframes ai-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
