html.gmc-open { overflow: hidden; }
dialog.gmc { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(480px, 100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; box-sizing: border-box; padding: 0; border: 0; border-left: 1px solid #404247; background: #202225; color: #f5f5f5; box-shadow: -16px 0 60px #0006; font: 15px/1.45 Arial, sans-serif; }
dialog.gmc[open] { display: flex; flex-direction: column; animation: gmc-enter .2s ease-out; }
.gmc::backdrop { background: #0008; }
.gmc * { box-sizing: border-box; }
.gmc-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 22px 24px; border-bottom: 1px solid #404247; }
.gmc-header h2 { color: #fff; font: 600 24px/1.2 Arial,sans-serif; margin: 0; }
.gmc button { cursor: pointer; font: inherit; }
.gmc .gmc-close { width: 40px; height: 40px; border: 0; border-radius: 8px; background: #303337; color: #fff; font-size: 28px; }
.gmc-message { flex: 0 0 auto; padding: 8px 24px; color: #e2d2e6; font-size: 13px; }
.gmc-message:empty { padding: 0; }
.gmc-items { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 24px; }
.gmc-item { display: grid; grid-template-columns: 76px minmax(0,1fr); gap: 16px; padding: 22px 0; border-bottom: 1px solid #404247; }
.gmc-image { display: flex; align-items: center; justify-content: center; width: 76px; height: 76px; background: #fff; border-radius: 8px; overflow: hidden; }
.gmc-image img { width: 100%; height: 100%; object-fit: contain; }
.gmc .gmc-name { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; color: #fff; text-decoration: none; font-weight: 500; line-height: 1.4; }
.gmc-price { color: #fff; font-weight: 600; margin: 10px 0; }
.gmc-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gmc .gmc-control { width: 34px; height: 34px; padding: 0; border: 1px solid #62666c; border-radius: 6px; background: #303337; color: #fff; font-size: 19px; }
.gmc .gmc-control:disabled { opacity: .4; cursor: default; }
.gmc-quantity { min-width: 48px; text-align: center; color: #eee; }
.gmc .gmc-remove { background: transparent; color: #d8c3dd; border: 0; padding: 6px 0 6px 6px; margin-left: auto; font-size: 12px; }
.gmc-summary { flex: 0 0 auto; padding: 20px 24px 24px; border-top: 1px solid #404247; background: #25272b; }
.gmc-total { color: #fff; font-size: 21px; font-weight: 600; }
.gmc-note { color: #c3c5ca; font-size: 13px; margin: 10px 0 16px; }
.gmc .gmc-go { display: block; text-align: center; margin-top: 16px; padding: 14px; border-radius: 8px; color: #fff; background: #92289a; text-decoration: none; font-weight: 600; }
.gmc .gmc-go:hover { background: #ac2dc3; }
.gmc a:focus-visible,.gmc button:focus-visible { outline: 2px solid #e1b8e8; outline-offset: 3px; }
.gmc-empty { color: #c3c5ca; padding: 28px 0; }
@keyframes gmc-enter { from { transform: translateX(100%); } to { transform: translateX(0); } }
@media(prefers-reduced-motion: reduce) { dialog.gmc[open] { animation: none; } }

/* Match the full cart's graphite surfaces and animated violet border. */
@property --gmc-spark-angle { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes gmc-border-spark {
  0% { --gmc-spark-angle: 0deg; opacity: 0; }
  2% { --gmc-spark-angle: 0deg; opacity: 1; }
  38% { --gmc-spark-angle: 360deg; opacity: 1; }
  40%,100% { --gmc-spark-angle: 360deg; opacity: 0; }
}
dialog.gmc {
  inset: 12px 12px 12px auto;
  width: min(480px, calc(100vw - 24px));
  height: calc(100dvh - 24px);
  max-height: calc(100dvh - 24px);
  border: 1px solid #393b3e;
  border-radius: 14px;
  background: #101213;
  box-shadow: 7px 7px 18px rgba(0,0,0,.55), -16px 0 60px #0006;
  font-family: 'Raleway', Arial, sans-serif;
  isolation: isolate;
  overflow: hidden;
}
.gmc-header { background: #101213; border-color: #303235; }
.gmc-header h2 { font-family: 'Raleway', Arial, sans-serif; }
.gmc-items { scrollbar-width: thin; scrollbar-color: #555658 #101213; }
.gmc-item { border-color: #343037; }
.gmc .gmc-control, .gmc .gmc-close {
  background: #1c1d20; border-color: #393b3e; border-radius: 8px;
  box-shadow: 3px 3px 9px rgba(0,0,0,.25);
}
.gmc .gmc-control:not(:disabled):hover, .gmc .gmc-close:hover { background: #303135; }
.gmc-summary {
  position: relative; isolation: isolate; background: #1c1d20 !important;
  margin: 12px; padding: 20px; border: 0; border-radius: 14px;
  box-shadow: 7px 7px 18px rgba(0,0,0,.55);
}
.gmc-summary::before {
  --gmc-spark-angle: 0deg;
  content: ''; position: absolute; inset: 0; z-index: 2;
  box-sizing: border-box; padding: 1px; border-radius: inherit;
  background: conic-gradient(from var(--gmc-spark-angle), transparent 0deg 302deg, rgba(172,45,195,.18) 314deg, rgba(172,45,195,.88) 329deg, #fff 341deg, #d968ee 351deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  filter: drop-shadow(0 0 4px rgba(172,45,195,.68));
  pointer-events: none; animation: gmc-border-spark 10s linear infinite;
}
.gmc-summary > * { position: relative; z-index: 3; }
.gmc-total { font-size: 24px; }
.gmc-note { color: #b9bbc0; }
.gmc .gmc-go { border-radius: 8px; background: #92289a; }
@media(prefers-reduced-motion: reduce) {
  .gmc-summary::before { --gmc-spark-angle: 338deg; animation: none; }
}
@media(max-height: 600px) {
  .gmc-header { padding: 12px 20px; }
  .gmc-summary { padding: 14px 16px; margin: 8px 12px; }
  .gmc-total { font-size: 20px; }
  .gmc-note { margin: 6px 0 10px; }
  .gmc .gmc-go { margin-top: 10px; padding: 11px; }
}

/* Stable figures for cart amounts, quantities and summary details. */
dialog.gmc { font-variant-numeric: lining-nums tabular-nums; }
.gmc-summary-detail { color: #b9bbc0; font-size: 13px; line-height: 1.5; margin-top: 4px; }

/* Use the existing ParkCalc trash icon for item removal. */
.gmc .gmc-remove { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 4px; flex: 0 0 28px; border-radius: 0; color: #999; }
.gmc .gmc-remove img { display: none; }
.gmc .gmc-remove::before { content: ""; display: block; width: 18px; height: 20px; background-color: currentColor; -webkit-mask: url("/local/tools/parkcalc/icons/trash.svg") center / contain no-repeat; mask: url("/local/tools/parkcalc/icons/trash.svg") center / contain no-repeat; }
.gmc .gmc-remove:not(:disabled):hover { background: transparent; color: #d97777; }
.gmc .gmc-remove:disabled { opacity: .4; cursor: default; }

/* Unified quantity counter, matching the catalog control. */
.gmc-counter { display: grid; grid-template-columns: 48px 64px 48px; align-items: center; height: 42px; background: #191b1c; border-radius: 9px; overflow: hidden; }
.gmc .gmc-counter .gmc-control { width: 48px; height: 42px; border: 0; border-radius: 0; background: transparent; box-shadow: none; padding: 0; font-size: 21px; font-weight: 600; }
.gmc .gmc-counter .gmc-control:not(:disabled):hover { background: transparent; color: #ac2dc3; }
.gmc-counter .gmc-quantity { position: relative; min-width: 0; margin: 0; font-size: 14px; line-height: 42px; font-variant-numeric: lining-nums tabular-nums; }
.gmc-counter .gmc-quantity::before, .gmc-counter .gmc-quantity::after { content: ""; position: absolute; top: 10px; bottom: 10px; width: 1px; background: linear-gradient(180deg, transparent, #39323e, transparent); }
.gmc-counter .gmc-quantity::before { left: 0; }
.gmc-counter .gmc-quantity::after { right: 0; }

.gmc-position-count { color: #b9bbc0; font-size: 13px; line-height: 18px; min-height: 18px; margin-top: 5px; font-variant-numeric: lining-nums tabular-nums; }

/* Shared basket exports: quiet secondary actions, existing marketing type and colours. */
.gmc-export-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin-top: 14px; }
.gmc .gmc-export, .gnld-cart-export-toolbar [data-cart-export] { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 16px; margin: 0; border: 1px solid #4a3a4d; border-radius: 8px; background: transparent; color: #eee; font: 600 14px/1.3 'Raleway',Arial,sans-serif; font-variant-numeric: lining-nums tabular-nums; cursor: pointer; }
.gmc .gmc-export:not(:disabled):hover, .gnld-cart-export-toolbar [data-cart-export]:not(:disabled):hover { border-color: #ac2dc3; color: #e1b8e8; background: #92289a12; }
.gmc .gmc-export:disabled, .gnld-cart-export-toolbar [data-cart-export]:disabled { opacity: .45; cursor: default; }
.gnld-cart-export-toolbar { display: flex; justify-content: flex-end; align-items: center; flex-wrap: wrap; gap: 10px; margin: 0 0 18px; font-variant-numeric: lining-nums tabular-nums; }
.gnld-cart-export-toolbar [data-cart-export-status] { flex: 1 0 100%; min-height: 18px; color: #b9bbc0; font-size: 13px; text-align: right; }
.gnld-cart-export-toolbar [data-cart-export-status]:empty { display: none; }
.gnld-cart-export-toolbar [data-cart-export]:focus-visible { outline: 2px solid #e1b8e8; outline-offset: 3px; }
body:not(.theme-dark) .gnld-cart-export-toolbar [data-cart-export] { color: #343434; border-color: #b9b1bb; }
body:not(.theme-dark) .gnld-cart-export-toolbar [data-cart-export-status] { color: #666; }
@media(max-width:767px) { .gnld-cart-export-toolbar [data-cart-export] { flex: 1; min-width: 0; min-height: 44px; } .gnld-cart-export-toolbar [data-cart-export-status] { text-align: left; } }
