/* ================================================================
   Alee AI Content — Frontend CSS v1.0
   Mobile-first. Minimal. No tables. Highlight + Q/A blocks.
   ================================================================ */

/* v2.7: Lead paragraph styling removed.
   First paragraph is now a normal <p> styled by the theme, so it never looks
   like a templated box. */

/* ── Highlight box ── */
.aaic-highlight {
  background: #f6f7f9;
  border-radius: 14px;
  padding: 18px 20px;
  margin: 22px 0;
  border: 1px solid #eef0f3;
  line-height: 1.7;
  color: #1f2937;
}
.aaic-highlight > *:first-child { margin-top: 0; }
.aaic-highlight > *:last-child  { margin-bottom: 0; }

.aaic-highlight h3 {
  font-size: 1.02em;
  font-weight: 700;
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: -.01em;
}
.aaic-highlight p {
  margin: 0 0 10px;
  font-size: 0.98em;
}
.aaic-highlight p:last-child { margin-bottom: 0; }
.aaic-highlight ul,
.aaic-highlight ol {
  margin: 6px 0 0;
  padding-left: 20px;
}
.aaic-highlight li {
  margin: 4px 0;
  font-size: 0.97em;
}

/* ── FAQ Q/A blocks ── */
.aaic-faq { margin: 28px 0 8px; }
.aaic-faq > h2 {
  font-size: 1.18em;
  font-weight: 700;
  margin: 0 0 14px;
  color: #0f172a;
  letter-spacing: -.01em;
}
.aaic-faq-item {
  background: #f6f7f9;
  border: 1px solid #eef0f3;
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 10px;
}
.aaic-faq-item:last-child { margin-bottom: 0; }
.aaic-faq-q {
  font-weight: 700;
  font-size: 0.99em;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.55;
}
.aaic-faq-q::before {
  content: "Q · ";
  color: #6366f1;
  font-weight: 700;
}
.aaic-faq-a {
  font-size: 0.96em;
  color: #374151;
  margin: 0;
  line-height: 1.7;
}
.aaic-faq-a::before {
  content: "A · ";
  color: #94a3b8;
  font-weight: 700;
}

/* ── Inline interlink ── */
.aaic-internal-link {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, .35);
  text-underline-offset: 3px;
  transition: color .15s, text-decoration-color .15s;
}
.aaic-internal-link:hover {
  color: #1d4ed8;
  text-decoration-color: #1d4ed8;
}

/* Mobile tweaks */
@media (max-width: 600px) {
  .aaic-highlight { padding: 16px; border-radius: 12px; margin: 18px 0; }
  .aaic-faq-item  { padding: 13px 14px; }
}

/* v1.5.1 — Factual Mode disclaimer */
.aaic-disclaimer {
    margin-top: 28px;
    padding: 14px 16px;
    background: #f8fafc;
    border-left: 4px solid #94a3b8;
    border-radius: 4px;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}
.aaic-disclaimer strong { color: #334155; }

/* Alee AI Content minimal blocks — aligned with Rewriter 2.6.6 direction */
.aacr-highlight,
.aacr-faq-item {
  background: #f6f7f9;
  border-radius: 14px;
  box-shadow: none;
  color: #1f2937;
}
.aacr-highlight {
  padding: 18px 20px;
  margin: 22px 0;
  line-height: 1.7;
  background: #f6f7f9;
  border-radius: 14px;
}
.aacr-soft-summary {
  background: #f6f7f9;
  border-radius: 14px;
}
.aacr-highlight > *:first-child { margin-top: 0; }
.aacr-highlight > *:last-child  { margin-bottom: 0; }
.aacr-highlight h3 {
  font-size: 1.02em;
  font-weight: 700;
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: -.01em;
}
.aacr-highlight p { margin: 0 0 10px; font-size: .98em; }
.aacr-highlight p:last-child { margin-bottom: 0; }
.aacr-highlight ul,
.aacr-highlight ol { margin: 6px 0 0; padding-left: 20px; }
.aacr-highlight li { margin: 4px 0; font-size: .97em; }

.aacr-faq { margin: 28px 0 8px; }
.aacr-faq > h2 {
  font-size: 1.18em;
  font-weight: 700;
  margin: 0 0 14px;
  color: #0f172a;
  letter-spacing: -.01em;
}
.aacr-faq-item {
  padding: 14px 16px;
  margin: 0 0 10px;
}
.aacr-faq-item:last-child { margin-bottom: 0; }
.aacr-faq-q {
  font-weight: 700;
  font-size: .99em;
  color: #0f172a;
  margin: 0 0 6px;
  line-height: 1.55;
}
.aacr-faq-q::before { content: "Q · "; color: #6366f1; font-weight: 700; }
.aacr-faq-a {
  font-size: .96em;
  color: #374151;
  margin: 0;
  line-height: 1.7;
}
.aacr-faq-a::before { content: "A · "; color: #94a3b8; font-weight: 700; }

/* v3.4.0 — Lucky-number box now uses .aacr-highlight + .aacr-lucky
   together. Inline styles in post-processor cover the baseline look
   so the box renders correctly even without this CSS file.
   These rules just add subtle refinements where CSS is available. */
.aacr-lucky {
  width: 100%;
  text-align: left;
}
.aacr-highlight.aacr-lucky {
  background: #f3f4f6;
  border-radius: 10px;
}
.aacr-lucky h3 {
  font-size: 1.05em;
  font-weight: 700;
  margin: 0 0 10px;
  color: #0f172a;
  letter-spacing: -.01em;
}
.aacr-lucky > p {
  margin: 0 0 6px;
  font-size: .98em;
  color: #1f2937;
  line-height: 1.7;
  text-align: left;
}
.aacr-lucky > p:last-child { margin-bottom: 0; }
.aacr-lucky strong {
  color: #334155;
  font-weight: 700;
}
.aacr-lucky .aacr-lucky-nums {
  font-weight: 700;
  color: #0f172a !important;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  font-family: inherit;
}

@media (max-width: 600px) {
  .aacr-highlight { padding: 16px; border-radius: 12px; margin: 18px 0; }
  .aacr-faq-item  { padding: 13px 14px; }
  .aacr-lucky     { padding: 14px 15px; border-radius: 10px; margin: 18px 0; }
  .aacr-lucky > p { font-size: .96em; }
  .aacr-lucky .aacr-lucky-nums { font-size: 1.0em !important; }
}

/* v3.7.1 — Recommended Articles ("เรื่องแนะนำ") box.
 * Pre-3.7.1 had max-width:430px which locked the box to a narrow strip
 * regardless of theme content width. Removed so the box flows with the
 * surrounding article column on every viewport. The inline width style
 * applied at render time in aaic_rec_render_block() (recommended-articles.php)
 * is the plugin-off fallback; this CSS layers theme-friendly styling on top. */
.aacr-related{width:100%;max-width:100%;background:#f6f7f9;border:none;box-shadow:none}
.aacr-related h3{margin:0 0 8px;color:#0f172a}
.aacr-related ul{margin:0;padding-left:18px}
.aacr-related li{margin:0 0 8px;color:#334155}
.aacr-related li:last-child{margin-bottom:0}
.aacr-related a{text-decoration:none}
.aacr-related a:hover{text-decoration:underline}

/* ============================================================
 * v3.3 — Alee Info Image / Inline Infographic Image
 * Lightweight, theme-friendly, mobile-first.
 * ============================================================ */
.alee-info-image {
  max-width: 980px;
  margin: clamp(24px, 5vw, 42px) auto;
}

.alee-info-image img,
.alee-info-image .alee-info-image__img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
  background: #f6f2ea;
}

.alee-info-image figcaption {
  margin-top: 10px;
  color: #64748b;
  font-size: 0.92rem;
  line-height: 1.55;
  text-align: center;
}
