/* «Cotizaciones» of a deal (Jace #3154): the card of the deal's page, the
   form with its table of services, and the quote's page. Numbers align to
   the right; the table scrolls inside its card on a phone, so the page never
   scrolls sideways. */
.deal-quotes li, .company-documents .deal-quotes__item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.deal-quotes__head { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.deal-quotes__code { font-weight: 600; }

.quote-form { max-width: 980px; }
.quote-form [hidden] { display: none; }
/* A fieldset grows to its content by default: the table of services would
   push the page sideways on a phone. */
.quote-form fieldset { min-width: 0; }
.quote-form .form-row { align-items: start; }
.quote-form__lines { margin-top: 8px; }
.quote-form__add { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.quote-form__add select { flex: 1 1 220px; min-width: 0; max-width: 420px; }

.quote-lines .quote-line__number,
.quote-lines .quote-line__amount { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.quote-line__input { width: 110px; text-align: right; }
.quote-line__service strong { overflow-wrap: anywhere; }
.quote-line__remove { width: 1%; }

.quote-totals { display: grid; gap: 4px; justify-content: end; margin: 16px 0; }
.quote-totals__row { display: flex; justify-content: space-between; gap: 24px; font-variant-numeric: tabular-nums; }
.quote-totals__row[hidden] { display: none; }
.quote-totals__row dt { color: var(--muted-foreground); }
.quote-totals__row dd { margin: 0; text-align: right; }
.quote-totals__row--total { font-weight: 700; font-size: 16px; }
.quote-totals__row--total dt { color: inherit; }

.quote__header { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px 24px; margin: 0 0 16px; }
.quote__header dt { color: var(--muted-foreground); font-size: 13px; }
.quote__header dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.quote__texts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.quote__texts h2 { font-size: 15px; margin: 0 0 6px; }
.quote__texts p { overflow-wrap: anywhere; }
/* The column's hidden name stays inside its scrolling table on a phone, so
   the page never scrolls sideways. */
.quote-form .table-wrap,
.quote .table-wrap { position: relative; }
/* Its groups read as the other fields, without a border, and «Con IVA /
   Sin IVA» as the short-option pills of the bug form. */
.form .quote-form__group { position: relative; margin: 0; border: 0; padding: 0; }
.form .quote-form__group legend { padding: 0; margin-bottom: 6px; color: var(--creation-ink); font-weight: 600; }
.quote-form__pills .choice-pill { position: relative; display: inline-flex; align-items: center; min-height: 40px; border: 0; border-radius: 999px; padding: 8px 16px; background: var(--surface-stone); color: var(--creation-ink); font-size: 14px; font-weight: 500; cursor: pointer; }
.quote-form__pills .choice-pill:has(input:checked) { background: var(--surface-mint); color: var(--ink-teal); font-weight: 700; }
.quote-form__pills + small { display: block; margin-top: 6px; }

/* A closed quote (Jace #3155): what went to the customer, which nobody
   changes. */
.quote__closed {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  border-radius: var(--radius);
  background: var(--tone-success-bg);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--tone-success-ink);
}

.quote__closed svg { width: 16px; height: 16px; flex: none; }
