/* ScanAIpro shared tool add-ons: AI assistant box + E-E-A-T (methodology / author) block.
   Scoped with .sai- prefixes so it never clashes with each tool's own stylesheet. */
.sai-wrap { --sai-bg: #ffffff; --sai-fg: #1f2937; --sai-muted: #6b7280; --sai-border: #e5e7eb; --sai-accent: #6d4cc7; --sai-accent-soft: rgba(109, 76, 199, .08); --sai-ok: #047857;
  font-family: inherit; color: var(--sai-fg); max-width: 960px; margin: 2rem auto; padding: 0 16px; box-sizing: border-box; line-height: 1.6; }
@media (prefers-color-scheme: dark) { .sai-wrap.sai-auto { --sai-bg: #151c2c; --sai-fg: #e2e8f0; --sai-muted: #94a3b8; --sai-border: rgba(255,255,255,.12); --sai-accent: #a78bfa; --sai-accent-soft: rgba(167,139,250,.1); --sai-ok: #34d399; } }
[data-theme="dark"] .sai-wrap { --sai-bg: #151c2c; --sai-fg: #e2e8f0; --sai-muted: #94a3b8; --sai-border: rgba(255,255,255,.12); --sai-accent: #a78bfa; --sai-accent-soft: rgba(167,139,250,.1); --sai-ok: #34d399; }
.sai-wrap *, .sai-wrap *::before, .sai-wrap *::after { box-sizing: border-box; }
.sai-card { background: var(--sai-bg); border: 1px solid var(--sai-border); border-radius: 16px; padding: 1.4rem 1.5rem; margin-bottom: 1.25rem; box-shadow: 0 4px 18px rgba(0,0,0,.04); }
.sai-card h2 { font-size: 1.35rem; margin: 0 0 .6rem; color: var(--sai-fg); line-height: 1.3; }
.sai-card h3 { font-size: 1.05rem; margin: 1.1rem 0 .4rem; color: var(--sai-fg); }
.sai-card p, .sai-card li { color: var(--sai-fg); font-size: .96rem; }
.sai-card ul, .sai-card ol { padding-inline-start: 1.25rem; margin: .4rem 0; }
.sai-muted { color: var(--sai-muted) !important; font-size: .86rem !important; }
.sai-badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .78rem; font-weight: 600; color: var(--sai-accent); background: var(--sai-accent-soft); border-radius: 999px; padding: .2rem .7rem; margin-bottom: .6rem; }

/* AI box */
.sai-ai textarea { width: 100%; min-height: 92px; resize: vertical; border: 1px solid var(--sai-border); border-radius: 12px; padding: .8rem .9rem; font: inherit; font-size: 16px; color: var(--sai-fg); background: transparent; }
.sai-ai textarea:focus { outline: 2px solid var(--sai-accent); outline-offset: 1px; }
.sai-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .7rem; }
.sai-btn { appearance: none; border: 0; border-radius: 999px; padding: .65rem 1.3rem; font: inherit; font-weight: 700; font-size: .95rem; cursor: pointer; background: var(--sai-accent); color: #fff; }
.sai-btn[disabled] { opacity: .6; cursor: wait; }
.sai-chip { appearance: none; border: 1px solid var(--sai-border); background: transparent; color: var(--sai-fg); border-radius: 999px; padding: .35rem .8rem; font: inherit; font-size: .84rem; cursor: pointer; text-align: start; }
.sai-chip:hover { border-color: var(--sai-accent); }
.sai-answer { margin-top: 1rem; padding: 1rem 1.1rem; border-radius: 12px; background: var(--sai-accent-soft); display: none; }
.sai-answer.on { display: block; }
.sai-answer p { margin: 0 0 .6rem; } .sai-answer p:last-child { margin-bottom: 0; }
.sai-err { color: #b91c1c; }

/* E-E-A-T */
.sai-author { display: flex; gap: 1rem; align-items: flex-start; }
.sai-avatar { width: 54px; height: 54px; flex-shrink: 0; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #805aed, #00b4d8); }
.sai-sources li { word-break: break-word; }
.sai-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem; margin-top: .6rem; }
.sai-tools a { display: block; border: 1px solid var(--sai-border); border-radius: 12px; padding: .65rem .8rem; color: var(--sai-fg); text-decoration: none; font-size: .9rem; font-weight: 600; }
.sai-tools a:hover { border-color: var(--sai-accent); }
/* The live-price strip often sits inside a tool's coloured header, so it carries its own light surface. */
.sai-live { display: flex; flex-wrap: wrap; gap: .4rem .9rem; align-items: center; font-size: .86rem; padding: .7rem .9rem; border-radius: 12px; margin: .8rem 0;
  background: rgba(255, 255, 255, .95); color: #1f2937; border: 1px solid rgba(0, 0, 0, .08); box-shadow: 0 2px 10px rgba(0, 0, 0, .08); }
.sai-live b { color: #047857; }
.sai-live .sai-muted { color: #4b5563 !important; }
.sai-live .sai-chip { color: #1f2937; border-color: rgba(0, 0, 0, .2); background: #fff; }
.sai-live button { margin-inline-start: auto; }
[dir="rtl"] .sai-live button { margin-inline-start: 0; margin-inline-end: auto; }
