/* =========================================================================
 * Order confirmation — the page a buyer lands on after paying.
 *
 * It used to be the parent theme's fallback: two lines of WooCommerce text in
 * a container with no padding, so the headline touched the header and the
 * footer began a sentence later. WooCommerce's blocks still carry the order
 * data (and the payment gateway's instructions); this file gives them the
 * same section rhythm, cards and type scale as the rest of the site.
 * ========================================================================= */

.biota-orderdone__main {
	background-color: var(--wp--preset--color--base);
}

/* --- The status band ------------------------------------------------------ */
.biota-orderdone__top {
	text-align: center;
}
.biota-orderdone__badge {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 7px 15px 7px 8px;
	border-radius: 999px;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	margin-bottom: 16px;
}
.biota-orderdone__mark {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	color: #fff;
	background-color: var(--wp--preset--color--success);
}
.biota-orderdone__badge--wait .biota-orderdone__mark { background-color: var(--wp--preset--color--star); }
.biota-orderdone__badge--end .biota-orderdone__mark  { background-color: var(--wp--preset--color--sale); }
.biota-orderdone__eyebrow {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-strong);
}

/* WooCommerce prints the headline and lead here, and swaps both when the order
   is cancelled or refunded, so the theme styles them rather than replacing. */
.biota-orderdone__status h1,
.biota-orderdone__status h2 {
	font-size: clamp(26px, 4vw, 38px);
	line-height: 1.15;
	margin: 0 0 10px;
	text-wrap: balance;
}
.biota-orderdone__status p {
	color: var(--wp--preset--color--text-muted);
	max-width: 54ch;
	margin: 0 auto 8px;
	line-height: 1.6;
}
.biota-orderdone__status p:last-child { margin-bottom: 0; }
.biota-orderdone__status a { color: var(--wp--preset--color--action); }

/* The gateway prints payment instructions into this block. On an unpaid order
   that is the most important thing on the page, so it gets a panel. */
.biota-orderdone__status .woocommerce-order-overview,
.biota-orderdone__status .wc-xendit-payment-instructions,
.biota-orderdone__status ul.order_details {
	list-style: none;
	margin: 18px auto 0;
	padding: 18px 20px;
	max-width: 620px;
	text-align: left;
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 14px;
}

/* --- Cards ---------------------------------------------------------------- */
.biota-orderdone .biota-section__inner {
	max-width: 760px;
	display: flex;
	flex-direction: column;
	gap: 18px;
}
.biota-orderdone__card {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--border);
	border-radius: 18px;
	padding: 24px;
}
.biota-orderdone__cardh {
	font-size: 16px;
	font-weight: 600;
	margin: 0 0 14px;
}

/* --- What happens next ---------------------------------------------------- */
.biota-orderdone__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.biota-orderdone__steps li {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	margin: 0;
}
.biota-orderdone__num {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-weight: 700;
	color: var(--wp--preset--color--action);
	background-color: var(--wp--preset--color--surface-selected);
}
.biota-orderdone__steptext {
	font-size: 14px;
	line-height: 1.55;
	color: var(--wp--preset--color--text-muted);
}
/* Only the step's title is a line of its own. Bold inside the sentence -- the
   courier name, for instance -- has to stay inline, which an unscoped
   `b { display: block }` broke into three lines. */
.biota-orderdone__stepname {
	display: block;
	color: var(--wp--preset--color--text);
	font-weight: 600;
}
.biota-orderdone__steptext b {
	color: var(--wp--preset--color--text);
	font-weight: 600;
}
.biota-orderdone__em {
	color: var(--wp--preset--color--text);
	font-weight: 500;
	word-break: break-word;
}
.biota-orderdone__help {
	margin-top: 18px;
	padding-top: 15px;
	border-top: 1px solid var(--wp--preset--color--border);
	font-size: 13px;
	color: var(--wp--preset--color--text-muted);
}
.biota-orderdone__helplink {
	color: var(--wp--preset--color--whatsapp);
	font-weight: 600;
	margin-left: 4px;
}

/* --- Order details: WooCommerce's own tables ------------------------------ */
.biota-orderdone__details table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.biota-orderdone__details th,
.biota-orderdone__details td {
	padding: 11px 0;
	border-bottom: 1px solid var(--wp--preset--color--border);
	text-align: left;
	vertical-align: top;
}
.biota-orderdone__details td:last-child,
.biota-orderdone__details th:last-child {
	text-align: right;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.biota-orderdone__details tfoot tr:last-child th,
.biota-orderdone__details tfoot tr:last-child td {
	border-bottom: 0;
	font-weight: 700;
	font-size: 15px;
	padding-top: 14px;
}
/* The summary block is a definition list of order number, date, total, method. */
.biota-orderdone__details .wc-block-order-confirmation-summary-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 28px;
	list-style: none;
	margin: 0 0 18px;
	padding: 0 0 16px;
	border-bottom: 1px solid var(--wp--preset--color--border);
	font-size: 13px;
	color: var(--wp--preset--color--text-muted);
}
.biota-orderdone__details .wc-block-order-confirmation-summary-list-item__key {
	display: block;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--wp--preset--color--text-subtle);
	margin-bottom: 2px;
}
.biota-orderdone__details .wc-block-order-confirmation-summary-list-item__value {
	color: var(--wp--preset--color--text);
	font-weight: 600;
}

/* --- Addresses ------------------------------------------------------------ */
.biota-orderdone__addr {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 18px;
	align-items: stretch;
}
.biota-orderdone__addr address,
.biota-orderdone__addr p {
	font-style: normal;
	font-size: 14px;
	line-height: 1.6;
	color: var(--wp--preset--color--text-muted);
	margin: 0;
}

/* --- Footer of the page --------------------------------------------------- */
.biota-orderdone__actions {
	justify-content: center;
	gap: 10px;
	margin-top: 4px;
}
.biota-orderdone__trust {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 20px;
	font-size: 12.5px;
	color: var(--wp--preset--color--text-muted);
}

@media (max-width: 700px) {
	.biota-orderdone__addr { grid-template-columns: 1fr; }
	.biota-orderdone__card { padding: 20px 18px; }
	.biota-orderdone .biota-section__inner { gap: 14px; }
}

/* Without a valid order key WooCommerce prints one paragraph and no heading,
   so that paragraph is the page's headline and has to read like one. With a
   key it prints an h1 and this rule stands down. */
.biota-orderdone__status .wc-block-order-confirmation-status:not(:has(h1)) > p:first-child {
	font-family: var(--wp--preset--font-family--heading, 'Poppins', sans-serif);
	font-size: clamp(22px, 3.2vw, 30px);
	font-weight: 600;
	line-height: 1.2;
	color: var(--wp--preset--color--text);
	max-width: 22ch;
	text-wrap: balance;
	margin-bottom: 12px;
}
.biota-orderdone__status .wc-block-order-confirmation-status-description a.button {
	display: inline;
	background: none;
	padding: 0;
	color: var(--wp--preset--color--action);
	font: inherit;
	text-decoration: underline;
}

/* WooCommerce decides for itself whether to print a buyer's order details --
   a guest opening the link later has to confirm their email first, and until
   they do, those blocks render nothing. A card that is only a heading looks
   like a page that failed, so a card shows only once something is inside it.
   Listing the elements the blocks actually emit (table, list, address) is what
   makes this self-correcting: the card appears exactly when it has content. */
.biota-orderdone__card:not(:has(table, address, ul, ol, dl, p, form)) {
	display: none;
}

/* WooCommerce boxes its address blocks. Inside a card that is a border within
   a border, so the card keeps the frame and the block drops it. */
.biota-orderdone__addr .wp-block-woocommerce-order-confirmation-shipping-address,
.biota-orderdone__addr .wp-block-woocommerce-order-confirmation-billing-address {
	border: 0;
	padding: 0;
	margin: 0;
}

/* The two closing actions read as a pair, so they are sized as one. The
   outline variant is a 14px rounded rectangle elsewhere by design; here it
   takes the site's default pill and the fill button's metrics, and both get
   the same width so neither looks like the lesser option. */
.biota-orderdone__actions .wp-block-button {
	flex: 0 1 240px;
	max-width: 100%;
}
.biota-orderdone__actions .wp-block-button .wp-block-button__link,
.biota-orderdone__actions .wp-block-button.biota-btn--outline .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 59px;
	padding: 18px 28px;
	border-radius: 999px;
	font-size: 16px;
	text-align: center;
}

/* On a paid order the steps card is gone and the help line stands alone, so
   the rule and spacing that separated it from the list above come off. */
.biota-orderdone__help:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: 0;
}

/* Reduced to a single line of help, the card should look intentional rather
   than like a section that failed to render, so it loses the deep padding a
   card with a heading and a list needs. */
.biota-orderdone__next:not(:has(h2)) {
	padding: 15px 20px;
}
