/* [09:05:52] V9 Realtime-First Voice Assistant (public/styles.css) */
:root{
  --kyocera-red:#E2001A;
  --dark:#1f2430;
  --muted:#6c7486;
  --bg:#f6f7fb;
  --card:#ffffff;
  --border:#e7e9f1;
  --shadow:0 8px 20px rgba(0,0,0,.06);
  --radius:16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  --sans: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--sans);
  background:var(--bg);
  color:var(--dark);
}

.topbar{
  position:sticky; top:0;
  z-index:10;
  background:var(--card);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:12px 16px;
}

.brand{display:flex; align-items:center; gap:12px}
.logo{
  width:38px; height:38px;
  border-radius:12px;
  background:var(--kyocera-red);
  color:#fff;
  display:grid;
  place-items:center;
  font-weight:800;
}
.titles .title{font-weight:750}
.titles .subtitle{color:var(--muted); font-size:12px; margin-top:2px}

.controls{display:flex; align-items:end; gap:10px; flex-wrap:wrap}
.ctrl{display:flex; flex-direction:column; gap:6px; font-size:12px; color:var(--muted)}
.ctrl select{
  height:34px;
  border:1px solid var(--border);
  border-radius:10px;
  padding:0 10px;
  background:#fff;
  color:var(--dark);
}

.btn{
  height:36px;
  padding:0 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background:#fff;
  color:var(--dark);
  cursor:pointer;
  box-shadow:none;
}
.btn.primary{
  background:var(--dark);
  border-color:var(--dark);
  color:#fff;
}
.btn.accent{
  background:var(--kyocera-red);
  border-color:var(--kyocera-red);
  color:#fff;
}
.btn:disabled{opacity:.55; cursor:not-allowed}

.grid{
  display:grid;
  grid-template-columns: 1.35fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap:14px;
  padding:14px;
}
@media (max-width: 980px){
  .grid{grid-template-columns:1fr; grid-template-rows:auto}
}

.panel{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  min-height:300px;
}
.panelHead{
  padding:12px 14px;
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.panelTitle{font-weight:700}

.pills{display:flex; gap:8px; flex-wrap:wrap}
.pill{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid var(--border);
  color:var(--muted);
  background:#fff;
}

.chat{
  padding:14px;
  display:flex;
  flex-direction:column;
  gap:10px;
  overflow:auto;
}
.msg{
  max-width:85%;
  border-radius:16px;
  padding:10px 12px;
  border:1px solid var(--border);
  background:#fff;
  line-height:1.35;
}
.msg.user{align-self:flex-end; border-color:#dbe1ff; background:#f5f7ff}
.msg.assistant{align-self:flex-start; border-color:#e7e9f1; background:#fff}
.msg.meta{align-self:center; font-size:12px; color:var(--muted); border:none; background:transparent; padding:0}

.pre{
  margin:0;
  padding:12px 14px;
  font-family:var(--mono);
  font-size:12px;
  color:#202534;
  overflow:auto;
  white-space:pre-wrap;
  word-break:break-word;
  flex:1;
}

.footer{
  border-top:1px solid var(--border);
  background:var(--card);
  padding:10px 14px;
}
.footerInfo{
  font-size:12px;
  color:var(--muted);
  font-family:var(--mono);
}

/* [08:18:00] V2.4 Markdown styling (styles.css) */
.msg.assistant .bubble { line-height: 1.35; }
.msg.assistant .bubble p { margin: 0 0 .5rem 0; }
.msg.assistant .bubble ul,
.msg.assistant .bubble ol { margin: .25rem 0 .5rem 1.1rem; padding: 0; }
.msg.assistant .bubble li { margin: .15rem 0; }
.msg.assistant .bubble a { text-decoration: underline; }
.msg.assistant .bubble code { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; }

/* 15:30:00 v2.0 Markdown HTML spacing fix */
.msg.assistant.trainer .trainer-text p { margin: 0 0 8px 0; }
.msg.assistant.trainer .trainer-text p:last-child { margin-bottom: 0; }

.msg.assistant.trainer .trainer-text ol,
.msg.assistant.trainer .trainer-text ul { margin: 6px 0 8px 20px; padding: 0; }

.msg.assistant.trainer .trainer-text li { margin: 2px 0; }

.msg.assistant.trainer .trainer-text h1,
.msg.assistant.trainer .trainer-text h2,
.msg.assistant.trainer .trainer-text h3,
.msg.assistant.trainer .trainer-text h4,
.msg.assistant.trainer .trainer-text h5,
.msg.assistant.trainer .trainer-text h6 { margin: 8px 0 6px 0; }

/* Base pill */
.pill {
  min-width: 74px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  box-sizing: border-box;
}

/* Connection pill */
#pillConn.online {
  background: #dff7ea;
  color: #0f5132;
  border: 1px solid #8ed9b6;
}

#pillConn.offline {
  background: #1e3a34;
  color: #e6fff3;
  border: 1px solid rgba(255,255,255,0.18);
}

/* Mic pill (app.js uses cls 'ok' when mic is enabled, and 'bad' when mic is off) */
#pillRec.ok {
  background: #e8f9f0;
  color: #0f5132;
  border: 1px solid #9fe0c4;
  box-shadow: none;
}

#pillRec.bad {
  background: #5a1f1f;
  color: #ffecec;
  border: 1px solid rgba(255,255,255,0.18);
  box-shadow: none;
}
