/* Meu Portal · 06 — orçamentos do bot
   Editor de orçamento, montador de cálculo e o modal de teste. */

/* ── Orçamentos do bot ─────────────────────────────────────────────── */
.quote-modal-box { max-width: 900px; }
.quote-intro {
  margin: 0 0 1rem;
  padding: .7rem .85rem;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a5f;
  font-size: .8rem;
  line-height: 1.5;
}
.quote-block {
  border: 1px solid var(--border,#e5e7eb);
  border-radius: 10px;
  background: var(--surface-alt,#f9fafb);
  padding: .85rem .9rem;
  margin-bottom: 1rem;
}
.quote-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}
.quote-block-head strong { font-size: .9rem; }
.quote-block-hint { margin: .15rem 0 .7rem; color: #6b7280; font-size: .77rem; line-height: 1.45; }
.quote-card {
  border: 1px solid var(--border,#e5e7eb);
  border-radius: 10px;
  background: #fff;
  padding: .7rem .75rem;
  margin-bottom: .6rem;
}
.quote-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .55rem;
}
.quote-card-top small { color: #6b7280; font-size: .74rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.quote-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.quote-grid .span-2 { grid-column: span 2; }
.quote-field { display: grid; gap: .3rem; min-width: 0; }
.quote-field label { font-size: .76rem; font-weight: 700; color: #374151; }
.quote-field input, .quote-field select {
  width: 100%;
  border: 1px solid var(--border,#e5e7eb);
  border-radius: 8px;
  padding: .5rem .6rem;
  background: #fff;
  color: #111827;
  font: inherit;
  font-size: .85rem;
  min-width: 0;
}
.quote-opt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 34px;
  gap: .45rem;
  align-items: center;
  margin-bottom: .4rem;
}
.quote-opt-hint { margin: .45rem 0 0; color: #6b7280; font-size: .74rem; line-height: 1.45; }
.quote-warn {
  margin: .55rem 0 0;
  padding: .55rem .7rem;
  border: 1px solid #fde68a;
  border-radius: 10px;
  background: #fffbeb;
  color: #92400e;
  font-size: .77rem;
  line-height: 1.45;
}
.quote-formula-note { margin-top: .5rem; font-size: .74rem; font-weight: 400; color: #6b7280; line-height: 1.45; }
.quote-mini-btn {
  border: 1px solid var(--border,#e5e7eb);
  background: #fff;
  border-radius: 8px;
  padding: .3rem .6rem;
  font-size: .76rem;
  cursor: pointer;
  color: #374151;
  white-space: nowrap;
}
.quote-mini-btn:hover { background: #f3f4f6; }
.quote-mini-btn.danger { color: #b91c1c; border-color: #fecaca; }
.quote-mini-btn.danger:hover { background: #fef2f2; }
.quote-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  flex-wrap: wrap;
  margin-top: 1.1rem;
}
.quote-error {
  margin: .75rem 0 0;
  padding: .6rem .8rem;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: .8rem;
  line-height: 1.45;
}
/* Montador de cálculo (cadeia de blocos × ÷ dentro da linha; linhas somadas) */
.quote-chain { display: grid; gap: .45rem; margin-top: .55rem; }
.quote-factor-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 34px;
  gap: .45rem;
  align-items: center;
}
.quote-factor-row .quote-op-slot { display: flex; justify-content: center; }
.quote-op {
  width: 100%;
  max-width: 64px;
  border: 1px solid var(--border,#e5e7eb);
  border-radius: 8px;
  padding: .45rem .3rem;
  background: #fff;
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  text-align: center;
  color: #0f766e;
}
.quote-op-first {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .72rem;
  color: #9ca3af;
  font-weight: 700;
}
.quote-factor-main { display: grid; gap: .35rem; min-width: 0; }
.quote-factor-main select,
.quote-factor-main input {
  width: 100%;
  border: 1px solid var(--border,#e5e7eb);
  border-radius: 8px;
  padding: .5rem .6rem;
  background: #fff;
  font: inherit;
  font-size: .85rem;
  min-width: 0;
}
.quote-sum-sep {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  margin: .15rem 0 .6rem;
  color: #0f766e;
  font-size: .8rem;
  font-weight: 700;
}
.quote-sum-sep::before, .quote-sum-sep::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border,#e5e7eb);
}
.quote-formula {
  margin-top: .75rem;
  padding: .65rem .8rem;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: #f8fafc;
  color: #0f172a;
  font-size: .82rem;
  line-height: 1.55;
  word-break: break-word;
}
.quote-formula strong { color: #0f766e; }
/* Modal de teste do cálculo */
.quote-test-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; margin-bottom: .9rem; }
.quote-result-card {
  border: 1px solid #bbe3cd;
  border-radius: 12px;
  background: #f2fbf6;
  padding: .9rem 1rem;
  margin-top: 1rem;
}
.quote-result-total { margin: 0 0 .55rem; font-size: 1.02rem; color: #14532d; }
.quote-result-total strong { font-size: 1.25rem; }
.quote-result-lines { margin: 0 0 .6rem; padding-left: 1.1rem; color: #1f2937; font-size: .85rem; line-height: 1.6; }
.quote-result-basis { margin: 0; color: #4b5563; font-size: .78rem; line-height: 1.5; }
.quote-result-note { margin: .45rem 0 0; color: #6b7280; font-size: .77rem; font-style: italic; }
.quote-test-warn {
  border: 1px solid #fde68a;
  border-radius: 12px;
  background: #fffbeb;
  color: #92400e;
  padding: .8rem .9rem;
  margin-top: 1rem;
  font-size: .82rem;
  line-height: 1.55;
  white-space: pre-line;
}
@media (max-width: 680px) {
  .quote-grid { grid-template-columns: 1fr; }
  .quote-grid .span-2 { grid-column: auto; }
  .quote-test-fields { grid-template-columns: 1fr; }
  .quote-opt-row { grid-template-columns: minmax(0, 1fr) 96px 34px; }
  .quote-modal-foot { justify-content: stretch; }
  .quote-modal-foot .cta { flex: 1 1 auto; text-align: center; }
}
