/* Bar Urca — interface do simulador */
:root {
  color-scheme: light;
  --page: #d8d2c9;
  --chat: #eee7de;
  --header: #075e54;
  --green: #075e54;
  --out: #d9fdd3;
  --in: #ffffff;
  --ink: #17211f;
  --muted: #687875;
  --line: #d5ddd9;
}
* { box-sizing: border-box; }
html, body {
  width: 100%; height: 100%; min-height: 100%;
  margin: 0; padding: 0;
}
body {
  background: var(--page) !important;
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  display: flex !important;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.phone {
  width: min(100%, 460px) !important;
  height: min(94dvh, 900px) !important;
  min-height: 420px;
  margin: auto;
  display: flex !important;
  flex-direction: column;
  overflow: hidden;
  background: var(--chat) !important;
  border-radius: 16px;
  box-shadow: 0 8px 34px rgba(0,0,0,.18);
}
.phone > header {
  flex: 0 0 auto;
  min-height: 68px;
  display: flex !important;
  align-items: center;
  gap: 12px;
  padding: 12px 16px !important;
  background: var(--header) !important;
  color: #fff !important;
}
.phone .av {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: #0b796b;
  color: white; font-weight: 800; font-size: 18px;
}
.phone header b { display: block; font-size: 16px; line-height: 1.3; }
.phone header small { display: block; margin-top: 2px; font-size: 12px; opacity: .85; }
#log {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto;
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 18px 14px;
  background: var(--chat) !important;
  overscroll-behavior: contain;
}
#log .m {
  display: block;
  width: fit-content;
  max-width: 88%;
  margin: 0;
  padding: 10px 12px 7px;
  border-radius: 12px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  box-shadow: 0 1px 1px rgba(0,0,0,.10);
}
#log .m.in {
  align-self: flex-start;
  background: var(--in) !important;
  border-top-left-radius: 3px;
}
#log .m.out {
  align-self: flex-end;
  background: var(--out) !important;
  border-top-right-radius: 3px;
}
#log .m a { color: #087eaa; text-decoration: underline; }
#log .m .t {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  text-align: right;
}
#log .typing { color: var(--muted); font-style: italic; }
#quick {
  flex: 0 0 auto;
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px 5px;
  background: var(--chat) !important;
}
#quick button {
  flex: 0 1 auto;
  min-width: 76px;
  border: 1px solid #b9cbc5 !important;
  border-radius: 20px !important;
  padding: 8px 13px !important;
  background: #fff !important;
  color: var(--green) !important;
  font: 600 13px/1.2 system-ui, sans-serif;
  cursor: pointer;
}
#quick button:hover { background: #e4f3ee !important; }
.phone > form {
  flex: 0 0 auto;
  display: flex !important;
  align-items: center;
  gap: 9px;
  padding: 10px 12px 12px !important;
  background: #f3f3f3 !important;
  border-top: 1px solid rgba(0,0,0,.05);
}
#txt {
  flex: 1 1 auto; min-width: 0; height: 46px;
  border: 0 !important; outline: none;
  border-radius: 24px !important;
  padding: 0 16px !important;
  background: #fff !important;
  color: var(--ink) !important;
  font: 15px system-ui, sans-serif;
}
#send {
  flex: 0 0 46px;
  width: 46px; height: 46px;
  border: 0 !important; border-radius: 50% !important;
  background: #075e54 !important; color: white !important;
  font-size: 19px; cursor: pointer;
}
#send:hover { background: #087567 !important; }
#quick button:focus-visible, #send:focus-visible, #txt:focus-visible {
  outline: 2px solid #25d366; outline-offset: 2px;
}
@media (max-width: 520px) {
  body { display: block !important; }
  .phone {
    width: 100% !important; height: 100dvh !important;
    min-height: 0; max-width: none !important;
    border-radius: 0;
  }
  #log { padding: 14px 11px; }
}
