/* Elizabet M — the free photo-quote form.
 *
 * Everything here is scoped to #pqform on purpose. The two pages that carry this form share almost
 * nothing: /carpet-sofa-mattress/ is self-contained (tokens.css plus its own inline styles, no
 * site.css at all) while /nl/tapijt-bank-matras/ loads the shared stylesheet. A form styled with the
 * shared .mech/.field classes therefore rendered as raw browser defaults on the English page — no
 * card, no grid, unstyled inputs.
 *
 * So the form brings its own styling and wins by ID specificity wherever site.css also has an
 * opinion. Only design tokens are assumed, and only ones both pages define.
 */

#pqform {
  background: var(--surface, #fff);
  border: 1px solid var(--line, #E1E7DA);
  border-radius: var(--r-xl, 22px);
  box-shadow: var(--sh, 0 18px 44px -22px rgba(22, 38, 26, .22));
  padding: 26px;
  max-width: 760px;
  margin: 0 auto;
  text-align: left;
}
@media (max-width: 560px) { #pqform { padding: 20px 17px } }

#pqform .qform { display: grid; gap: 15px; grid-template-columns: 1fr 1fr }
#pqform .qform > .full { grid-column: 1 / -1 }
@media (max-width: 560px) { #pqform .qform { grid-template-columns: 1fr } }

#pqform .field { display: flex; flex-direction: column; gap: 7px; min-width: 0 }
#pqform .field > label { font: 700 13.5px/1.4 var(--body, system-ui, sans-serif); color: var(--ink, #16261A) }
#pqform input[type=text],
#pqform input[type=email],
#pqform input[type=tel],
#pqform input:not([type]),
#pqform textarea {
  font: 500 15px/1.5 var(--body, system-ui, sans-serif);
  padding: 12px 14px;
  border: 1.5px solid var(--line, #E1E7DA);
  border-radius: 12px;
  background: #fff;
  color: var(--ink, #16261A);
  width: 100%;
  min-height: 46px;
}
#pqform textarea { resize: vertical; min-height: 84px }
#pqform input:focus-visible, #pqform textarea:focus-visible {
  outline: 3px solid var(--blue-d, #1F5FA8); outline-offset: 2px; border-color: var(--blue-d, #1F5FA8);
}
#pqform ::placeholder { color: #93A08E }

/* What needs cleaning — a fixed list, so the label that reaches Odoo is ours rather than free text. */
#pqform .pchips { display: flex; flex-wrap: wrap; gap: 8px }
#pqform .pchips label {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1.5px solid var(--line, #E1E7DA); border-radius: 22px; padding: 9px 15px;
  font: 600 13.5px/1 var(--body, system-ui, sans-serif); color: var(--ink, #16261A);
  background: #fff; cursor: pointer; min-height: 44px;
  transition: border-color .15s, background .15s, color .15s;
}
#pqform .pchips input { width: 16px; height: 16px; flex: none; margin: 0; accent-color: var(--green-d, #3F7A20) }
#pqform .pchips label:has(input:checked) {
  border-color: var(--green-d, #3F7A20); background: rgba(111, 178, 59, .1); color: var(--green-ink, #356B1E);
}
#pqform .pchips label:focus-within { outline: 3px solid var(--blue-d, #1F5FA8); outline-offset: 2px }

/* The photos. Square tiles so a portrait and a landscape shot sit in the same grid without reflowing
   it, and a thumbnail large enough to tell two similar photos apart before removing one. */
#pqform .pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(94px, 1fr)); gap: 9px }
#pqform .pslot {
  position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line, #E1E7DA); background: var(--bg, #F5F8EF);
}
#pqform .pslot img { width: 100%; height: 100%; object-fit: cover; display: block }
#pqform .pslot .rm {
  position: absolute; top: 5px; right: 5px; width: 28px; height: 28px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(22, 38, 26, .74); color: #fff;
  font: 700 16px/28px var(--body, system-ui, sans-serif); cursor: pointer;
}
#pqform .pslot .rm:hover { background: #8B2E1A }
#pqform .pslot .rm:focus-visible { outline: 3px solid #fff; outline-offset: -1px }
#pqform .padd {
  aspect-ratio: 1; width: 100%; padding: 8px;
  border: 2px dashed var(--line, #E1E7DA); border-radius: 12px; background: var(--bg, #F5F8EF);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  cursor: pointer; color: var(--green-ink, #356B1E);
  font: 700 12px/1.3 var(--body, system-ui, sans-serif); text-align: center;
  transition: border-color .15s, background .15s;
}
#pqform .padd svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round }
#pqform .padd:hover { border-color: var(--green-d, #3F7A20); background: #fff }
#pqform .padd:focus-visible { outline: 3px solid var(--blue-d, #1F5FA8); outline-offset: 2px }
#pqform .pnote { color: var(--muted, #5C6B57); font-size: 12.5px; line-height: 1.5; margin-top: 2px; display: block }

/* Missed something. A required field can be reddened directly; a missing photo has no field to
   redden, so the add tile takes the treatment instead. */
#pqform.invalid-shown :invalid { border-color: #c0392b; background: #fdf6f5 }
#pqform.invalid-shown .field:has(:invalid) > label { color: #c0392b }
#pqform.invalid-shown .pgrid[data-empty="1"] + .pfile + .pnote,
#pqform.invalid-shown .pgrid[data-empty="1"] .padd {
  border-color: #c0392b; background: #fdf6f5; color: #8B2E1A;
}

#pqform .qmsg { margin: 14px 0 0; padding: 13px 15px; border-radius: 12px; font-size: 14.5px; line-height: 1.55 }
#pqform .qmsg:empty { display: none }
#pqform .qmsg.err { background: #fdf6f5; border: 1px solid #E7C3BD; color: #8B2E1A }
#pqform .qmsg.okm { background: #F1F7EC; border: 1px solid #D3E2C4; color: #2C5A18 }

/* The form is replaced by this once it has gone through — leaving a filled-in form on screen invites
   a second submission, and the only question the customer has left is "did that work?" */
.qsent {
  background: var(--surface, #fff); border: 1px solid var(--line, #E1E7DA);
  border-radius: var(--r-xl, 22px); box-shadow: var(--sh, 0 18px 44px -22px rgba(22, 38, 26, .22));
  padding: 34px 28px; max-width: 760px; margin: 0 auto; text-align: center;
}
.qsent h3 { font-size: 23px; margin: 0 0 10px }
.qsent p { color: var(--muted, #5C6B57); margin: 0 auto; max-width: 46ch; line-height: 1.6 }
.qsent .tick {
  width: 54px; height: 54px; border-radius: 50%; background: rgba(111, 178, 59, .14);
  color: var(--green-d, #3F7A20); display: grid; place-items: center; margin: 0 auto 16px;
}
.qsent .tick svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round }

@media (prefers-reduced-motion: reduce) { #pqform *, .qsent * { transition: none !important } }
