/*
 * Mercer Lab Supply: page types with no reference page (cart, checkout,
 * quick order, forms, policy pages, account pages).  Built from the
 * reference stylesheet's colors, sizes and borders and nothing new.
 */

/* ---------- messages ---------- */

.notices { margin-bottom: 16px; }
.notices ul { margin: 0; padding: 0; list-style: none; }
.woocommerce-error, .woocommerce-message, .woocommerce-info, .mercer-notice {
  margin: 0 0 8px; padding: 10px 12px; border: 1px solid var(--rule); background: var(--tint);
  font-size: 13px; line-height: 18px; list-style: none;
}
.woocommerce-error, .mercer-notice-error { border-color: var(--warn); color: var(--warn); }
.woocommerce-error li + li { margin-top: 4px; }
.woocommerce-error a, .woocommerce-message a, .woocommerce-info a { text-decoration: underline; }
.woocommerce-message .button, .woocommerce-info .button { float: none; margin-left: 8px; }
.warn { color: var(--warn); }
.after-lede { margin-top: 16px; max-width: 520px; }
.after-lede .rail ul, .body.rail ul { margin: 0; }
.data td.empty { color: var(--ink-2); }
.pages a, .pages span { margin-right: 8px; }

/* ---------- page text ---------- */

.prose { margin-top: 12px; max-width: 760px; }
.prose h2 { margin: 20px 0 6px; }
.prose h3 { margin: 16px 0 6px; font-size: 14px; line-height: 20px; }
.prose p, .prose ul, .prose ol { margin: 0 0 10px; }
.prose ul { list-style: disc; padding-left: 20px; }
.prose ol { padding-left: 20px; }
.prose table { margin: 0 0 12px; }

/* ---------- forms ---------- */

.mercer-form, .mercer-form-wrap { max-width: 520px; margin-top: 12px; }
.mercer-form .field, .mercer-field, .form-row { margin: 0 0 12px; }
.mercer-form label, .mercer-field label, .form-row label, .co label {
  display: block; margin-bottom: 4px; font-size: 13px; line-height: 18px; font-weight: 700; color: var(--ink);
}
.mercer-required, .form-row .required, .form-row .optional { font-weight: 400; color: var(--ink-2); font-size: 12px; }
.form-row abbr.required { text-decoration: none; border: 0; }
.mercer-hp { position: absolute; left: -9999px; }
input[type="text"], input[type="email"], input[type="tel"], input[type="password"], input[type="number"]:not(.qty),
select, textarea, .input-text {
  width: 100%; height: 32px; padding: 0 8px;
  border: 1px solid var(--rule-2); border-radius: 2px; background: #fff;
  font: 14px var(--font-sans); color: var(--ink);
}
textarea { height: auto; min-height: 96px; padding: 6px 8px; line-height: 20px; }
input[type="file"] { font: 13px var(--font-sans); }
select:focus, textarea:focus { outline: 2px solid var(--link); outline-offset: 1px; }
.field.error input, .woocommerce-invalid input, .woocommerce-invalid select { border-color: var(--warn); }
.field .msg { display: block; margin-top: 4px; font-size: 12px; line-height: 18px; color: var(--warn); }
.mercer-form button, .mercer-form-wrap button, .wp-element-button, .woocommerce-Button, .woocommerce-button, .button, button.alt {
  display: inline-block; height: 32px; padding: 0 14px;
  border: 1px solid var(--navy); border-radius: 2px; background: var(--navy); color: #fff;
  font: 700 13px/30px var(--font-sans); cursor: pointer; white-space: nowrap;
}
.mercer-form button:hover, .wp-element-button:hover, .button:hover, button.alt:hover { background: var(--navy-2); border-color: var(--navy-2); color: #fff; text-decoration: none; }
#create-account { margin-top: 28px; }
.actions { margin-top: 16px; display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

/* ---------- cart ---------- */

.cart-form .enter { position: absolute; left: -9999px; }
.data.cart { margin-top: 16px; }
.data.cart td { vertical-align: middle; }
.totals { width: auto; min-width: 280px; margin: 16px 0 0 auto; font-size: 13px; line-height: 18px; }
.totals th, .totals td { padding: 4px 0 4px 24px; text-align: right; font-weight: 400; }
.totals th { color: var(--ink-2); }
.totals .total th, .totals .total td { font-size: 14px; line-height: 20px; font-weight: 700; color: var(--ink); border-top: 1px solid var(--rule-2); padding-top: 8px; }
.cart-form .actions { justify-content: space-between; }
.totals ul { list-style: none; }

/* ---------- quick order ---------- */

.data.qo { margin-top: 16px; max-width: 900px; }
.data.qo td { vertical-align: middle; }
.qo-sku { max-width: 220px; }
.foot-gate { margin-top: 16px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ---------- checkout ---------- */

.co { max-width: 900px; margin-top: 12px; }
.co-sec { margin-top: 24px; }
.co-sec > h2 { padding-bottom: 6px; margin-bottom: 12px; border-bottom: 1px solid var(--rule); }
.co-fields { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }
.co-fields .form-row-wide, .co-fields #billing_email_field, .co-fields #billing_address_1_field, .co-fields #shipping_address_1_field,
.co-fields #billing_address_2_field, .co-fields #shipping_address_2_field, .co-fields #billing_company_field, .co-fields #shipping_company_field { grid-column: 1 / -1; }
.co-same-input { margin: 0 6px 12px 0; vertical-align: middle; }
.co-same { display: inline !important; font-weight: 400 !important; }
.co-same-input:checked ~ .co-billing { display: none; }
.wc_payment_methods { list-style: none; border: 1px solid var(--rule); }
.wc_payment_methods > li { padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.wc_payment_methods > li:last-child { border-bottom: 0; }
.wc_payment_methods > li > label { display: inline; font-weight: 700; }
.wc_payment_methods input[type="radio"] { margin: 0 6px 0 0; vertical-align: middle; }
.payment_box { margin-top: 8px; font-size: 13px; line-height: 18px; }
.payment_box p { margin-bottom: 8px; }
.review .totals th, .review .totals td { text-align: right; }
.co-place { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); }
.co-ruo input { margin: 0 6px 0 0; vertical-align: middle; }
.co-ruo label { display: inline; font-weight: 400; }
.co-button { margin-top: 16px; display: flex; align-items: center; gap: 16px; }
.place-total { font-size: 14px; line-height: 20px; font-weight: 700; }
.blockUI.blockOverlay { background: #fff !important; opacity: 0.6 !important; }
.select2-container .select2-selection--single { height: 32px; border: 1px solid var(--rule-2); border-radius: 2px; }
.select2-container .select2-selection--single .select2-selection__rendered { line-height: 30px; padding-left: 8px; color: var(--ink); }
.select2-container .select2-selection--single .select2-selection__arrow { height: 30px; }
.screen-reader-text { position: absolute; left: -9999px; }

/* ---------- product page pricing panel, signed in ---------- */

/* The signed-in panel adds a quantity field and an Add to cart button to
 * each row.  At the reference column padding the longest rows (for example
 * MLS-00120-10X100MG) are wider than the 528px panel, so the table ran past
 * the panel border.  Narrow the gaps between the inner columns only. */
@media (min-width: 861px) {
  .buy form .data th, .buy form .data td { padding-left: 6px; padding-right: 6px; }
  .buy form .data th:first-child, .buy form .data td:first-child { padding-left: 12px; }
  .buy form .data th:last-child, .buy form .data td:last-child { padding-right: 12px; }
}

/* ---------- account ---------- */

.woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: 4px 20px; margin: 12px 0 16px; padding-bottom: 8px; border-bottom: 1px solid var(--rule); }
.woocommerce-MyAccount-navigation .is-active a { color: var(--ink); font-weight: 700; }
.woocommerce-MyAccount-content table { border: 1px solid var(--rule); font-size: 13px; line-height: 18px; margin-bottom: 12px; }
.woocommerce-MyAccount-content th, .woocommerce-MyAccount-content td { padding: 7px 12px; border-bottom: 1px solid var(--rule); text-align: left; }
.woocommerce-MyAccount-content thead th { background: var(--tint); font-size: 12px; }
.woocommerce-MyAccount-content address { font-style: normal; }

@media (max-width: 860px) {
  .co-fields { grid-template-columns: minmax(0, 1fr); }
  .data.cart thead { display: none; }
  .data.cart, .data.cart tbody, .data.cart tr, .data.cart td { display: block; }
  .data.cart tr { padding: 9px 12px; border-bottom: 1px solid var(--rule); }
  .data.cart td { padding: 2px 0; border: 0; text-align: left; }
  .data.qo .qo-pack, .data.qo th:nth-child(4) { display: none; }
  .totals { width: 100%; }
}

@media print {
  .notices, .actions, .co-button, .mercer-form { display: none; }
}
