/* ==========================================================================
   CESURNES — Order dialog (template-parts/order-dialog.php)
   The Collection's and the Pièces uniques' order popup, from the static
   export's inline styles, and the Contact Form 7 form inside it. Loaded on
   both pages, before the page's own stylesheet (functions.php).
   ========================================================================== */

/* The dialog covers the viewport and is the dimmed area: a click on it,
   outside the panel, closes it (order-dialog.js). */
.order-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: clamp(0px, 3vw, 40px);
  border: 0;
  background: transparent;
  color: var(--c-black);
}

.order-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.order-dialog::backdrop { background: rgba(9, 8, 7, .62); }

.order-dialog__panel {
  position: relative;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: 100%;
  overflow-y: auto;
}

.order-dialog__panel[hidden] { display: none; }

.order-dialog__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  font-size: 28px;
  font-weight: 200;
  line-height: 1;
  cursor: pointer;
}

/* -- form ------------------------------------------------------------- */
.order-form {
  gap: clamp(24px, 2.6vw, 34px);
  max-width: 880px;
  padding: clamp(28px, 4vw, 56px);
  background: var(--c-white);
}

.order-form__head {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 44px;
}

.order-form__kicker,
.order-form__meta {
  font-size: 13px;
  line-height: 16px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-terracota);
}

.order-form__title {
  font-size: clamp(30px, 3.4vw, 52px);
  line-height: .95;
  font-weight: 100;
  text-transform: uppercase;
}

.order-form__piece {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 16px 0;
  border-top: 1px solid var(--c-black);
  border-bottom: 1px solid rgba(9, 8, 7, .14);
}

.order-form__photo {
  width: 72px;
  height: 90px;
  object-fit: cover;
  background: #f2efea;
}

.order-form__photo[hidden] { display: none; }

.order-form__summary {
  display: flex;
  flex: 1 1 180px;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.order-form__name {
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 1.1;
  font-weight: 300;
  text-transform: uppercase;
}


/* Quantity (Collection only), as the cards' stepper. */
.order-qty {
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--c-black);
}

.order-qty__btn {
  width: 44px;
  height: 100%;
  font-size: 18px;
  font-weight: 300;
  cursor: pointer;
}

.order-qty__value {
  min-width: 28px;
  font-size: 15px;
  font-weight: 400;
  text-align: center;
}

.order-form__who {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.order-form__who .btn { flex: 1 1 200px; }

.order-form__row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 32px;
}

.order-form__row[hidden] { display: none; }

.order-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.order-form__row .order-field {
  flex: 1 1 240px;
  min-width: 0;
}

.order-field__label {
  font-size: 13px;
  line-height: 16px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-muted);
}

.order-form__star { color: var(--c-terracota); }

/* Underlined fields, no box. */
.order-field__control {
  width: 100%;
  height: 48px;
  padding: 0;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--c-black);
  border-radius: 0;
  color: var(--c-black);
  font: inherit;
  font-size: 16px;
  font-weight: 300;
  outline: none;
}

textarea.order-field__control {
  height: auto;
  padding: 12px 0;
  resize: vertical;
}

.order-form__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
}

/* An <input type="submit">: no font inherited by default. */
.order-form__submit {
  flex: 1 1 240px;
  max-width: 360px;
  font: inherit;
  font-size: var(--fs-btn);
}

.order-form__note {
  flex: 1 1 220px;
  font-size: 14px;
  line-height: 1.5;
  font-weight: 300;
  color: var(--c-muted);
}

/* -- Contact Form 7 --------------------------------------------------- */
/* Its own parts are styled by forms.css; here the form continues the
   panel's column. */
.order-form .wpcf7-form {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 2.6vw, 34px);
}

/* -- thanks ----------------------------------------------------------- */
.order-thanks {
  align-items: center;
  gap: clamp(20px, 2.4vw, 30px);
  max-width: 640px;
  padding: clamp(40px, 6vw, 80px) clamp(28px, 5vw, 64px);
  background: var(--c-terracota);
  color: var(--c-white);
  text-align: center;
}

.order-thanks .order-dialog__close { color: var(--c-white); }

.order-thanks__kicker {
  font-size: 13px;
  line-height: 16px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.order-thanks__title {
  font-size: clamp(32px, 4vw, 60px);
  line-height: .95;
  font-weight: 100;
  text-transform: uppercase;
  text-wrap: balance;
}

.order-thanks__text {
  max-width: 42ch;
  font-size: clamp(15px, 1.2vw, 18px);
  line-height: 1.6;
  font-weight: 300;
  text-wrap: pretty;
}

.order-thanks__continue { min-width: 220px; }
