/* Sri Rama Chatbot: "Cut Coal" look */
.srsbot {
  --coal: #1d1a19;
  --ash: #f3f0ec;
  --ember: #d7263d;
  position: fixed;
  bottom: var(--srsbot-bottom, 120px);
  z-index: 2147482000;
  font-family: inherit;
  color: var(--coal);
}
.srsbot--right { right: 18px; }
.srsbot--left  { left: 18px; }
.srsbot *, .srsbot *::before, .srsbot *::after { box-sizing: border-box; }

/* launcher */
.srsbot-fab {
  width: 58px; height: 58px; padding: 0; border: 0; cursor: pointer;
  display: grid; place-items: center;
  background: var(--ember); color: #fff;
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  transition: background-color .25s ease;
}
.srsbot-fab:hover, .srsbot-fab:focus-visible, .srsbot--open .srsbot-fab { background: var(--coal); outline: none; }
.srsbot svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* window */
.srsbot-win {
  position: absolute; bottom: 70px; width: 372px; max-width: calc(100vw - 36px);
  height: 500px; max-height: calc(100vh - 150px);
  display: flex; flex-direction: column;
  background: #fff;
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 0 100%);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
}
.srsbot--right .srsbot-win { right: 0; }
.srsbot--left  .srsbot-win { left: 0; }
.srsbot-win[hidden] { display: none; }

.srsbot-head {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 16px 30px 16px 22px; background: var(--coal); color: #fff; position: relative;
}
.srsbot-head::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 5px; background: var(--ember); }
.srsbot-head strong { display: block; font-size: 16px; font-weight: 700; line-height: 1.2; color: #fff; }
.srsbot-head > div:first-child span { display: block; font-size: 12px; opacity: .75; margin-top: 2px; }
.srsbot-tools { display: flex; align-items: center; gap: 4px; }
.srsbot-tools button {
  background: none; border: 0; color: #fff; cursor: pointer; font: inherit; font-size: 12px;
  padding: 6px 8px; opacity: .8;
}
.srsbot-tools .srsbot-close { font-size: 24px; line-height: 1; padding: 2px 8px; }
.srsbot-tools button:hover, .srsbot-tools button:focus-visible { opacity: 1; outline: none; text-decoration: underline; }

/* messages */
.srsbot-log { flex: 1; overflow-y: auto; padding: 18px 16px 8px; background: #fff; display: flex; flex-direction: column; gap: 12px; }
.srsbot-msg { max-width: 88%; font-size: 15px; line-height: 1.55; }
.srsbot-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.srsbot-text a { color: inherit; text-decoration: underline; }
.srsbot-bot {
  align-self: flex-start; background: var(--ash); color: var(--coal);
  padding: 12px 16px 12px 18px; position: relative;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}
.srsbot-bot::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ember); }
.srsbot-user {
  align-self: flex-end; background: var(--coal); color: #fff; padding: 12px 16px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
}
.srsbot-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.srsbot-act {
  display: block; text-align: center; padding: 10px 12px; font-size: 14px; font-weight: 600;
  background: var(--coal); color: #fff !important; text-decoration: none !important;
  transition: background-color .2s ease;
}
.srsbot-act:hover, .srsbot-act:focus-visible { background: var(--ember); outline: none; }

/* typing dots */
.srsbot-typing { display: flex; gap: 5px; padding: 14px 18px; }
.srsbot-typing span { width: 7px; height: 7px; background: var(--coal); opacity: .35; animation: srsbotDot 1.1s infinite ease-in-out; }
.srsbot-typing span:nth-child(2) { animation-delay: .15s; }
.srsbot-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes srsbotDot { 0%, 80%, 100% { opacity: .25; transform: none; } 40% { opacity: 1; transform: translateY(-3px); } }

/* quick questions */
.srsbot-chips { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 10px; background: #fff; }
.srsbot-chips:empty { display: none; }
.srsbot-chip {
  text-align: left; padding: 10px 14px; font: inherit; font-size: 14px; cursor: pointer;
  background: #fff; color: var(--coal); border: 1px solid #d9d3cd; transition: border-color .2s, background-color .2s;
}
.srsbot-chip:hover, .srsbot-chip:focus-visible { border-color: var(--ember); background: var(--ash); outline: none; }

/* input */
.srsbot-form { display: flex; border-top: 1px solid #e6e1db; background: #fff; }
.srsbot-form input {
  flex: 1; min-width: 0; border: 0; padding: 16px 16px; font: inherit; font-size: 15px; background: transparent; color: var(--coal); border-radius: 0;
}
.srsbot-form input:focus { outline: none; box-shadow: inset 0 -3px 0 var(--ember); }
.srsbot-form button {
  width: 58px; border: 0; cursor: pointer; background: var(--coal); color: #fff; display: grid; place-items: center; transition: background-color .2s;
}
.srsbot-form button:hover:not(:disabled), .srsbot-form button:focus-visible { background: var(--ember); outline: none; }
.srsbot-form button:disabled { opacity: .5; cursor: default; }

/* phones */
@media (max-width: 480px) {
  .srsbot--right { right: 10px; }
  .srsbot--left  { left: 10px; }
  .srsbot-win { width: calc(100vw - 20px); max-width: none; height: min(78vh, 560px); }
  .srsbot--right .srsbot-win { right: 0; }
  .srsbot--left  .srsbot-win { left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .srsbot *, .srsbot *::before, .srsbot *::after { animation: none !important; transition: none !important; }
}

/* ---------- voice mode ---------- */
.srsbot-tools .srsbot-voicebtn[aria-expanded="true"] { opacity: 1; text-decoration: underline; }
.srsbot-voice {
  position: absolute; left: 0; right: 0; top: 100%; z-index: 5;
  background: var(--ash); color: var(--coal); padding: 16px 20px 14px 24px;
  box-shadow: 0 12px 24px rgba(0, 0, 0, .18);
}
.srsbot-voice::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--ember); }
.srsbot-voice[hidden] { display: none; }
.srsbot-voice label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 12px; }
.srsbot-voice output { float: right; font-weight: 500; color: #5a534f; }
.srsbot-voice select {
  display: block; width: 100%; margin-top: 5px; padding: 8px 10px; font: inherit; font-size: 13px;
  background: #fff; color: var(--coal); border: 1px solid #cfc8c1; border-radius: 0;
}
.srsbot-voice input[type=range] { display: block; width: 100%; margin-top: 6px; accent-color: var(--ember); }
.srsbot-voice .srsbot-check { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.srsbot-voice .srsbot-check input { width: 18px; height: 18px; accent-color: var(--ember); flex: none; margin: 0; }
.srsbot-vrow { display: flex; gap: 8px; }
.srsbot-vrow button {
  flex: 1; padding: 9px 10px; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  border: 0; background: var(--coal); color: #fff; transition: background-color .2s;
}
.srsbot-vrow button:hover, .srsbot-vrow button:focus-visible { background: var(--ember); outline: none; }
.srsbot-vnote { margin: 10px 0 0; font-size: 12px; line-height: 1.45; color: #7a2a2a; display: none; }
.srsbot-voice select:focus-visible, .srsbot-voice input:focus-visible { outline: 3px solid var(--ember); outline-offset: 2px; }

.srsbot-listen {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 4px 0;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 12.5px; font-weight: 600; color: #5a534f;
}
.srsbot-listen svg { width: 16px; height: 16px; }
.srsbot-listen:hover, .srsbot-listen:focus-visible, .srsbot-listen.is-on { color: var(--ember); outline: none; }
.srsbot-listen.is-on span::after { content: "…"; }

.srsbot-status {
  display: none; padding: 8px 16px; font-size: 13px; line-height: 1.4; background: var(--ash); color: var(--coal);
  border-top: 1px solid #e6e1db;
}

.srsbot-form .srsbot-mic {
  width: 52px; background: #fff; color: var(--coal); border-left: 1px solid #e6e1db;
}
.srsbot-form .srsbot-mic:hover:not(:disabled), .srsbot-form .srsbot-mic:focus-visible { background: var(--ash); color: var(--ember); }
.srsbot-form .srsbot-mic.is-on { background: var(--ember); color: #fff; animation: srsbotPulse 1.2s infinite; }
@keyframes srsbotPulse { 0%, 100% { box-shadow: inset 0 0 0 0 rgba(255, 255, 255, .0); } 50% { box-shadow: inset 0 0 0 4px rgba(255, 255, 255, .35); } }
