/* Brasao guided order chat widget, matches site brand blues */
:root {
  --brasao-ink: #1B253D;
  --brasao-accent: #366082;
  --brasao-support: #5C8AB0;
  --brasao-surface: #F4F7FA;
}

#brasao-chat-root {
  position: fixed;
  z-index: 999999;
  bottom: 20px;
  right: 20px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  line-height: 1.4;
}

#brasao-chat-root * {
  box-sizing: border-box;
}

.brasao-chat-bubble {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #fff;
  color: #fff;
  border: 3px solid var(--brasao-accent);
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(27, 37, 61, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.brasao-chat-bubble:hover {
  border-color: var(--brasao-support);
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(27, 37, 61, 0.32);
}

.brasao-chat-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brasao-chat-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #C0392B;
  color: #fff;
  border-radius: 50%;
  width: 18px;
  height: 18px;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}

.brasao-chat-panel {
  position: absolute;
  bottom: 74px;
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(27, 37, 61, 0.22);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #E1E8EF;
}

.brasao-chat-panel.brasao-open {
  display: flex;
}

.brasao-chat-header {
  background: var(--brasao-ink);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.brasao-chat-header-title {
  font-weight: 700;
  font-size: 15px;
}

.brasao-chat-header-sub {
  font-size: 12px;
  opacity: 0.75;
  font-weight: 400;
  margin-top: 2px;
}

.brasao-chat-close {
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  opacity: 0.8;
  padding: 4px;
  line-height: 0;
}

.brasao-chat-close:hover {
  opacity: 1;
}

.brasao-chat-close svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.brasao-chat-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: var(--brasao-surface);
}

.brasao-msg {
  max-width: 88%;
  margin-bottom: 10px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  white-space: pre-line;
}

.brasao-msg-bot {
  background: #fff;
  border: 1px solid #E1E8EF;
  color: var(--brasao-ink);
  border-bottom-left-radius: 3px;
}

.brasao-msg-user {
  background: var(--brasao-accent);
  color: #fff;
  margin-left: auto;
  border-bottom-right-radius: 3px;
}

.brasao-choices {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 8px 0 12px;
}

.brasao-choice-btn {
  background: #fff;
  border: 1.5px solid var(--brasao-accent);
  color: var(--brasao-accent);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 13.5px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.brasao-choice-btn:hover:not(:disabled) {
  background: var(--brasao-accent);
  color: #fff;
}

.brasao-choice-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.brasao-choice-row {
  display: flex;
  gap: 6px;
  margin: 8px 0 12px;
  flex-wrap: wrap;
}

.brasao-choice-row .brasao-choice-btn {
  flex: 1 1 auto;
  text-align: center;
}

.brasao-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0 12px;
}

.brasao-form input,
.brasao-form textarea {
  border: 1.5px solid #D6DEE6;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13.5px;
  font-family: inherit;
  width: 100%;
}

.brasao-form input:focus,
.brasao-form textarea:focus {
  outline: none;
  border-color: var(--brasao-accent);
}

.brasao-form label {
  font-size: 11.5px;
  color: var(--brasao-ink);
  opacity: 0.75;
  font-weight: 600;
  margin-bottom: -4px;
}

.brasao-qty-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 12px;
}

.brasao-qty-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1.5px solid var(--brasao-accent);
  background: #fff;
  color: var(--brasao-accent);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.brasao-qty-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--brasao-ink);
  min-width: 24px;
  text-align: center;
}

.brasao-primary-btn {
  background: var(--brasao-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  width: 100%;
}

.brasao-primary-btn:hover:not(:disabled) {
  background: var(--brasao-support);
}

.brasao-primary-btn:disabled {
  opacity: 0.5;
  cursor: default;
}

.brasao-btn-with-icon {
  gap: 8px;
}

.brasao-btn-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  fill: currentColor;
}

.brasao-summary {
  background: #fff;
  border: 1px solid #E1E8EF;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  margin: 8px 0 12px;
}

.brasao-summary-line {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
}

.brasao-summary-total {
  border-top: 1px dashed #D6DEE6;
  margin-top: 6px;
  padding-top: 6px;
  font-weight: 700;
  color: var(--brasao-ink);
}

.brasao-error {
  color: #B3261E;
  font-size: 12.5px;
  margin: 4px 0 8px;
}

.brasao-chat-footer {
  padding: 8px 14px;
  font-size: 10.5px;
  color: var(--brasao-ink);
  opacity: 0.55;
  text-align: center;
  border-top: 1px solid #E1E8EF;
  flex-shrink: 0;
}

@media (max-width: 420px) {
  #brasao-chat-root {
    bottom: 12px;
    right: 12px;
  }
  .brasao-chat-panel {
    width: calc(100vw - 24px);
    height: calc(100vh - 110px);
  }
}
