/* Rocket Grunt TCG – mini basket (header dropdown + OceanWP mobile cart sidebar), 2026-10-14. Matches the basket/checkout.
   Markup: rg-checkout/templates/cart/mini-cart.php (.rg-mc). Containers are only restyled when they hold the new markup (:has).
   ":is(#rg-mc-x, body)" gives every rule an id-level weight so OceanWP's widget rules and rg-dark.css don't win. */

:is(#rg-mc-x, body) .rg-mc {
  --mc-card: #fff; --mc-ink: #1b1e23; --mc-ink-2: #4a4f57; --mc-muted: #737a84; --mc-line: #dadee4; --mc-line-soft: #eceef1;
  --mc-tile: #f1f3f6; --mc-hover: #f6f7f9; --mc-red: #e63329; --mc-red-ink: #d42d24; --mc-red-soft: #fdeeed; --mc-ok: #17924a;
  display: block; padding: 0; margin: 0; color: var(--mc-ink-2); font: 400 14px/1.5 Poppins, system-ui, sans-serif; text-align: left;
}
@media (prefers-color-scheme: dark) {
  :is(#rg-mc-x, body) .rg-mc {
    --mc-card: #1a1d22; --mc-ink: #eceef1; --mc-ink-2: #c3c8cf; --mc-muted: #8f97a2; --mc-line: #3f4650; --mc-line-soft: #2a2f36;
    --mc-tile: #eef0f3; --mc-hover: #22262c; --mc-red-ink: #ef6a63; --mc-red-soft: rgba(236,98,91,.12); --mc-ok: #3ccf7a;
  }
}
:is(#rg-mc-x, body) .rg-mc *, :is(#rg-mc-x, body) .rg-mc *::before, :is(#rg-mc-x, body) .rg-mc *::after { box-sizing: border-box; }

/* ---------- containers ---------- */
#site-header .current-shop-items-dropdown:has(.rg-mc) {
  width: 384px; right: -14px; padding: 0; border: 1.5px solid #dadee4; border-radius: 18px; background: #fff; overflow: hidden;
  box-shadow: 0 2px 4px rgba(20,22,26,.04), 0 24px 48px -20px rgba(20,22,26,.35); margin-top: 6px;
}
#site-header .current-shop-items-dropdown:has(.rg-mc) .current-shop-items-inner,
#site-header .current-shop-items-dropdown:has(.rg-mc) .widget_shopping_cart { padding: 0; margin: 0; border: 0; background: none; }
@media (prefers-color-scheme: dark) {
  #site-header .current-shop-items-dropdown:has(.rg-mc) { background: #1a1d22; border-color: #3f4650; box-shadow: 0 2px 4px rgba(0,0,0,.3), 0 24px 48px -18px rgba(0,0,0,.8); }
}
#oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) { width: min(380px, 92vw); padding: 0; background: #fff; }
#oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) .owp-cart-title,
#oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) .divider { display: none; }
#oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) .oceanwp-cart-close { top: 8px; right: 8px; opacity: .7; }
#oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) .owp-mini-cart,
#oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) .widget_shopping_cart { padding: 0; margin: 0; }
@media (prefers-color-scheme: dark) {
  #oceanwp-cart-sidebar-wrap .oceanwp-cart-sidebar:has(.rg-mc) { background: #1a1d22; }
}
#oceanwp-cart-sidebar-wrap .rg-mc.rg-mc .rg-mc-h { padding: 22px 60px 14px 20px; justify-content: flex-start; gap: 10px; }
#oceanwp-cart-sidebar-wrap .rg-mc.rg-mc ul.rg-mc-list { max-height: none; }
#oceanwp-cart-sidebar-wrap .rg-mc.rg-mc .rg-mc-empty { padding-top: 64px; }

/* ---------- head ---------- */
:is(#rg-mc-x, body) .rg-mc .rg-mc-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 18px 10px; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-h b { font-size: 15px; font-weight: 700; color: var(--mc-ink); }
:is(#rg-mc-x, body) .rg-mc .rg-mc-h span { font-size: 12.5px; color: var(--mc-muted); }

/* ---------- lines ---------- */
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list { list-style: none; margin: 0; padding: 0 8px 6px; max-height: min(46vh, 360px); overflow-y: auto; border: 0; }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li.mini_cart_item {
  position: relative; display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: 8px 12px; align-items: start;
  min-height: 0; margin: 0; padding: 10px; border: 0; border-radius: 12px; background: none; transition: background .15s;
}
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li.mini_cart_item:hover { background: var(--mc-hover); }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li.mini_cart_item::before, :is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li.mini_cart_item::after { display: none; content: none; }
/* grid: thumb | name + unit price | line price  /  thumb | stepper | remove (under the price) */
:is(#rg-mc-x, body) .rg-mc .rg-mc-thumb { grid-column: 1; grid-row: 1 / span 2; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-info { grid-column: 2; grid-row: 1; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-sub { grid-column: 3; grid-row: 1; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty { grid-column: 2; grid-row: 2; justify-self: start; }
:is(#rg-mc-x, body) .rg-mc.rg-mc li.mini_cart_item > a.remove.remove_from_cart_button { grid-column: 3; grid-row: 2; justify-self: end; align-self: center; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-thumb { position: relative; width: 56px; height: 56px; border-radius: 10px; background: var(--mc-tile); display: grid; place-items: center; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-thumb a { display: grid; place-items: center; width: 100%; height: 100%; }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li .rg-mc-thumb img {
  position: static; width: 84%; height: 84%; max-width: none; margin: 0; padding: 0; object-fit: contain; mix-blend-mode: multiply;
  background: none; border-radius: 0; opacity: 1; transform: none;
}
:is(#rg-mc-x, body) .rg-mc .rg-mc-thumb b { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: var(--mc-ink); color: var(--mc-card); font-size: 11px; font-weight: 700; line-height: 1; display: grid; place-items: center; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-info { display: grid; gap: 2px; min-width: 0; }
:is(#rg-mc-x, body) .rg-mc a.rg-mc-name, :is(#rg-mc-x, body) .rg-mc span.rg-mc-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  font-size: 13.5px; font-weight: 600; line-height: 1.35; color: var(--mc-ink); text-decoration: none;
}
:is(#rg-mc-x, body) .rg-mc a.rg-mc-name:hover { color: var(--mc-red-ink); }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li .quantity { display: block; margin: 0; float: none; font-size: 12px; line-height: 1.4; color: var(--mc-muted); font-weight: 400; }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li .quantity .woocommerce-Price-amount { color: inherit; font-weight: inherit; }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li dl.variation { display: block; margin: 0; font-size: 12px; color: var(--mc-muted); }
:is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li dl.variation dt, :is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li dl.variation dd, :is(#rg-mc-x, body) .rg-mc ul.rg-mc-list li dl.variation p { display: inline; margin: 0; padding: 0; float: none; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-sub { align-self: start; padding-top: 1px; font-size: 13.5px; font-weight: 700; line-height: 1.35; color: var(--mc-ink); white-space: nowrap; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-sub .woocommerce-Price-amount { color: inherit; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-sub.is-busy { opacity: .45; }

/* quantity stepper (under the name) + remove (under the price) */
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty {
  display: inline-flex; align-items: center; height: 30px; border: 1.5px solid var(--mc-line); border-radius: 999px; background: var(--mc-card); overflow: hidden;
}
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty button.rg-mc-step {
  display: grid; place-items: center; width: 30px; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none;
  color: var(--mc-ink); font: 600 17px/1 Poppins, system-ui, sans-serif; cursor: pointer; transition: background .15s, color .15s;
}
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty button.rg-mc-step:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--mc-red-soft); color: var(--mc-red-ink); }
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty button.rg-mc-step:disabled, :is(#rg-mc-x, body) .rg-mc .rg-mc-qty button.rg-mc-step[aria-disabled="true"] { color: var(--mc-line); cursor: default; }
/* per-order limit / stock notice (2026-10-14): own row under the stepper */
:is(#rg-mc-x, body) .rg-mc .rg-mc-limit { grid-column: 2 / -1; grid-row: 3; margin: -2px 0 0; font-size: 12px; font-weight: 600; line-height: 1.35; color: var(--mc-red-ink); }
:is(#rg-mc-x, body) .rg-mc .rg-mc-limit[hidden] { display: none; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty button.rg-mc-step:focus-visible { outline: 2px solid rgba(230,51,41,.55); outline-offset: -2px; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-qty output { min-width: 24px; text-align: center; font-size: 13px; font-weight: 700; color: var(--mc-ink); font-variant-numeric: tabular-nums; }
:is(#rg-mc-x, body) .rg-mc.rg-mc li.mini_cart_item > a.remove.remove_from_cart_button {
  position: static; display: grid; place-items: center; width: 30px; height: 30px; margin: 0; padding: 0; border-radius: 50%;
  border: 1.5px solid var(--mc-line); background: transparent; color: var(--mc-muted); font-size: 0; line-height: 1; text-decoration: none; transition: .15s;
}
:is(#rg-mc-x, body) .rg-mc.rg-mc li.mini_cart_item > a.remove.remove_from_cart_button svg { width: 12px; height: 12px; }
:is(#rg-mc-x, body) .rg-mc.rg-mc li.mini_cart_item > a.remove.remove_from_cart_button:hover { border-color: var(--mc-red); color: var(--mc-red-ink); background: var(--mc-red-soft); }
:is(#rg-mc-x, body) .rg-mc.rg-mc li.mini_cart_item > a.remove.remove_from_cart_button::after, :is(#rg-mc-x, body) .rg-mc.rg-mc li.mini_cart_item > a.remove.remove_from_cart_button::before { display: none; }
:is(#rg-mc-x, body) .rg-mc .blockUI.blockOverlay { border-radius: 12px; }

/* ---------- free delivery meter ---------- */
:is(#rg-mc-x, body) .rg-mc .rg-meter { margin: 4px 18px 0; padding: 12px 14px; border-radius: 12px; background: var(--mc-hover); display: grid; gap: 8px; }
:is(#rg-mc-x, body) .rg-mc .rg-meter p { position: relative; margin: 0; font-size: 12.5px; line-height: 1.55; color: var(--mc-ink-2); text-wrap: pretty; }
:is(#rg-mc-x, body) .rg-mc .rg-meter p b, :is(#rg-mc-x, body) .rg-mc .rg-meter p .woocommerce-Price-amount { color: var(--mc-ink); font-weight: 700; }
/* tick hangs in its own gutter so a wrapped line lines up with the text, not under the icon */
:is(#rg-mc-x, body) .rg-mc .rg-meter.is-ok p { padding-left: 22px; }
:is(#rg-mc-x, body) .rg-mc .rg-meter p svg { position: absolute; left: 0; top: calc(.775em - 8px); width: 16px; height: 16px; margin: 0; }
:is(#rg-mc-x, body) .rg-mc .rg-bar { height: 5px; border-radius: 5px; background: var(--mc-line-soft); overflow: hidden; }
:is(#rg-mc-x, body) .rg-mc .rg-bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, #e63329, #b71c1c); }
:is(#rg-mc-x, body) .rg-mc .rg-meter.is-ok .rg-bar i { background: var(--mc-ok); }
:is(#rg-mc-x, body) .rg-mc .rg-meter.is-ok p { color: var(--mc-ok); font-weight: 600; }

/* ---------- total + buttons ---------- */
:is(#rg-mc-x, body) .rg-mc .rg-mc-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 0; padding: 14px 18px 0;
  border: 0; border-top: 1px solid var(--mc-line-soft); background: none;
}
:is(#rg-mc-x, body) .rg-mc .rg-mc-total::after { display: none; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-total span { font-size: 14px; color: var(--mc-ink-2); float: none; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-total strong, :is(#rg-mc-x, body) .rg-mc .rg-mc-total .amount {
  float: none; font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--mc-ink); text-transform: none; line-height: 1.2;
}
:is(#rg-mc-x, body) .rg-mc p.rg-mc-note { margin: 2px 0 0; padding: 0 18px; font-size: 12px; color: var(--mc-muted); }
:is(#rg-mc-x, body) .rg-mc p.rg-mc-btns { display: grid; grid-template-columns: 1fr 1.25fr; gap: 10px; margin: 0; padding: 14px 18px 18px; }
:is(#rg-mc-x, body) .rg-mc p.rg-mc-btns::after { display: none; }
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn {
  float: none; width: auto; display: flex; align-items: center; justify-content: center; min-height: 46px; margin: 0; padding: 0 16px;
  border-radius: 999px; border: 1.5px solid transparent; font-size: 14px; font-weight: 700; letter-spacing: 0; text-transform: none; line-height: 1.2;
  text-decoration: none; text-align: center; transition: transform .15s ease, box-shadow .15s ease, border-color .15s;
}
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn::after, :is(#rg-mc-x, body) .rg-mc a.rg-mc-btn::before { display: none; content: none; }
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn--ghost { background: var(--mc-card); color: var(--mc-ink); border-color: var(--mc-line); }
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn--ghost:hover { border-color: var(--mc-ink); color: var(--mc-ink); background: var(--mc-card); }
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn--red, :is(#rg-mc-x, body) .rg-mc a.rg-mc-btn--red:visited {
  color: #fff; background: linear-gradient(135deg, #e63329 0, #b71c1c 100%); box-shadow: 0 10px 22px -12px rgba(230,51,41,.85);
}
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn--red:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 14px 26px -12px rgba(230,51,41,.95); }
:is(#rg-mc-x, body) .rg-mc a.rg-mc-btn:focus-visible { outline: 3px solid rgba(230,51,41,.45); outline-offset: 2px; }

/* ---------- empty ---------- */
:is(#rg-mc-x, body) .rg-mc .rg-mc-empty { display: grid; justify-items: center; gap: 4px; padding: 28px 22px 24px; margin: 0; text-align: center; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-empty-i { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--mc-hover); color: var(--mc-muted); margin-bottom: 8px; }
:is(#rg-mc-x, body) .rg-mc .rg-mc-empty b { font-size: 15px; font-weight: 700; color: var(--mc-ink); }
:is(#rg-mc-x, body) .rg-mc .rg-mc-empty > span:not(.rg-mc-empty-i) { font-size: 13px; color: var(--mc-muted); }
:is(#rg-mc-x, body) .rg-mc .rg-mc-empty a.rg-mc-btn { margin-top: 14px; min-width: 180px; }

@media (max-width: 480px) {
  :is(#rg-mc-x, body) .rg-mc p.rg-mc-btns { grid-template-columns: 1fr; }
}
