/* The theme's own additions to the design's styles (assets/css, copied from the preview). */

/* WordPress's admin bar (shown to signed-in staff) sits over the top of the page: the sticky header
   stops below it. Under 600 px the bar scrolls away with the page, so the header goes back to the top. */
body.admin-bar > .header { top: var(--wp-admin--admin-bar--height, 32px); }
@media (max-width: 600px) {
  body.admin-bar > .header { top: 0; }
}

/* Plain pages (the policies, My account and paying for an order again, until their designs are ported). */
.lovento-page-content { max-width: 920px; margin-inline: auto; }

/* ---- Phase 4: what the preview's bag and checkout had no need for ---------------------------- */

/* WooCommerce's messages (a changed bag, a missing field, a declined payment), as the design's notices. */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-error, .woocommerce-message, .woocommerce-info, .woocommerce-NoticeGroup .woocommerce-error {
  list-style: none; margin: 24px 0; padding: 12px 16px; border-left: 2px solid var(--accent);
  background: var(--soft); color: var(--ink); font-size: 12px; line-height: 1.6;
}
body[data-floral="true"] :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) { border-radius: 0 14px 14px 0; }
.woocommerce-error { border-left-color: #a12d45; }
.woocommerce-error li + li { margin-top: 4px; }
.woocommerce-notices-wrapper, main > .woocommerce-NoticeGroup { max-width: 1260px; margin-inline: auto; }
.woocommerce-message a.button, .woocommerce-info a.button { float: right; margin-left: 12px; padding: 4px 14px; font-size: 11px; }

/* The ways to pay, each in the design's notice box; a single one shows without its round button. */
.lovento-payment-methods { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.lovento-payment-methods > li { border-left: 2px solid var(--accent); background: var(--soft); padding: 10px 15px; font-size: 12px; color: var(--muted); }
body[data-floral="true"] .lovento-payment-methods > li { border-radius: 0 14px 14px 0; }
.lovento-payment-methods label { color: var(--ink); font-weight: 600; cursor: pointer; }
.lovento-payment-methods input[type="radio"] { margin: 0 8px 0 0; accent-color: var(--accent); }
.lovento-payment-methods .payment_box { margin-top: 6px; }
.lovento-payment-methods .payment_box p { margin: 0; }
.lovento-payment-methods img { max-height: 22px; vertical-align: middle; margin-left: 6px; }
.woocommerce-checkout-payment .place-order { margin: 0; }
.woocommerce-terms-and-conditions-wrapper { font-size: 11px; color: var(--muted); }
.woocommerce-terms-and-conditions-wrapper p { margin: 6px 0; }
.woocommerce-terms-and-conditions-wrapper label { display: flex; gap: 8px; align-items: baseline; color: var(--ink); font-size: 12px; }
.woocommerce-terms-and-conditions-wrapper .required { text-decoration: none; color: var(--accent); }
.woocommerce-terms-and-conditions { max-height: 200px; overflow: auto; padding: 10px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }

/* The summary's delivery: several ways offered as a short list under its line; none, a note. */
.delivery-options { list-style: none; margin: -6px 0 12px; padding: 0; display: grid; gap: 6px; font-size: 12px; }
.delivery-options li { display: flex; align-items: center; gap: 8px; }
.delivery-options input { margin: 0; accent-color: var(--accent); }
.delivery-options label { flex: 1; display: flex; justify-content: space-between; gap: 10px; cursor: pointer; }
.summary-note { margin: -6px 0 14px; font-size: 11px; color: #a12d45; }
/* While WooCommerce works out the delivery, its veil sits on the summary's sums. */
.woocommerce-checkout-review-order-table { position: relative; }

/* The order received page: the order's facts, its items, the gift card and where it is going. */
.confirmation-order { max-width: 520px; margin: 26px auto 28px; padding-top: 20px; border-top: 1px solid var(--line); text-align: left; }
.confirmation-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 12px; margin: 0 0 8px; }
.confirmation-facts dt, .confirmation-more small { display: block; font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); }
.confirmation-facts dd { margin: 3px 0 0; font-size: 13px; color: var(--ink); }
.confirmation-order .checkout-item img { width: 46px; height: 46px; object-fit: cover; }
.confirmation-more p { margin: 12px 0 0; font-size: 12px; }
.confirmation-more small { margin-bottom: 3px; }
.confirmation.is-failed .button { margin-top: 18px; }

/* Checking it's you before an order's page is shown again (checkout/form-verify-email.php). */
.lovento-verify form { max-width: 380px; margin: 22px auto 0; text-align: left; }
.lovento-verify .button { margin-top: 16px; width: 100%; justify-content: center; }
.empty .woocommerce-error { text-align: left; max-width: 560px; margin-inline: auto; }

/* ---- Phase 5: plain pages (the policies, and pages staff add) in the design's type --------------- */
.lovento-page-content { font-size: 14px; line-height: 1.75; color: var(--ink); }
.lovento-page-content > :first-child { margin-top: 0; }
.lovento-page-content h2 { font-family: var(--serif); font-weight: 400; font-size: 30px; line-height: 1.2; margin: 38px 0 12px; }
.lovento-page-content h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; line-height: 1.25; margin: 28px 0 8px; }
.lovento-page-content p, .lovento-page-content ul, .lovento-page-content ol, .lovento-page-content table { margin: 0 0 14px; }
.lovento-page-content ul, .lovento-page-content ol { padding-left: 22px; }
.lovento-page-content li + li { margin-top: 4px; }
.lovento-page-content a:not(.button) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.lovento-page-content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.lovento-page-content th, .lovento-page-content td { padding: 9px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.lovento-page-content blockquote { margin: 18px 0; padding: 4px 0 4px 18px; border-left: 2px solid var(--accent); color: var(--muted); }

/* ---- Phase 6: your account ------------------------------------------------------------------- */
/* Without scripts the sign-in dialog cannot open: its forms show on the page instead. */
html:not(.js) .account-dialog { display: block; position: static; inset: auto; margin: 0 auto 60px; transform: none; opacity: 1; }
html:not(.js) .account-dialog .lovento-dialog-close { display: none; }
.account-dialog .woocommerce-error, .account-dialog .woocommerce-message, .account-dialog .woocommerce-info { margin: 0 0 16px; }
.account-dialog .woocommerce-privacy-policy-text p { margin: 0 0 12px; font-size: 11px; color: var(--muted); }
.account-pages { display: flex; gap: 22px; justify-content: space-between; margin-top: 22px; }
.account-form + .account-appearance { margin-top: 34px; }
.account-form .text-link { margin-left: 16px; }

/* Saved addresses (inc/addresses.php). The account's cards are the preview's (site.css .address-card).
   At checkout the same cards are the choices above "Where the gift is going", shown once scripts run,
   since picking one fills in the fields; the whole card is the choice. */
.address-add-form { display: contents; }
.address-card.address-add { cursor: pointer; }
.address-choices { display: none; }
.js .address-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; min-width: 0; margin: 0 0 22px; padding: 0; border: 0; }
.address-choice { position: relative; display: block; padding: 16px 18px; cursor: pointer; transition: border-color .2s ease, box-shadow .2s ease; }
.address-choice input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.address-choice-lines { display: block; margin-top: 8px; line-height: 1.6; }
.address-choice:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.address-choice:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 3px; }
.address-choice-new { display: grid; place-items: center; min-height: 88px; border-style: dashed; color: var(--accent); font-size: 14px; }
.address-save { display: flex; gap: 10px; align-items: center; margin: 18px 0 0; font-size: 13px; color: var(--ink); cursor: pointer; }
.address-save[hidden] { display: none; }
.address-save input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.address-form .address-save { margin: 0 0 6px; }
.address-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 0; margin-top: 18px; }
.address-actions .button { margin-top: 0; }
.address-delete { margin-left: auto; padding: 0; border: 0; background: none; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.address-delete:hover, .address-delete:focus-visible { color: var(--accent); }
/* The account's forms draw their dropdowns as the checkout's do (shop-flow.css): the design's arrow
   only, and "Choose a state" quiet until one is chosen. */
.account-form .form-grid select { appearance: none; -webkit-appearance: none; padding-right: 42px; }
.account-form .form-grid select:invalid { color: var(--muted); }

/* The footer's four columns (Shop, Help, Lovento, Policies); two by two on narrower screens. */
body[data-direction] footer.site-footer .footer-nav { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) {
	body[data-direction] footer.site-footer .footer-nav { grid-template-columns: 1fr 1fr; }
}

/* The policies (inc/policies.php), in the FAQ's two columns: beside the words, the four policies as its
   topic pills and "On this page"; on a phone, its cards and a folding "On this page". */
.policy .site-head .policy-meta { margin-top: 12px; font-size: 12px; letter-spacing: .02em; color: var(--muted); }
.policy-contents { margin-top: 26px; padding: 18px 0 0 16px; border-top: 1px solid var(--line); }
.policy-contents .eyebrow { display: block; margin-bottom: 8px; color: var(--accent); }
.policy-contents ol, .policy-contents-phone ol { margin: 0; padding: 0; list-style: none; counter-reset: policy; }
.policy-contents li, .policy-contents-phone li { counter-increment: policy; }
.policy-contents a, .policy-contents-phone a { display: flex; gap: 10px; padding: 5px 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); text-decoration: none; }
.policy-contents a::before, .policy-contents-phone a::before { content: counter(policy, decimal-leading-zero); flex: none; padding-top: 2px; font-size: 10px; letter-spacing: .12em; color: var(--accent); }
.policy-contents a:hover, .policy-contents-phone a:hover { color: var(--accent); }
.policy-contents-phone { display: none; }
.policy-body { max-width: 720px; margin-inline: 0; }
.policy-section { scroll-margin-top: calc(var(--lv-header-h, 0px) + 24px); }
.policy-section + .policy-section { margin-top: 30px; padding-top: 28px; border-top: 1px dashed var(--line); }
.policy-body h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 12px; }
.policy-num { flex: none; font: 600 11px/1 'Lovento Sans', Arial, sans-serif; letter-spacing: .16em; color: var(--accent); }
.tbc.is-alone { margin-left: 0; }
.policy-help { margin-top: 44px; padding: 22px 26px; border: 1px dashed var(--accent); border-radius: 18px; background: var(--surface); }
.policy-body .policy-help-title { margin: 0 0 6px; font-family: var(--serif); font-size: 22px; line-height: 1.25; }
.policy-help p:last-child { margin: 0; }
@media (max-width: 860px) {
	.policy-contents { display: none; }
	.policy-contents-phone { display: block; margin: 0 0 26px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
	.policy-contents-phone summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink); }
	.policy-contents-phone ol { margin-top: 10px; }
	.policy-postcard .faq-topic { border-style: dashed; border-color: var(--petal-line, var(--line)); }
	.policy-postcard .faq-topic.active { border-color: var(--accent); }
}
/* The plain pages' headings at their own sizes (the floral look's h2 and h3 sizes are for page heads). */
body[data-floral] .lovento-page-content h2 { font-size: 30px; letter-spacing: -.3px; }
body[data-floral] .lovento-page-content h3 { font-size: 22px; letter-spacing: normal; }
/* "On this page" reads as a list, not as the menu's capitals (link-breeze.js marks lone links "ui"). */
body[data-direction] :is(.policy-contents, .policy-contents-phone) a[href][data-link] { text-transform: none; letter-spacing: normal; font-weight: 400; }
:is(.policy-contents, .policy-contents-phone) lv-bloom { display: none; }
/* Beside the words, the column scrolls within the screen when it is taller than it. */
@media (min-width: 861px) {
	.policy-nav { max-height: calc(100vh - var(--lv-header-h, 0px) - 48px); overflow-y: auto; scrollbar-width: thin; margin: -4px; padding: 4px; }
}

/* Your addresses: Delivery addresses and Billing address, each its own section (19 November). */
.address-section + .address-section { margin-top: 48px; }
/* Ways to pay that are coming (woocommerce/checkout/payment.php): under the real ones, quieter, with
   the design's tag, and nothing to choose. */
.lovento-payment-methods > li.lovento-payment-soon { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-left: 2px dashed var(--line); background: transparent; color: var(--muted); }
.lovento-payment-soon-name { font-weight: 600; }
.lovento-payment-soon .tbc { flex: none; margin-left: 0; }
/* A policy's tables scroll on their own on a small screen, never the page. */
.policy-body figure.wp-block-table { margin: 0 0 16px; overflow-x: auto; }
.policy-body table th { font-weight: 600; }

/* The policies in English and Bahasa Malaysia (inc/policies.php): one language shown at a time, and
   the English | Bahasa Malaysia switch under the title. */
.policy[data-policy-lang="en"] [data-lang="ms"], .policy[data-policy-lang="ms"] [data-lang="en"] { display: none !important; }
.policy-langs { display: inline-flex; gap: 4px; margin: 4px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 99px; background: var(--surface); }
.policy-langs a { padding: 7px 14px; border-radius: 99px; font-size: 11px; line-height: 1.2; color: var(--ink); text-decoration: none; }
.policy-langs a:hover { color: var(--accent); }
.policy-langs a[aria-current="true"] { background: var(--accent); color: #fff; }
.policy-langs lv-bloom { display: none; }

/* The sign-in and review windows move focus to their title when they open or change view, so a screen reader
   says where you are. A title isn't something to press, so it shows no ring: the account page opens the
   sign-in window by itself, and after a fresh page load Chrome drew its black ring around "Sign in" (Jin Hao,
   19 November). Tab goes on to the fields, which keep the design's ring. */
#account-dialog-title:focus, #review-composer-title:focus { outline: none; }

/* Your account (inc/account.php): the menu lines up under the page's heading. The design's page heading keeps
   its 6% side padding at every width, but from 1600 px wide a section's stops at 70 px (styles.css), so on wide
   windows the menu sat left of "Hello, …": 26 px at 1600, 45 px at 1920 (Jin Hao's screenshots, 19 November).
   Both are 6% of the same full-width page, so they now match at every width. */
.account-postcard .account-layout { padding-inline: 6%; }

/* Your orders, with none yet (the design has no such page): the note keeps its distance from the button. */
.account-main > .subtle + .button { margin-top: 18px; }

/* Saved cards (woocommerce/myaccount/payment-methods.php, Jin Hao, 20 November): the Addresses page's cards.
   A card's links share one row: Make default, then Remove, quieter. */
.saved-card-actions { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; }
.saved-card-actions .saved-card-remove { color: var(--muted); }
.saved-card-actions .saved-card-remove:is(:hover, :focus-visible) { color: var(--accent); }
/* Add a card (form-add-payment-method.php): the checkout's ways to pay, then Save card and the way back. */
.add-card #add_payment_method, .add-card #add_payment_method + .subtle { max-width: 640px; }
.add-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 18px; }
.add-card-actions .button { margin-top: 0; }
.add-card #add_payment_method + .subtle { margin-top: 18px; }

/* The same on every page with a heading over sections: from 1600 px the design's sections stop at 70 px sides
   while headings keep 6%, so content started left of its heading (26 px at 1600, 45 px at 1920) on the shop,
   Questions & answers, Reviews, the policies and Track your order (measured 19 November). Sections keep 6% too.
   The homepage has no such sections, and the product page's are centred, so neither moves. */
@media (min-width: 1600px) { .section { padding-inline: 6%; } }

/* Normal Delivery's name at checkout (inc/delivery.php, Jin Hao 20 November): an asterisk, and what it means on
   hovering or focusing it, as a popover from the name (lovento-motion.css rules: from 0.95 at its trigger, 150 ms
   in, a fifth quicker out). The same words sit under the summary (.delivery-footnote), for touch screens. */
.delivery-tip { position: relative; cursor: help; text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 3px; outline-offset: 3px; }
.delivery-tip::after {
	content: attr(data-tip);
	position: absolute;
	left: 0;
	bottom: calc(100% + 10px);
	z-index: 5;
	width: max-content;
	max-width: min(280px, 72vw);
	padding: 10px 12px;
	border-radius: 10px;
	background: var(--ink);
	color: var(--paper);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
	text-align: left;
	white-space: normal;
	box-shadow: 0 14px 30px -16px rgba(40, 25, 30, .6);
	opacity: 0;
	scale: .95;
	transform-origin: 24px 100%;
	pointer-events: none;
	transition: opacity 120ms cubic-bezier(.4, 0, 1, 1), scale 120ms cubic-bezier(.4, 0, 1, 1);
}
.delivery-tip:hover::after, .delivery-tip:focus-visible::after { opacity: 1; scale: 1; transition-duration: 150ms; transition-timing-function: cubic-bezier(.23, 1, .32, 1); }
@media (prefers-reduced-motion: reduce) { .delivery-tip::after { scale: none; transition: none; } }
.delivery-footnote { margin: 12px 0 0; font-size: 11px; line-height: 1.55; color: var(--muted); }

/* Self-pickup's popup and steps (inc/delivery.php, Jin Hao 20 November): the account dialog's look (lovento-
   dialog.css, its motion from lovento-motion.css), with its own sheet; the same steps on the order-received page. */
.self-pickup-dialog { --dialog-width: 470px; }
.self-pickup-sheet { position: relative; padding: 30px 28px 26px; }
.self-pickup-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: none; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; }
.self-pickup-close:hover, .self-pickup-close:focus-visible { background: var(--soft); color: var(--ink); }
.self-pickup-sheet h2 { margin: 6px 0 14px; font: italic 400 28px/1.15 var(--serif); color: var(--ink); }
.self-pickup-sheet h2:focus { outline: none; }
.self-pickup-steps { margin: 0 0 18px; padding-left: 20px; font-size: 14px; line-height: 1.6; color: var(--ink); text-align: left; }
.self-pickup-steps li + li { margin-top: 8px; }
.self-pickup-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.confirmation .self-pickup-steps { max-width: 560px; margin: 4px auto 18px; }
