/* The cart's own CSS, on every page (partials/cart_ui.html). The /cart page wears the client's stylesheets
   (styles-m, wp-style, styles-l, linked by cart.html in their order); this adds what the copy needs on top:
   the Luma icon font served from here, the add notice bar (the client's page message, on pages that do not
   load styles-m), and the Qty steppers beside the theme's Qty box. */

/* styles-m.css asks the client's server for the icon font: the same file, ours */
@font-face {
  font-family: 'luma-icons';
  src: url('/static/theme/font/Luma-Icons.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

/* ---- the add notice: Magento's .message.success / .message.error, in a bar over the top of the page ---- */
.fm-cart-notice {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  margin: 0;
  padding: 0 16px;
  pointer-events: none;
}
.fm-cart-notice[hidden] { display: none; }
.fm-cart-notice .messages {
  max-width: 1250px;
  margin: 12px auto 0;
  pointer-events: auto;
  box-shadow: 0 0 10px -2px rgba(0, 0, 0, .25);
  cursor: default;
  animation: fm-cart-notice-in .2s ease-out;
}
@keyframes fm-cart-notice-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
.fm-cart-notice .message {
  margin: 0;
  display: block;
  position: relative;
  padding: 12px 20px 12px 45px;
  font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 13px;
  line-height: 1.42857143;
  text-align: left;
}
.fm-cart-notice .message.success { background: #e5efe5; color: #006400; }
.fm-cart-notice .message.error { background: #fae5e5; color: #e02b27; }
.fm-cart-notice .message a { color: #006bb4; text-decoration: underline; }
.fm-cart-notice .message > *:first-child::before {
  -webkit-font-smoothing: antialiased;
  font-family: 'luma-icons';
  font-size: 24px;
  line-height: 24px;
  display: inline-block;
  position: absolute;
  left: 0;
  top: 22px;
  width: 45px;
  margin: -12px 0 0;
  text-align: center;
  font-weight: normal;
}
.fm-cart-notice .message.success > *:first-child::before { content: '\e60e'; color: #006400; }
.fm-cart-notice .message.error > *:first-child::before { content: '\e61f'; color: #b30000; }

/* ---- /cart ---- */
/* theirs has Magento's nav-sections (25px under it on a desktop) and an empty footer.content (20px) around <main> */
.checkout-cart-index #maincontent { margin-bottom: 20px; }
@media (min-width: 769px) { .checkout-cart-index #maincontent { margin-top: 25px; } }
.checkout-cart-index .page.messages .message { margin-bottom: 10px; }
.checkout-cart-index .page.messages .message a { text-decoration: underline; }
.checkout-cart-index .item-options dt { font-weight: 700; }
.checkout-cart-index .cart.item .message.notice { margin: 8px 0 0; padding: 6px 12px; font-size: 12px; text-transform: none; }

/* the Qty box between - and + (theirs is the box alone; the steppers wear its border and grey) */
.checkout-cart-index .fm-qty { display: inline-flex; align-items: center; }
.checkout-cart-index .fm-qty label { display: block; }
.checkout-cart-index .cart.table-wrapper .col.qty .fm-qty .input-text { margin: 0; height: 36px; width: 50px; border: 1px solid var(--site-field-line, #bebebe); border-left: 0; border-right: 0; border-radius: 0; -moz-appearance: textfield; }
.checkout-cart-index .fm-qty .input-text::-webkit-inner-spin-button,
.checkout-cart-index .fm-qty .input-text::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.checkout-cart-index .fm-qty__step {
  width: 32px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--site-field-line, #bebebe);
  border-radius: 0;
  background: var(--site-bg);
  color: var(--site-ink);
  font: 700 16px/34px 'Open Sans', Helvetica, Arial, sans-serif;
  cursor: pointer;
}
.checkout-cart-index .fm-qty__step:hover { background: var(--site-ink); color: var(--site-gold); }

/* the Summary's lines of ours: free shipping, the note, the stub's how-to-pay */
.checkout-cart-index .fm-cart-ship,
.checkout-cart-index .fm-cart-stub { margin: 10px 0 0; font-size: 12px; color: var(--site-quiet, #555); }
.checkout-cart-index .fm-cart-note { margin: 15px 0 0; }
.checkout-cart-index .fm-cart-note .label { display: block; margin-bottom: 5px; font-weight: 600; }
.checkout-cart-index .fm-cart-note textarea { width: 100%; box-sizing: border-box; font-size: 13px; padding: 8px; border: 1px solid var(--site-field-line-2, #c2c2c2); }
.checkout-cart-index #fm-cart-note-status { font-size: 12px; min-height: 0; }
.checkout-cart-index .checkout-methods-items a.action.primary.checkout {
  display: block;
  box-sizing: border-box;
  width: 100%;
  text-align: center;
  background: #fecb17;
  color: #000;
  font-size: 14.5px;
  font-weight: 700;
  padding: 11px 30px;
  border: 0;
  text-decoration: none;
}
.checkout-cart-index .checkout-methods-items a.action.primary.checkout:hover { background: #272727; color: #fecb17; }
.checkout-cart-index #fm-cart.htmx-request { opacity: .6; transition: opacity .15s; }

/* a phone: theirs right-aligns every cell of the table, which squeezes a long part name into a word per line;
   the name reads left to right over the photo, the steppers narrower */
@media (max-width: 767px) {
  .checkout-cart-index .cart.table-wrapper td.col.item { text-align: left; width: 50%; padding-right: 8px !important; }
  .checkout-cart-index .cart.table-wrapper .product-image-container { width: 80px !important; }
  .checkout-cart-index .cart.table-wrapper .product-item-name { font-size: 13px; line-height: 1.35; }
  .checkout-cart-index .cart.table-wrapper .col.qty { padding-left: 4px; padding-right: 4px; }
  .checkout-cart-index .fm-qty__step { width: 26px; }
  .checkout-cart-index .cart.table-wrapper .col.qty .fm-qty .input-text { width: 36px; }
}
