/* MPS Shop: basket */
/* ===== 1. mps-basket.css ===== */
/* ===== MPS Vintage Diesels: eBay-style header basket (any HikaShop cart module (desktop and mobile headers)) ===== */

/* --- Header: basket icon with red count badge, no text ---
   The link gets YOOtheme's "uk-navbar-toggle" class (added by the script), so its colour
   and hover match the search icon. The badge sits on the icon itself. */
.hikashop_cart_module div.hikashop_cart { position: relative; }
.hikashop_cart_module .hikashop_small_cart_checkout_link { text-decoration: none; }
.hikashop_cart_module .mps-cart-icon { position: relative; display: inline-flex; }
.hikashop_cart_module .hikashop_small_cart_total_title {          /* keep the text for screen readers only */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.hikashop_cart_module .mps-cart-icon[data-count]:not([data-count="0"])::after {
  content: attr(data-count); position: absolute; top: -8px; right: -11px;
  min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; box-sizing: border-box;
  background: #d0261b; color: #fff; font: 700 11px/19px system-ui, sans-serif; text-align: center;
}

/* --- Drop-down card --- */
.hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_container { position: static; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content {
  position: absolute !important; right: -8px; left: auto !important; top: calc(100% + 10px);
  z-index: 1000; width: 360px !important; max-width: calc(100vw - 24px);
  background: #fff; color: #191919; text-align: left;
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18); overflow: visible !important; padding: 0 !important;
}
.hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content::before {
  content: "Shopping basket"; display: block; padding: 20px 20px 6px; font-size: 20px; font-weight: 700;
}

/* table becomes a list: rows, then total, then buttons */
.hikashop_cart_module div.hikashop_cart table.hikashop_cart { display: flex; flex-direction: column; width: 100%; margin: 0; border: 0; border-collapse: collapse; }
.hikashop_cart_module div.hikashop_cart table.hikashop_cart thead { display: none; }
.hikashop_cart_module div.hikashop_cart table.hikashop_cart tbody { display: block; order: 1; }  /* no scroll box, so HikaShop's stock warnings aren't cut off */
.hikashop_cart_module div.hikashop_cart table.hikashop_cart tfoot { display: block; order: 2; border-top: 1px solid #e5e5e5; }

.hikashop_cart_module div.hikashop_cart tbody tr {
  display: grid; grid-template-columns: 64px minmax(0,1fr) auto;
  grid-template-areas: "img name del" "img price qty";
  gap: 6px 14px; padding: 14px 20px; border-bottom: 1px solid #ececec;
}
.hikashop_cart_module div.hikashop_cart tbody tr:last-child { border-bottom: 0; }
.hikashop_cart_module div.hikashop_cart tbody td { display: block; padding: 0 !important; border: 0 !important; background: none !important; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_image { grid-area: img; align-self: start; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_image img { width: 64px; height: 64px; object-fit: contain; border: 1px solid #e5e5e5; border-radius: 8px; background: #fff; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_name_value { grid-area: name; font-size: 14px; line-height: 1.35; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_name_value a { color: #191919; text-decoration: none; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_name_value a:hover { text-decoration: underline; }
.hikashop_cart_module div.hikashop_cart .hikashop_product_code_cart { display: block; margin-top: 2px; color: #707070; font-size: 12px; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_price_value { grid-area: price; align-self: center; font-size: 17px; font-weight: 700; white-space: nowrap; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_quantity_value { grid-area: qty; align-self: center; justify-self: end; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_delete_value { grid-area: del; justify-self: end; align-self: start; margin: -6px -8px 0 0; }

/* eBay-style "Qty: [1]" (type a new number to change it; the +/- buttons are hidden) */
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_quantity_value {
  display: flex !important; align-items: center; justify-content: flex-end; gap: 8px;
}
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_quantity_value::before {
  content: "Qty:"; color: #707070; font-size: 15px; white-space: nowrap;
}
.hikashop_cart_module div.hikashop_cart .hikashop_product_quantity_div {
  display: block !important; width: auto !important; margin: 0 !important; padding: 0 !important;
  border: 0 !important; background: none !important; box-shadow: none !important;
}
.hikashop_cart_module div.hikashop_cart .hikashop_product_quantity_div .add-on,
.hikashop_cart_module div.hikashop_cart .hikashop_cart_product_quantity_refresh { display: none !important; }
.hikashop_cart_module div.hikashop_cart input.hikashop_product_quantity_field { font-family: inherit;
  display: block !important; width: 44px !important; min-width: 0 !important; max-width: 44px !important;
  height: 32px !important; margin: 0 !important; padding: 0 4px !important;
  border: 1px solid #c7c7c7 !important; border-radius: 8px !important;
  background: #fff !important; box-shadow: none !important;
  text-align: center; font-size: 15px !important; line-height: 30px !important; color: #191919 !important;
}
.hikashop_cart_module div.hikashop_cart input.hikashop_product_quantity_field:focus { border-color: #394b40 !important; outline: 2px solid rgba(57,75,64,.25); }

/* bin icon instead of the round cross */
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_delete_value a {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #555;
}
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_delete_value a:hover { background: #f2f2f2; color: #d0261b; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_delete_value i { display: none; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_module_product_delete_value a::before {
  content: ""; width: 19px; height: 19px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v6M14 11v6'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* total line */
.hikashop_cart_module div.hikashop_cart tfoot tr { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 20px; }
.hikashop_cart_module div.hikashop_cart tfoot td { display: block; padding: 0 !important; border: 0 !important; font-size: 17px; font-weight: 700; }
.hikashop_cart_module div.hikashop_cart tfoot td:empty { display: none; }

/* buttons: YOOtheme's own Primary / Secondary styles (classes added by the script); layout only here */
.hikashop_cart_module div.hikashop_cart .hikashop_cart_proceed_to_checkout,
.hikashop_cart_module div.hikashop_cart .mps-view-basket { display: block; width: auto !important; margin: 0 20px 10px; text-align: center; }
.hikashop_cart_module div.hikashop_cart .mps-view-basket { margin-bottom: 20px; }

/* phones: full-width panel under the header */
@media (max-width: 640px) {
  .hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content {
    position: fixed !important; left: 12px !important; right: 12px; top: 76px; width: auto !important;
  }
}

/* front-end editing icon and tooltip (only visible to you when logged in) */
[id^="module-"]:has(> .hikashop_cart_module) > .jmodedit, [id^="module-"]:has(> .hikashop_cart_module) > [role="tooltip"] { display: none; }

/* ===== HikaShop warning / notice pop-ups (e.g. "Quantity change impossible") =====
   Rounded card, blue border, UIkit "warning" icon in blue.
   Change --mps-blue to use a different blue. */
.notifyjs-metro-base {
  --mps-blue: #1e87f0;
  position: relative; display: flex !important; align-items: flex-start; gap: 12px;
  min-width: 240px; max-width: 300px; padding: 14px 16px !important;
  background: #fff !important; color: #191919 !important;
  border: 2px solid var(--mps-blue) !important; border-radius: 12px !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.15) !important; text-shadow: none !important;
}
.notifyjs-metro-base .image {
  flex: 0 0 26px; position: static !important; width: 26px !important; height: 26px !important;
  margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
  background: var(--mps-blue) !important; font-size: 0 !important; color: transparent !important;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='14' r='1'/%3E%3Ccircle fill='none' stroke='%23000' stroke-width='1.1' cx='10' cy='10' r='9'/%3E%3Cpath d='M10.97,7.72 C10.85,9.54 10.56,11.29 10.56,11.29 C10.51,11.87 10.27,12 9.99,12 C9.69,12 9.49,11.87 9.43,11.29 C9.43,11.29 9.16,9.54 9.03,7.72 C8.96,6.54 9.03,6 9.03,6 C9.03,5.45 9.46,5.02 9.99,5 C10.53,5.01 10.97,5.44 10.97,6 C10.97,6 11.04,6.54 10.97,7.72 L10.97,7.72 Z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Ccircle cx='10' cy='14' r='1'/%3E%3Ccircle fill='none' stroke='%23000' stroke-width='1.1' cx='10' cy='10' r='9'/%3E%3Cpath d='M10.97,7.72 C10.85,9.54 10.56,11.29 10.56,11.29 C10.51,11.87 10.27,12 9.99,12 C9.69,12 9.49,11.87 9.43,11.29 C9.43,11.29 9.16,9.54 9.03,7.72 C8.96,6.54 9.03,6 9.03,6 C9.03,5.45 9.46,5.02 9.99,5 C10.53,5.01 10.97,5.44 10.97,6 C10.97,6 11.04,6.54 10.97,7.72 L10.97,7.72 Z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.notifyjs-metro-base .image * { display: none !important; }
.notifyjs-metro-base .text-wrapper { margin: 0 !important; padding: 0 !important; min-width: 0; }
.notifyjs-metro-base .title { margin: 0 0 2px !important; font-size: 15px !important; font-weight: 700 !important; color: #191919 !important; line-height: 1.3 !important; }
.notifyjs-metro-base .text { margin: 0 !important; font-size: 14px !important; color: #4a4a4a !important; line-height: 1.4 !important; }
.notifyjs-metro-base.notifyjs-metro-error { --mps-blue: #d0261b; }      /* errors stay red */
.notifyjs-metro-base.notifyjs-metro-success { --mps-blue: #394b40; }    /* successes in site green */
/* the small pointer on the pop-up: match the border colour */
.notifyjs-wrapper .notifyjs-arrow[style*="border-top: 5px solid rgb"]    { border-top-color: #1e87f0 !important; }
.notifyjs-wrapper .notifyjs-arrow[style*="border-bottom: 5px solid rgb"] { border-bottom-color: #1e87f0 !important; }
.notifyjs-wrapper .notifyjs-arrow[style*="border-left: 5px solid rgb"]   { border-left-color: #1e87f0 !important; }
.notifyjs-wrapper .notifyjs-arrow[style*="border-right: 5px solid rgb"]  { border-right-color: #1e87f0 !important; }
.notifyjs-wrapper .notifyjs-container { z-index: 1100; }

/* ===== Empty basket: same icon, small "Your basket is empty" drop-down ===== */
.hikashop_cart_module .mps-empty { font-size: 0; line-height: 0; }                 /* hides HikaShop's empty-basket text */
.hikashop_cart_module .mps-empty > :not(.mps-empty-basket) { display: none !important; }
.hikashop_cart_module .mps-empty-basket { display: inline-block; font-size: 16px; line-height: 1.5; }
.mps-empty-drop { position: absolute; z-index: 1020; }
.mps-empty-drop:not(.uk-open) { display: none; }
.mps-empty-drop.uk-dropdown {
  width: 300px; max-width: calc(100vw - 24px); padding: 20px; background: #fff; color: #191919;
  border-radius: 8px; box-shadow: 0 8px 32px rgba(0,0,0,.18); text-align: left;
}
.mps-empty-drop .mps-empty-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.mps-empty-drop .mps-empty-text { margin: 0 0 16px; color: #4a4a4a; font-size: 15px; }
.mps-empty-drop .mps-view-basket { display: block; width: auto; text-align: center; }

/* mobile header: keep the basket (and its badge) clear of the screen edge and scroll bar */
.tm-header-mobile .hikashop_cart_module { margin-right: 14px; }

/* ===== Long baskets: list scrolls inside the drop-down, total and buttons stay in view ===== */
.hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content[data-items]:not([data-items=""])::before { content: "Shopping basket (" attr(data-items) ")"; }
.hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content.mps-many table.hikashop_cart tbody {
  max-height: 380px; max-height: calc(100vh - 330px); min-height: 200px; overflow-y: auto; overscroll-behavior: contain;
  border-top: 1px solid #ececec; box-shadow: inset 0 -12px 12px -12px rgba(0,0,0,.18); }
@media (max-width: 640px) {
  .hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content { max-height: calc(100vh - 90px); overflow-y: auto !important; }
  .hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content.mps-many table.hikashop_cart tbody { max-height: calc(100vh - 340px); }
}

/* PayPal express button at the bottom of the drop-down, under View basket, with an "or" line */
.hikashop_cart_module div.hikashop_cart .hikashop_cart_dropdown_content:has(.hikashop_paypal_express) .mps-view-basket { margin-bottom: 4px; }
.hikashop_cart_module div.hikashop_cart .mps-express-or { display: flex; align-items: center; gap: 12px; margin: 10px 20px; font-size: 13px; color: #777; text-transform: uppercase; letter-spacing: .08em; }
.hikashop_cart_module div.hikashop_cart .mps-express-or::before, .hikashop_cart_module div.hikashop_cart .mps-express-or::after { content: ""; flex: 1; height: 1px; background: rgba(0,0,0,.12); }
.hikashop_cart_module div.hikashop_cart .hikashop_paypal_express { margin: 0 20px 20px !important; padding: 0 !important; float: none !important; width: auto !important; }
.hikashop_cart_module div.hikashop_cart .hikashop_paypal_v6_buttons { width: 100% !important; max-width: none !important; margin: 0 !important; }
.hikashop_cart_module div.hikashop_cart .hikashop_paypal_v6_buttons :is(paypal-button, paypal-pay-later-button) { display: block; width: 100%; }
.hikashop_cart_module div.hikashop_cart .hikashop_paypal_v6_buttons [hidden] { display: none !important; }
.hikashop_cart_module div.hikashop_cart .hikashop_paypal_express_error:empty { display: none; }
