/*
Theme Name: Midlab Demo
Description: Small classic theme for the Midlab chatbot demo.
Version: 0.1.0
Requires PHP: 8.3
*/
:root { --ink: #22303c; --muted: #5d6b78; --paper: #f4f6f7; --line: #dfe5e9; --navy: #05496e; --blue: #0a7fa8; --green: #3f9c35; --radius: 14px; }
* { box-sizing: border-box; }
body { margin: 0; font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink); background: var(--paper); }
a { color: var(--navy); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.wrap { width: min(1100px, 100% - 32px); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 14px 0; }
.brand { font-weight: 800; font-size: 1.5rem; text-decoration: none; margin-right: auto; }
.brand-logo img { display: block; max-height: 56px; width: auto; }
.brand-logo { margin-right: auto; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 18px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-weight: 600; font-size: .95rem; }
.button { display: inline-block; padding: 10px 20px; border: 1px solid var(--navy); border-radius: 999px; background: var(--navy); color: #fff; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.button.is-ghost { background: transparent; color: var(--navy); }

.hero { margin: 20px auto; padding: clamp(32px, 7vw, 80px) clamp(20px, 5vw, 56px); border-radius: var(--radius); background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; }
.hero p { margin: 0; max-width: 46ch; }
.hero.is-slim { padding-block: 32px; }
.hero a { color: #fff; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; min-width: 0; }
.ask-panel { border-top: 4px solid var(--green); }
.ask-panel h2 { font-size: 1.35rem; margin-bottom: 4px; }
.ask-panel > p { margin: 0 0 14px; color: var(--muted); font-size: .92rem; }
.midlab-chat-inline, .midlab-chat-page, .mc-panel, .mc-launcher { --mc-accent: var(--navy); }

.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 44px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 20px; }
.chips a { display: block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: #fff; text-decoration: none; font-size: .9rem; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; margin-bottom: 32px; align-content: start; }
.card { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; text-align: center; text-decoration: none; color: var(--ink); }
.card:hover, .card:focus-visible { border-color: var(--blue); }
.card-cat { color: var(--green); font-size: .75rem; font-weight: 700; margin-top: 10px; }
.card-name { font-weight: 700; }
.card-meta { color: var(--muted); font-size: .85rem; }
/* The label shows through when a product has no image or it fails to load. */
.media { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 10px; background: #f0f4f6; color: var(--muted); font-size: .85rem; }
.media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; }

.with-aside { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 24px; align-items: start; }
.crumbs { font-size: .85rem; color: var(--muted); margin: 20px 0 10px; }
.product-main { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 28px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 8px 24px; margin: 0 0 16px; }
.facts div { min-width: 0; }
.facts dt { display: inline; font-weight: 700; }
.facts dt::after { content: ": "; }
.facts dd { display: inline; margin: 0; }
.docs { display: flex; flex-wrap: wrap; gap: 10px; }

.ask-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 20px; margin-block: 20px; }
.ask-side { background: var(--navy); color: #fff; border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.ask-side button { text-align: left; padding: 10px 14px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: rgba(255,255,255,.1); color: #fff; font: inherit; cursor: pointer; }
.ask-side a { color: #fff; }
.ask-side .ask-phone { margin-top: auto; }
.ask-layout .midlab-chat-page { height: min(75vh, 780px); }

.site-footer { margin-top: 48px; padding: 28px 0; background: var(--navy); color: #fff; font-size: .9rem; }
.site-footer a { color: #fff; }

@media (max-width: 800px) {
  .with-aside, .product-main, .ask-layout { grid-template-columns: minmax(0, 1fr); }
  .site-nav { order: 3; width: 100%; }
}
