/* ================================================================
   ELIOR ENERGY · COTIZACIÓN
   Formulario público (POST /api/v1/forms/quotes). Mismo lenguaje visual
   que PQRS; usa los tokens de compartido/paleta-global.css.
   ================================================================ */

body[data-page="cotizacion"] {
  background: var(--surface);
  color: var(--ink);
}

.quote-page {
  padding: clamp(18px, 2.4vw, 28px) 0 clamp(32px, 4vw, 56px);
}
.quote-page__content {
  max-width: 790px;
}
.quote-page h1 {
  margin: 0 auto 8px;
  color: var(--prussian);
  font-size: var(--title-page);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.12;
  text-align: center;
}
.quote-page__lead {
  max-width: var(--measure);
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 16px;
  text-align: center;
}
.quote-page__alt {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}
.quote-page__alt a {
  color: var(--prussian-soft);
  font-weight: 700;
}

/* ---------- Producto elegido ---------- */
.quote-product {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 18px;
  padding: 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.quote-product[hidden] {
  display: none;
}
.quote-product__media {
  display: grid;
  width: 96px;
  height: 96px;
  place-items: center;
  overflow: hidden;
  background: var(--surface);
  border-radius: 10px;
}
.quote-product__media img {
  width: 100%;
  height: 100%;
  padding: 6px;
  object-fit: contain;
}
.quote-product__media.is-empty img {
  display: none;
}
.quote-product__media.is-empty::after {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  content: "Sin imagen";
}
.quote-product__body {
  display: grid;
  min-width: 0;
  gap: 4px;
  align-content: start;
}
.quote-product__brand {
  color: var(--prussian-soft);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.quote-product__name {
  margin: 0;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.quote-product__name a {
  color: inherit;
}
.quote-product__name a:hover {
  color: var(--prussian-soft);
  text-decoration: underline;
}
.quote-product__meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.quote-product__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 6px;
}
.quote-product__qty {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}
.quote-product__qty input {
  width: 76px;
  min-height: 40px;
  padding: 0 8px;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.quote-product__remove,
.quote-product__retry {
  min-height: 40px;
  padding: 0 4px;
  color: var(--prussian-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  background: none;
  border: 0;
  cursor: pointer;
}
.quote-product__notice {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}
.quote-product--notice {
  grid-template-columns: minmax(0, 1fr);
}

/* ---------- Formulario ---------- */
.quote-card {
  padding: clamp(22px, 5vw, 44px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.quote-card[hidden] {
  display: none;
}
#quote-form {
  display: grid;
  gap: 18px;
}
.quote-field {
  display: grid;
  gap: 8px;
}
.quote-field label {
  color: var(--prussian-soft);
  font-size: 13px;
  font-weight: 700;
}
.quote-field input,
.quote-field textarea {
  width: 100%;
  min-height: 53px;
  padding: 0 15px;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
}
.quote-field textarea {
  min-height: 150px;
  padding: 14px 15px;
  line-height: 1.55;
  resize: vertical;
}
.quote-field input::placeholder,
.quote-field textarea::placeholder {
  color: var(--muted);
}
.quote-field input:focus-visible,
.quote-field textarea:focus-visible,
.quote-product__qty input:focus-visible {
  border-color: var(--prussian-soft);
  outline: 3px solid rgb(7 87 122 / 25%);
  outline-offset: 1px;
}
.quote-field [aria-invalid="true"] {
  border-color: var(--danger);
}
.quote-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.5;
}
.quote-terms input {
  width: 24px;
  height: 24px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--prussian-soft);
}
.quote-terms a {
  color: var(--prussian-soft);
  font-weight: 700;
}
.quote-terms input:focus-visible,
.quote-page a:focus-visible,
.quote-page button:focus-visible {
  outline: 3px solid var(--prussian-soft);
  outline-offset: 2px;
}
.quote-submit {
  min-height: 54px;
  color: #142000;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  background: var(--lime-fill);
  border: 2px solid var(--lime-edge);
  border-radius: 12px;
  cursor: pointer;
}
.quote-submit:hover:not(:disabled) {
  background: var(--lime-fill-hover);
  border-color: var(--lime-edge);
}
.quote-submit:disabled {
  color: var(--muted);
  background: var(--surface);
  border-color: var(--border);
  cursor: progress;
}
.quote-feedback {
  min-height: 1.4em;
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}
.quote-feedback:focus {
  outline: none;
}
.quote-feedback--error {
  color: var(--danger);
  font-weight: 700;
}

/* ---------- Confirmación ---------- */
.quote-success {
  padding: clamp(24px, 5vw, 44px);
  text-align: center;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
}
.quote-success:focus {
  outline: none;
}
.quote-success h2 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
}
.quote-success p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.55;
}
.quote-success__code {
  display: inline-block;
  margin: 6px 0 14px;
  padding: 8px 16px;
  color: var(--prussian);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--surface);
  border-radius: 10px;
}
.quote-success__items {
  margin: 0 0 18px;
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  list-style: none;
}
.quote-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.quote-success__actions a {
  display: inline-flex;
  min-height: 48px;
  padding: 0 22px;
  align-items: center;
  color: var(--prussian);
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  border: 2px solid var(--prussian);
  border-radius: 12px;
}
.quote-success__actions a:hover {
  color: var(--bg);
  background: var(--prussian);
}

@media (max-width: 560px) {
  .quote-product {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 12px;
    padding: 12px;
  }
  .quote-product__media {
    width: 72px;
    height: 72px;
  }
}
