/*
 * NOISSEY cart, checkout, order confirmation and account pages.
 * The layouts come from the original design (noissey-commerce.css / checkout.css);
 * this file fits WooCommerce's own form markup into that design.
 */

/* ---------- Base ---------- */
.noissey-wc { color: var(--n-text); font-family: var(--n-font); }
.noissey-wc :is(input, select, textarea, button) { font-family: inherit; }
.noissey-wc-main { background: var(--n-bg); }
.checkout-shell.noissey-ui { font-size: 14px; color: #111; }
.noissey-wc img { max-width: 100%; }
.noissey-wc .woocommerce { margin: 0; }
.checkout-page :is(.lucky-button, .chat-button) { display: none !important; }

/* Buttons: keep the NOISSEY look over Astra's WooCommerce button colors. */
html body .noissey-wc .button {
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
	background: transparent; color: inherit; border: 0; border-radius: 0; box-shadow: none;
	font-family: inherit; letter-spacing: 3px; line-height: 1.3; padding: 13px 18px;
	text-transform: none; text-decoration: none;
}
html body .noissey-wc .button.button-dark { background: var(--n-button); color: var(--n-button-text); border: 1px solid var(--n-button); }
html body .noissey-wc .button.button-dark:is(:hover, :focus) { background: var(--n-button-hover); border-color: var(--n-button-hover); color: var(--n-button-text); }
html body .noissey-wc .button.button-outline { background: #fff; color: var(--n-text); border: 1px solid #e6e6e6; }
html body .noissey-wc .button.button-outline:is(:hover, :focus) { background: #f4f4f4; color: var(--n-text); }
html body .noissey-wc .checkout-pay-button,
html body .noissey-wc #place_order {
	display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; padding: 0 20px;
	background: var(--n-button); color: var(--n-button-text); border: 0; border-radius: 12px; box-shadow: none;
	font-size: 14px; font-weight: 600; letter-spacing: normal; text-transform: none; text-decoration: none; cursor: pointer;
}
html body .noissey-wc :is(.checkout-pay-button, #place_order):is(:hover, :focus) { background: var(--n-button-hover); color: var(--n-button-text); }

/* Notices. */
.noissey-wc .woocommerce-notices-wrapper:not(:empty) { margin-bottom: 20px; }
.checkout-shell > .woocommerce > .woocommerce-notices-wrapper:not(:empty) { max-width: 980px; margin: 0 auto; padding: 24px 0 0; }
.checkout-layout > .woocommerce-NoticeGroup { grid-column: 1 / -1; padding-top: 24px; }
.noissey-wc .woocommerce-error li { margin: 0; }
.noissey-wc .woocommerce-error { padding-left: 18px; }

/* ---------- Cart ---------- */
.noissey-cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 64px; align-items: start; }
.noissey-cart-items { border-top: 1px solid #ddd; min-width: 0; }
.noissey-cart .cart-item { grid-template-columns: 110px minmax(0, 1fr); gap: 22px; padding: 24px 0; }
.noissey-cart-line-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.noissey-cart .cart-item h3 { font-size: 14px; margin: 3px 0 8px; font-weight: 600; }
.noissey-cart .cart-item .cart-line-price { margin: 3px 0; font-size: 14px; white-space: nowrap; }
.noissey-cart .noissey-cart-unit { color: #7b8389; }
.noissey-cart .noissey-cart-remove { font-size: 11px; text-decoration: underline; }
.noissey-cart .backorder_notification { color: #a02b36; }
.noissey-cart-summary { position: sticky; top: 24px; padding: 30px; background: #f5f5f5; }
.noissey-cart-totals h2 { font-size: 19px; font-weight: 600; margin: 0 0 20px; }
.noissey-cart-totals .checkout-discount { margin-bottom: 22px; }
.noissey-cart-totals .checkout-discount button { cursor: pointer; }
.noissey-cart-totals .cart-shipping-note { margin: 16px 0 18px; }
.noissey-cart-totals .checkout-discount-name a { text-decoration: underline; }
.noissey-cart-totals .wc-proceed-to-checkout { padding: 0; }
.noissey-cart .cart-collaterals { margin-top: 70px; }
.noissey-cross-sells h2 { font-size: 20px; font-weight: 600; margin: 0 0 24px; }
.noissey-cart-empty { min-height: 50dvh; }
.noissey-cart-empty .woocommerce-info { display: inline-block; }
@media (max-width: 1000px) {
	.noissey-cart-layout { grid-template-columns: 1fr; gap: 32px; }
	.noissey-cart-summary { position: static; }
}
@media (max-width: 600px) {
	.noissey-cart .cart-item { grid-template-columns: 85px minmax(0, 1fr); gap: 16px; }
	.noissey-cart-summary { padding: 22px 18px; }
}

/* Totals shared by cart and checkout. */
.noissey-wc .checkout-totals .woocommerce-Price-amount { font-weight: inherit; }
.noissey-wc .checkout-total-row dd small.includes_tax,
.noissey-wc .checkout-total-row dd .includes_tax { display: block; font-size: 11px; font-weight: 400; color: #777; margin-top: 4px; }
.noissey-wc .checkout-total-row.is-total dd strong { font-weight: 600; }
.noissey-wc .checkout-discount-name a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Checkout fields ---------- */
.checkout-page .checkout-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkout-page .checkout-fields > .form-row { grid-column: 1 / -1; position: relative; float: none; width: auto; margin: 0; padding: 0; }
.checkout-page .checkout-fields > :is(.form-row-first, .form-row-last) { grid-column: auto; }
.checkout-page .checkout-fields > .form-row.hidden,
.checkout-page .checkout-fields > .form-row[style*="display: none"] { display: none; }
.checkout-page .form-row .woocommerce-input-wrapper { display: block; position: relative; }
html body .checkout-page .form-row :is(input.input-text, select, textarea) {
	width: 100%; min-width: 0; height: 49px; margin: 0; padding: 14px 10px; background: #fff; color: #111;
	border: 1px solid #d9d9d9; border-radius: 12px; box-shadow: none; font-size: 13px; line-height: normal; outline-offset: 0;
}
html body .checkout-page .form-row textarea { height: auto; min-height: 96px; resize: vertical; }
.checkout-page .form-row :is(input.input-text, textarea)::placeholder { color: #6d777f; opacity: 1; }
html body .checkout-page .form-row :is(input.input-text, select, textarea):focus { outline: 1px solid var(--n-text); border-color: var(--n-text); }
.checkout-page .form-row.woocommerce-invalid :is(input.input-text, select),
.checkout-page .form-row.woocommerce-invalid .select2-selection { border-color: #a02b36 !important; }
.checkout-page .form-row .required { color: #a02b36; text-decoration: none; border: 0; }
.checkout-page .form-row .optional { color: #69757c; }
.checkout-page .checkout-inline-error-message { margin: 0; padding: 5px 4px 0; color: #a02b36; font-size: 11px; line-height: 1.5; }

/* Country / state: small floating label like the original Country/Region field. */
.checkout-page .form-row:is(.address-field.update_totals_on_change, [id$="_state_field"]) > label:not(.screen-reader-text) {
	position: absolute; left: 11px; top: 7px; z-index: 2; margin: 0; font-size: 10px; line-height: 1.2; color: #69757c; pointer-events: none;
}
html body .checkout-page .form-row:is(.address-field.update_totals_on_change, [id$="_state_field"]) :is(select, input.input-text) { padding: 20px 30px 5px 10px; }
.checkout-page .select2-container { width: 100% !important; }
.checkout-page .select2-container .select2-selection--single { height: 49px; border: 1px solid #d9d9d9; border-radius: 12px; background: #fff; }
.checkout-page .select2-container .select2-selection--single .select2-selection__rendered { padding: 21px 30px 5px 10px; line-height: 1.3; font-size: 13px; color: #111; }
.checkout-page .select2-container .select2-selection--single .select2-selection__arrow { height: 47px; right: 8px; }
.checkout-page .select2-container--focus .select2-selection--single,
.checkout-page .select2-container--open .select2-selection--single { border-color: var(--n-text); outline: 1px solid var(--n-text); }
.select2-dropdown { border-color: #d9d9d9; border-radius: 12px; overflow: hidden; font-size: 13px; }
.select2-container--default .select2-results__option--highlighted[aria-selected],
.select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--n-text); }

/* Sections. */
.checkout-page .checkout-shipping-address:empty { display: none; }
.checkout-page #ship-to-different-address { margin: 4px 0 14px; font-size: 12px; font-weight: 400; line-height: 1.6; }
.checkout-page .shipping_address { margin-bottom: 16px; }
.checkout-page .woocommerce-additional-fields { margin-top: 14px; }
.checkout-page .woocommerce-account-fields { margin-top: 14px; }
.checkout-page .woocommerce-account-fields .create-account.checkout-fields { margin-top: 10px; }
.checkout-page .woocommerce-form__label-for-checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; line-height: 1.6; cursor: pointer; }
.checkout-page .woocommerce-form__label-for-checkbox input { width: 17px; height: 17px; flex: 0 0 17px; margin: 1px 0 0; accent-color: var(--n-text); }
.checkout-page .shipping-package-name { font-size: 12px; color: #737d84; margin: 0 0 8px; }
.checkout-page .shipping-options + .shipping-package-name { margin-top: 16px; }
.checkout-page .shipping-option strong { font-weight: 600; white-space: nowrap; }

/* Payment methods. */
.checkout-page #payment { background: none; border-radius: 0; }
.checkout-page .payment-options { list-style: none; margin: 0; padding: 0; }
.checkout-page .payment-option-row { margin: 0; padding: 0; border-top: 1px solid #d9d9d9; }
.checkout-page .payment-option-row:first-child { border-top: 0; }
.checkout-page .payment-option-row .payment-option { border-top: 0; }
.checkout-page .payment-option-icons { display: flex; align-items: center; gap: 4px; }
.checkout-page .payment-option-icons img { display: inline-block; width: auto; max-height: 24px; margin: 0; float: none; }
.checkout-page .payment_box { margin: 0; padding: 15px; background: #f5f5f5; border-top: 1px solid var(--n-text); font-size: 12px; line-height: 1.6; color: #6c777e; }
.checkout-page .payment_box::before { display: none; }
.checkout-page .payment_box p { margin: 0 0 10px; }
.checkout-page .payment_box p:last-child { margin-bottom: 0; }
.checkout-page .payment_box fieldset { margin: 0; padding: 0; border: 0; }
.checkout-page .payment-option-empty { padding: 16px; font-size: 13px; }
.checkout-page .payment-option-empty .woocommerce-info { margin: 0; }
.checkout-page .place-order { margin: 34px 0 0; padding: 0; }
.checkout-page .woocommerce-terms-and-conditions-wrapper { margin-bottom: 20px; font-size: 12px; line-height: 1.6; color: #7a8186; }
.checkout-page .woocommerce-privacy-policy-text p { margin: 0 0 12px; }
.checkout-page .woocommerce-terms-and-conditions-wrapper a { text-decoration: underline; }
.checkout-page .checkout-policies { display: flex; flex-wrap: wrap; gap: 18px; }
.checkout-page .checkout-policies a { text-decoration: underline; text-underline-offset: 2px; }

/* Order summary. */
.checkout-page #order_review .checkout-summary-items:empty { display: none; }
.checkout-page .checkout-item-photo img { aspect-ratio: auto; }
.checkout-page .checkout-discount button { cursor: pointer; }
.checkout-page .checkout-discount-status.is-success { color: #426249; }
.checkout-page .blockUI.blockOverlay { border-radius: 12px; }

/* Order confirmation. */
.checkout-page .confirmation-card .woocommerce-notice,
.checkout-page .confirmation-card .woocommerce-thankyou-order-received { margin: 0 0 6px; font-size: 13px; line-height: 1.8; }
.checkout-page .confirmation-card address { line-height: 1.8; }
.checkout-page .woocommerce-order > .checkout-layout > .checkout-flow > :is(.woocommerce-bacs-bank-details, section:not(.confirmation-card), h2.wc-bacs-bank-details-heading) { margin-bottom: 22px; }
.checkout-page .woocommerce-order .wc-bacs-bank-details-heading { font-size: 17px; font-weight: 600; }
.checkout-page .woocommerce-order ul.wc-bacs-bank-details { list-style: none; padding: 0; margin: 0 0 22px; font-size: 13px; line-height: 1.8; }
.checkout-page .confirmation-print { cursor: pointer; }
.checkout-page.woocommerce-order-pay .checkout-shell { background: #fff; }
.checkout-page #order_review.woocommerce-order-pay,
.checkout-page form#order_review { max-width: 640px; margin: 0 auto; padding: 40px 20px 80px; }
.checkout-page form#order_review .shop_table { width: 100%; border-collapse: collapse; margin-bottom: 28px; font-size: 13px; }
.checkout-page form#order_review .shop_table :is(th, td) { padding: 12px 0; border-bottom: 1px solid #e5e5df; text-align: left; }

/* ---------- Account ---------- */
.noissey-account-page .account-shell { min-height: 55dvh; }
.noissey-wc .account-nav a { color: inherit; text-decoration: none; }
.noissey-wc .account-nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.noissey-wc .account-nav .woocommerce-MyAccount-navigation-link--customer-logout { margin-top: 15px; border-bottom: 0; color: #7b8389; }
.noissey-wc .account-content > .woocommerce-notices-wrapper:not(:empty) { margin-bottom: 24px; }
.noissey-wc .account-panel > .button { margin-top: 8px; min-height: 44px; }
.noissey-wc .account-panel h2 { font-size: 19px; font-weight: 600; margin: 0 0 25px; }
.noissey-wc .account-form .account-panel + .account-panel { margin-top: 24px; }
.noissey-wc .account-form > .form-actions { margin-top: 26px; }
.noissey-wc .form-actions > a { font-size: 12px; text-decoration: underline; text-underline-offset: 4px; }
.noissey-wc .form-field .required { color: #a02b36; }
.noissey-wc .field-hint { font-size: 11px; line-height: 1.5; color: #7b8389; }
.noissey-wc .noissey-panel-note { margin: -12px 0 20px; font-size: 13px; color: #7b8389; }
.noissey-wc .noissey-address-intro { margin: -14px 0 24px; font-size: 13px; color: #7b8389; }
.noissey-wc .address-actions a { font-size: 11px; text-decoration: underline; text-underline-offset: 4px; }
.noissey-wc .account-table th { text-transform: uppercase; text-align: left; }
.noissey-wc .account-table tbody th { padding: 23px 12px 23px 0; border-bottom: 1px solid #e5e5df; font-weight: 400; white-space: nowrap; text-transform: none; font-size: 13px; letter-spacing: normal; color: inherit; }
.noissey-wc .account-table .noissey-order-action { margin-right: 12px; }
.noissey-account-pagination { display: flex; gap: 12px; margin-top: 24px; }

/* WooCommerce address form rows inside account panels. */
.noissey-wc .noissey-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.noissey-wc .noissey-fields > .form-row { grid-column: 1 / -1; display: flex; flex-direction: column; gap: 9px; float: none; width: auto; margin: 0; padding: 0; font-size: 12px; }
.noissey-wc .noissey-fields > :is(.form-row-first, .form-row-last) { grid-column: auto; }
.noissey-wc .noissey-fields > .form-row > label { margin: 0; font-size: 12px; line-height: 1.4; }
html body .noissey-wc .noissey-fields .form-row :is(input.input-text, select, textarea) {
	width: 100%; min-height: 47px; margin: 0; padding: 13px 14px; background: #fff; color: var(--n-text);
	border: 1px solid #dcdedb; border-radius: 0; box-shadow: none; font-size: 14px;
}
html body .noissey-wc .noissey-fields .form-row :is(input.input-text, select, textarea):focus { outline: 1px solid var(--n-text); outline-offset: 0; }
.noissey-wc .noissey-fields .select2-container .select2-selection--single { height: 47px; border: 1px solid #dcdedb; border-radius: 0; }
.noissey-wc .noissey-fields .select2-container .select2-selection--single .select2-selection__rendered { line-height: 45px; padding-left: 14px; font-size: 14px; color: var(--n-text); }
.noissey-wc .noissey-fields .select2-container .select2-selection--single .select2-selection__arrow { height: 45px; }
.noissey-wc .form-row .required { color: #a02b36; text-decoration: none; border: 0; }

/* Sign in / register. */
.noissey-wc .account-auth .noissey-remember { margin-top: 18px; }
.noissey-wc .account-auth .woocommerce-privacy-policy-text { margin-top: 16px; font-size: 12px; line-height: 1.6; color: #7b8389; text-align: left; }
.noissey-wc .account-auth .woocommerce-privacy-policy-text a { text-decoration: underline; }
.noissey-wc .account-auth .form-message { text-align: left; font-size: 12px; color: #7b8389; margin: 0; }
.noissey-wc .account-auth .woocommerce-notices-wrapper:not(:empty),
.noissey-wc .account-auth > :is(.woocommerce-error, .woocommerce-message, .woocommerce-info) { text-align: left; }

/* Order details (view order). */
.noissey-wc .woocommerce-order-details { margin-top: 24px; }
.noissey-wc :is(.woocommerce-order-details__title, .woocommerce-column__title) { font-size: 17px; font-weight: 600; margin: 0 0 14px; }
.noissey-wc .woocommerce-table--order-details { width: 100%; border-collapse: collapse; font-size: 13px; border: 0; }
.noissey-wc .woocommerce-table--order-details :is(th, td) { padding: 14px 12px 14px 0; border: 0; border-bottom: 1px solid #e5e5df; text-align: left; background: none; }
.noissey-wc .woocommerce-table--order-details thead th { font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: #7b8389; font-weight: 600; }
.noissey-wc .woocommerce-table--order-details tfoot th { font-weight: 400; }
.noissey-wc .woocommerce-table--order-details tfoot tr:last-child :is(th, td) { font-size: 16px; font-weight: 600; }
.noissey-wc .woocommerce-table--order-details .wc-item-meta { list-style: none; margin: 6px 0 0; padding: 0; font-size: 12px; color: #7b8389; }
.noissey-wc .woocommerce-table--order-details .wc-item-meta p { display: inline; margin: 0; }
.noissey-wc .woocommerce-customer-details { margin-top: 30px; }
.noissey-wc .woocommerce-columns--addresses { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.noissey-wc .woocommerce-columns--addresses .woocommerce-column { float: none; width: auto; margin: 0; }
.noissey-wc .woocommerce-customer-details address { padding: 22px; border: 1px solid #ddd; border-radius: 12px; font-style: normal; font-size: 13px; line-height: 1.8; }
.noissey-wc .woocommerce-customer-details address p { margin: 4px 0 0; }
.noissey-wc .noissey-order-notes { list-style: none; margin: 0; padding: 0; }
.noissey-wc .noissey-order-notes li + li { margin-top: 14px; padding-top: 14px; border-top: 1px solid #eee; }
.noissey-wc .noissey-order-notes .meta { margin: 0 0 4px; font-size: 11px; color: #7b8389; }
.noissey-wc .order-again { margin-top: 20px; }

/* Downloads and saved payment methods (default WooCommerce tables). */
.noissey-wc :is(.woocommerce-table--order-downloads, .woocommerce-MyAccount-paymentMethods) { width: 100%; border-collapse: collapse; font-size: 13px; }
.noissey-wc :is(.woocommerce-table--order-downloads, .woocommerce-MyAccount-paymentMethods) :is(th, td) { padding: 14px 12px 14px 0; border-bottom: 1px solid #e5e5df; text-align: left; }

@media (max-width: 600px) {
	.noissey-wc .noissey-fields { grid-template-columns: 1fr; }
	.noissey-wc .woocommerce-columns--addresses { grid-template-columns: 1fr; }
	.checkout-page .checkout-fields { grid-template-columns: 1fr; }
	.checkout-page .checkout-fields > :is(.form-row-first, .form-row-last) { grid-column: 1 / -1; }
}

@media print {
	.checkout-page .checkout-header, .checkout-page #cart-dialog { display: none !important; }
}
