/* A completion panel beside a quiet receipt, using native WooCommerce blocks.
   Status icons are supplied only when Woo passes an authorized order to its
   title filter. Verification screens never receive a success decoration. */
.bhq-order-page .bhq-intro { margin-bottom: 1.75rem; }
.bhq-order-page .bhq-intro .bhq-steps { margin-top: 1rem; }
.bhq-order-page .bhq-confirmation-grid {
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); align-items: stretch;
  gap: 1rem; padding: 1rem; border: 1px solid var(--wp--preset--color--line);
  border-radius: max(var(--bhq-card-radius), 24px); background: var(--wp--preset--color--white);
  box-shadow: 0 22px 65px #192d4408;
}
.bhq-order-page .bhq-completion-panel {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: clamp(1.5rem, 3.5vw, 3rem); gap: 2rem; min-width: 0; text-align: center;
}
.bhq-order-page .bhq-completion-message { width: 100%; margin: 0; }
.bhq-order-page .bhq-verification-title { margin: 0 0 1rem; font-size: clamp(1.875rem, 3vw, 2.5rem); }
.bhq-order-page .bhq-completion-panel .wc-block-order-confirmation-status h1 {
  display: flex; flex-direction: column; align-items: center; gap: 2rem;
  margin: 0 0 1rem; font-size: clamp(1.875rem, 3vw, 2.5rem); line-height: 1.2;
}
.bhq-order-page .bhq-order-symbol {
  display: grid; place-items: center; flex-shrink: 0; width: 88px; height: 88px; margin: 1rem;
  border-radius: 50%; background: var(--wp--preset--color--navy);
  box-shadow: 0 0 0 12px var(--wp--preset--color--surface), 0 14px 32px #192d4414;
}
.bhq-order-page .bhq-order-symbol::before {
  content: ''; width: 42px; height: 42px; background: var(--wp--preset--color--orange);
  mask: url('../icons/receipt.svg') center / contain no-repeat;
}
.bhq-order-page .bhq-order-symbol--complete::before { mask-image: url('../icons/check.svg'); }
.bhq-order-page .bhq-order-symbol--pending { background: var(--wp--preset--color--sand); box-shadow: 0 0 0 12px #f49e1e0c, 0 14px 32px #192d4408; }
.bhq-order-page .bhq-order-symbol--pending::before { background: var(--wp--preset--color--navy); mask-image: url('../icons/clock.svg'); }
.bhq-order-page :is(.bhq-order-symbol--failed, .bhq-order-symbol--cancelled) { background: #fff1ed; box-shadow: 0 0 0 12px #fff8f5; }
.bhq-order-page :is(.bhq-order-symbol--failed, .bhq-order-symbol--cancelled)::before { background: #a63434; mask-image: url('../icons/close.svg'); }
.bhq-order-page .bhq-order-symbol--refunded::before { mask-image: url('../icons/back.svg'); }
.bhq-order-page .bhq-completion-message :is(.wc-block-order-confirmation-status, .wc-block-order-confirmation-status-description) > p {
  font-size: .9375rem; line-height: 1.75; color: var(--wp--preset--color--muted); margin: 0;
}
.bhq-order-page .bhq-payment-status {
  display: flex; align-items: flex-start; gap: .875rem; margin-top: 1.25rem; padding: 1.125rem;
  border: 1px solid var(--wp--preset--color--orange); border-inline-start-width: 4px; border-radius: 12px;
  background: var(--wp--preset--color--sand); color: var(--wp--preset--color--navy);
  font-size: .875rem; line-height: 1.6; text-align: start;
}
.bhq-order-page .bhq-payment-status__icon {
  display: grid; place-items: center; flex: 0 0 32px; height: 32px; border-radius: 50%;
  background: var(--wp--preset--color--orange); color: var(--wp--preset--color--navy);
}
.bhq-order-page .bhq-payment-status__icon::before {
  content: ''; width: 20px; height: 20px; background: currentColor; mask: url('../icons/clock.svg') center / contain no-repeat;
}
.bhq-order-page .bhq-payment-status__copy { display: block; min-width: 0; }
.bhq-order-page .bhq-payment-status__title { display: block; margin: .125rem 0 .375rem; font-family: var(--wp--preset--font-family--heading); font-size: 1rem; font-weight: 700; line-height: 1.4; }
.bhq-order-page .bhq-payment-status__detail { display: block; }
.bhq-order-page .bhq-completion-panel .bhq-next-steps {
  width: 100%; max-width: 320px; padding: 0; margin: 0; border: 0; background: transparent; box-shadow: none;
}
.bhq-order-page .bhq-completion-panel .bhq-next-steps .wp-block-buttons { margin: 0; gap: .75rem; }
.bhq-order-page .bhq-completion-panel .bhq-next-steps .wp-block-button__link { min-height: 44px; font-size: .875rem; }
.bhq-order-page .bhq-completion-panel .is-style-outline .wp-block-button__link { background: var(--wp--preset--color--surface); color: var(--wp--preset--color--navy); }
.bhq-order-page .wc-block-order-confirmation-status__actions {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .625rem; margin-top: 1.25rem !important;
}
.bhq-order-page .wc-block-order-confirmation-status__actions .button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px;
  padding: .625rem 1rem; border: 1px solid var(--wp--preset--color--line); border-radius: var(--bhq-button-radius);
  font-family: var(--wp--preset--font-family--body); font-size: .875rem; font-weight: 500;
  color: var(--wp--preset--color--navy); background: var(--wp--preset--color--orange); text-decoration: none;
}
.bhq-order-page .bhq-order-summary-stack {
  gap: 1.75rem; padding: clamp(1.25rem, 2.5vw, 2rem); border: 1px solid var(--wp--preset--color--line);
  border-radius: var(--bhq-card-radius); background: var(--wp--preset--color--surface);
}
.bhq-order-page .bhq-order-summary-stack :is(.bhq-order-meta, .wp-block-woocommerce-order-confirmation-totals-wrapper, .wp-block-woocommerce-order-confirmation-downloads-wrapper) {
  padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
.bhq-order-page .bhq-order-summary-stack h2 { font-size: 1.125rem; margin: 0 0 1.25rem; }
.bhq-order-page .bhq-order-meta > h2 { display: flex; align-items: center; gap: .625rem; }
.bhq-order-page .bhq-order-meta > h2::before {
  content: ''; display: block; width: 22px; height: 22px; flex-shrink: 0;
  background: var(--bhq-icon-color); mask: url('../icons/receipt.svg') center / contain no-repeat;
}
.bhq-order-page .bhq-confirmation-grid .wc-block-order-confirmation-summary-list { gap: 1rem 1.5rem; }
.bhq-order-page table.wc-block-order-confirmation-totals__table { border-collapse: separate; border-spacing: 0; margin: 0; }
.bhq-order-page table.wc-block-order-confirmation-totals__table :is(th, td) { padding: .875rem .5rem; vertical-align: middle; }
.bhq-order-page table.wc-block-order-confirmation-totals__table tr > :last-child { text-align: end; }
.bhq-order-page table.wc-block-order-confirmation-totals__table tbody a { font-weight: 500; text-decoration: none; }
.bhq-order-page table.wc-block-order-confirmation-totals__table tbody a:hover { text-decoration: underline; }
.bhq-order-page table.wc-block-order-confirmation-totals__table tfoot tr:last-child :is(th, td) { padding: 1.125rem 1.25rem; line-height: 1.3; vertical-align: middle; }
.bhq-order-page table.wc-block-order-confirmation-totals__table tfoot tr:last-child th { border-radius: 12px 0 0 12px; }
.bhq-order-page table.wc-block-order-confirmation-totals__table tfoot tr:last-child td { border-radius: 0 12px 12px 0; white-space: nowrap; font-size: 1.5rem; }
.bhq-order-page .bhq-order-detail-stack { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; margin-top: 1.5rem; }
.bhq-order-page .bhq-order-detail-stack h2 { font-size: 1.125rem; margin-top: 0; }
.bhq-order-page .bhq-order-detail-stack > * { min-width: 0; margin: 0; }
.bhq-order-page .bhq-order-detail-stack > :only-child { grid-column: 1 / -1; }
.bhq-order-page .bhq-order-detail-stack:empty { display: none; }
/* Saved templates can still put the details inside the receipt frame. Keep
   those cards stacked; the two-column detail grid above is for the new frame's
   separate billing/instructions section. Never replace saved editor content. */
.bhq-order-page .bhq-confirmation-grid:has(> .bhq-order-detail-stack) { align-items: start; }
.bhq-order-page .bhq-confirmation-grid > .bhq-order-detail-stack { display: flex; flex-direction: column; margin: 0; align-self: start; }
.bhq-order-page .bhq-order-meta { container-type: inline-size; }
@container (max-width: 380px) {
  .bhq-order-page .bhq-confirmation-grid .wc-block-order-confirmation-summary-list { grid-template-columns: minmax(0, 1fr); }
}
/* An older saved introduction contains the native status above the receipt. */
.bhq-order-page .bhq-intro .wc-block-order-confirmation-status h1 { display: flex; align-items: center; gap: 1rem; }
.bhq-order-page .bhq-intro .bhq-order-symbol { width: 52px; height: 52px; margin: 0; box-shadow: none; }
.bhq-order-page .bhq-intro .bhq-order-symbol::before { width: 28px; height: 28px; }
.bhq-order-page .bhq-intro .bhq-payment-status { max-width: 680px; }
/* If Woo requires verification, only its status/verification panel is shown.
   Keep its forms intact; do not expose an empty receipt or completed icon. */
.bhq-order-page .bhq-order-summary-stack:not(:has(.wc-block-order-confirmation-summary-list, .wc-block-order-confirmation-totals)) { display: none; }
.bhq-order-page .bhq-confirmation-grid:not(:has(.wc-block-order-confirmation-summary-list)) { grid-template-columns: 1fr; }
.bhq-order-page .bhq-confirmation-grid:not(:has(.wc-block-order-confirmation-summary-list)) .bhq-completion-panel { max-width: 640px; justify-self: center; }
@media (max-width: 780px) {
  .bhq-order-page .bhq-confirmation-grid { grid-template-columns: minmax(0, 1fr); padding: .75rem; }
  .bhq-order-page .bhq-completion-panel { padding: 2rem 1rem 1.5rem; gap: 1.5rem; }
  .bhq-order-page .bhq-completion-panel .wc-block-order-confirmation-status h1 { gap: 1.5rem; }
  .bhq-order-page .bhq-order-detail-stack { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 400px) {
  .bhq-order-page .bhq-order-summary-stack { padding: 1rem; }
  .bhq-order-page .bhq-confirmation-grid .wc-block-order-confirmation-summary-list { grid-template-columns: 1fr; }
  .bhq-order-page table.wc-block-order-confirmation-totals__table tfoot tr:last-child :is(th, td) { padding-inline: .75rem; }
  .bhq-order-page table.wc-block-order-confirmation-totals__table tfoot tr:last-child td { font-size: 1.25rem; }
}
@media (forced-colors: active) {
  .bhq-order-page .bhq-order-symbol { border: 2px solid currentColor; box-shadow: none; }
  .bhq-order-page .bhq-order-symbol::before { background: CanvasText; }
  .bhq-order-page .bhq-payment-status { border-color: CanvasText; }
  .bhq-order-page .bhq-payment-status__icon::before { background: CanvasText; }
}
