/* Teamdock Quote Request — the secondary partner of the shop's own "Place order".
   The script copies that button's font, size, corners and colour (matchStyle), so
   the look comes from the shop's theme; this file only sets the layout: one row,
   the quote button left of "Place order", both the same height; stacked on phones. */

.tdq-btn { cursor: pointer; }
.tdq-btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Block checkout: [ Request quote ] [ Place order ] ─────────────────────── */
.td-checkout-action-group {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
  margin-left: auto;
}
/* WooCommerce gives "Place order" width: 50% of its row; inside the group that is
   what made the two buttons wrap onto two lines. */
.td-checkout-action-group > .wc-block-components-checkout-place-order-button {
  flex: 0 1 50%;
  width: auto !important;
  margin: 0 !important;
}

.tdq-btn--block,
.place-order .tdq-btn,
.wc-proceed-to-checkout .tdq-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75em 1.5em;
  border: 1.5px solid var(--tdq-accent, currentColor);
  background: transparent;
  color: var(--tdq-accent, inherit);
  font: inherit;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color .15s ease, color .15s ease;
}
.tdq-btn--block:hover:not(:disabled),
.place-order .tdq-btn:hover:not(:disabled),
.wc-proceed-to-checkout .tdq-btn:hover:not(:disabled) {
  background: var(--tdq-accent, rgba(0, 0, 0, .06)) !important;
  color: var(--tdq-accent-text, inherit) !important;
}
.tdq-btn--block:focus-visible,
.place-order .tdq-btn:focus-visible { outline: 2px solid var(--tdq-accent, currentColor); outline-offset: 2px; }

/* ── Classic checkout: "Place order" floats right, the quote button sits left of it ── */
.place-order .tdq-btn { float: right; width: auto; margin: 0 12px 0 0; min-height: 0; }
/* A "Place order" that fills its row (HCB): the quote button full width under it (1.3.3). */
.place-order .tdq-btn.tdq-btn--under { float: none; display: flex; width: 100%; margin: .75em 0 0; }
.place-order .tdq-status { clear: both; padding-top: .75em; }

/* ── Cart (optional) ─────────────────────────────────────────────────────── */
.wc-proceed-to-checkout .tdq-btn { display: flex; width: 100%; margin-top: .75em; text-align: center; }
.wc-block-cart__submit-container .tdq-btn--block { display: flex; width: 100%; margin-top: .75em; }

/* ── Status line (under the buttons, never between them) ─────────────────── */
.tdq-status { margin-top: .75em; font-size: .95em; line-height: 1.45; text-align: right; }
.tdq-status[hidden] { display: none; }
.tdq-status--success { color: #1e7e34; }
.tdq-status--error { color: #b32d2e; }
.tdq-status--info { color: inherit; }

/* ── Cart form ───────────────────────────────────────────────────────────── */
.tdq-form { margin-top: 1em; padding: 1em; border: 1px solid rgba(0, 0, 0, .12); border-radius: 6px; text-align: left; }
.tdq-form[hidden] { display: none; }
.tdq-form__title { margin: 0 0 .75em; font-weight: 600; }
.tdq-form__field { display: flex; flex-direction: column; gap: .25em; margin-bottom: .75em; font-size: .95em; }
.tdq-form__field input,
.tdq-form__field select,
.tdq-form__field textarea { width: 100%; box-sizing: border-box; }
/* Postcode and city side by side; stacked on a narrow cart column. */
.tdq-form__row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 0 .75em; }
@media (max-width: 400px) { .tdq-form__row { grid-template-columns: 1fr; } }
.tdq-form__actions { display: flex; flex-wrap: wrap; gap: .5em; }
.tdq-form__actions .tdq-btn { width: auto; margin-top: 0; display: inline-block; }
.tdq-btn--plain { background: transparent; }

/* ── Phones: stacked, full width, "Place order" on top ───────────────────── */
@media (max-width: 600px) {
  .td-checkout-action-group { width: 100%; flex-direction: column-reverse; margin-left: 0; }
  .td-checkout-action-group > .wc-block-components-checkout-place-order-button { flex: none; width: 100% !important; }
  .td-checkout-action-group > .tdq-btn--block { width: 100%; }
  .place-order .tdq-btn { float: none; display: flex; width: 100%; margin: .75em 0 0; }
  .tdq-status { text-align: left; }
}
