:root {
  --cartoon-button-ink: #071a34;
  --cartoon-button-paper: #fffaf0;
  --cartoon-button-focus: #3f8efc;
  --cartoon-button-font: "Arial Rounded MT Bold", "Trebuchet MS", ui-rounded, system-ui, sans-serif;
}

/*
  Cartoon Parking Button Kit
  --------------------------
  Base component: .cartoon-button
  Variants:       .cb--submit, .cb--bad, .cb--rate, .cb--report,
                  .cb--shame, .cb--upload, .cb--roast, .cb--wall,
                  .cb--explore, .cb--radio

  The default button footprint is deliberately standardised at 360 x 140 px.
  Each variant changes the silhouette/accent only, while keeping typography,
  icon column, spacing and interaction behaviour consistent.
*/

.cartoon-button {
  --cb-accent: #377fbd;
  --cb-width: 360px;
  --cb-height: 140px;
  --cb-radius: 28px;
  --cb-border: 3px;
  --cb-shadow-x: 10px;
  --cb-shadow-y: 10px;
  --cb-icon-stage: 94px;
  --cb-icon-size: 84px;
  --cb-art-scale: 1;

  position: relative;
  isolation: isolate;
  width: min(100%, var(--cb-width));
  height: var(--cb-height);
  padding: 20px 28px 20px 22px;
  border: var(--cb-border) solid var(--cartoon-button-ink);
  border-radius: var(--cb-radius);
  background: var(--cartoon-button-paper);
  color: var(--cartoon-button-ink);
  box-shadow: var(--cb-shadow-x) var(--cb-shadow-y) 0 var(--cb-accent);

  display: grid;
  grid-template-columns: var(--cb-icon-stage) minmax(0, 1fr);
  align-items: center;
  column-gap: 20px;

  font-family: var(--cartoon-button-font);
  font-size: 32px;
  font-weight: 900;
  font-style: normal;
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-align: left;
  text-decoration: none;
  text-rendering: geometricPrecision;

  appearance: none;
  -webkit-appearance: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  user-select: none;

  transition:
    transform 150ms cubic-bezier(.2, .75, .3, 1),
    box-shadow 150ms cubic-bezier(.2, .75, .3, 1),
    filter 150ms ease;
}

.cartoon-button::before,
.cartoon-button::after {
  pointer-events: none;
}

.cartoon-button:link,
.cartoon-button:visited,
.cartoon-button:hover,
.cartoon-button:active,
.cartoon-button:focus {
  text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
  .cartoon-button:hover {
    transform: translate(-2px, -2px);
    box-shadow: calc(var(--cb-shadow-x) + 2px) calc(var(--cb-shadow-y) + 2px) 0 var(--cb-accent);
  }
}

.cartoon-button:active,
.cartoon-button.is-pressed {
  transform: translate(6px, 6px);
  box-shadow: 4px 4px 0 var(--cb-accent);
}

.cartoon-button:focus-visible {
  outline: 4px solid var(--cartoon-button-focus);
  outline-offset: 7px;
}

.cartoon-button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  filter: grayscale(0.22);
}

.cartoon-button:disabled:hover {
  transform: none;
  box-shadow: var(--cb-shadow-x) var(--cb-shadow-y) 0 var(--cb-accent);
}

.cb__icon-wrap,
.cb__label {
  position: relative;
  z-index: 3;
}

.cb__icon-wrap {
  width: var(--cb-icon-stage);
  height: var(--cb-icon-stage);
  display: grid;
  place-items: center;
  justify-self: center;
}

.cb__icon {
  display: block;
  width: var(--cb-icon-size);
  height: var(--cb-icon-size);
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform: scale(var(--cb-art-scale));
  transform-origin: center;
  pointer-events: none;
  user-select: none;
}

.cb__label {
  min-width: 0;
  display: block;
  justify-self: stretch;
  align-self: center;
  white-space: nowrap;
}

/* 1 — Submit Spot --------------------------------------------------------- */
.cb--submit {
  --cb-accent: #377fbd;
  --cb-radius: 2px;
  --cb-icon-size: 76px;
  --cb-art-scale: 1.02;
  padding-left: 20px;
}

.cb--submit .cb__icon-wrap {
  width: 90px;
  height: 90px;
  border: 3px solid var(--cartoon-button-ink);
  background: var(--cartoon-button-paper);
}

.cb--submit .cb__icon-wrap::after {
  content: "";
  position: absolute;
  top: -10px;
  right: -10px;
  width: 23px;
  height: 23px;
  border: 3px solid var(--cartoon-button-ink);
  background: #87b274;
}

/* 2 — Bad Parking --------------------------------------------------------- */
.cb--bad {
  --cb-accent: #eb6982;
  --cb-radius: 30px;
  --cb-icon-size: 88px;
  --cb-art-scale: 1.03;
}

/* 3 — Rate This Park ------------------------------------------------------ */
.cb--rate {
  --cb-accent: #6aa98f;
  --cb-radius: 999px;
  --cb-icon-size: 82px;
  --cb-art-scale: 0.98;
  padding-inline: 24px 32px;
}

/* 4 — Report Offender ----------------------------------------------------- */
.cb--report {
  --cb-accent: #efb749;
  --cb-icon-size: 90px;
  --cb-art-scale: 1.04;
  --cb-shape: polygon(
    6% 0, 94% 0,
    94% 7%, 100% 7%,
    100% 93%, 94% 93%,
    94% 100%, 6% 100%,
    6% 93%, 0 93%,
    0 7%, 6% 7%
  );
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(var(--cb-shadow-x) var(--cb-shadow-y) 0 var(--cb-accent));
}

.cb--report::before,
.cb--report::after,
.cb--upload::before,
.cb--upload::after,
.cb--wall::before,
.cb--wall::after {
  content: "";
  position: absolute;
  z-index: 0;
}

.cb--report::before,
.cb--upload::before,
.cb--wall::before {
  inset: 0;
  background: var(--cartoon-button-ink);
  clip-path: var(--cb-shape);
}

.cb--report::after,
.cb--upload::after,
.cb--wall::after {
  inset: 3px;
  background: var(--cartoon-button-paper);
  clip-path: var(--cb-shape);
}

/* 5 — Parking Shame ------------------------------------------------------- */
.cb--shame {
  --cb-accent: #79aa98;
  --cb-radius: 28px;
  --cb-icon-size: 84px;
  --cb-art-scale: 1;
}

.cb--shame::before {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 9px;
  border: 3px dashed var(--cartoon-button-ink);
  border-radius: 18px;
  opacity: 0.9;
}

/* 6 — Upload Car ---------------------------------------------------------- */
.cb--upload {
  --cb-accent: #3a82c4;
  --cb-icon-size: 86px;
  --cb-art-scale: 1.03;
  --cb-shape: polygon(0 0, 86% 0, 100% 25%, 100% 100%, 0 100%);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(var(--cb-shadow-x) var(--cb-shadow-y) 0 var(--cb-accent));
}

/* 7 — Roast This Ride ----------------------------------------------------- */
.cb--roast {
  --cb-accent: #ed6e83;
  --cb-radius: 34px;
  --cb-icon-size: 88px;
  --cb-art-scale: 1.02;
}

/* 8 — Wall of Shame ------------------------------------------------------- */
.cb--wall {
  --cb-accent: #ef7047;
  --cb-icon-size: 80px;
  --cb-art-scale: 0.98;
  --cb-shape: polygon(
    0% 13%, 2% 8%, 5% 7%, 8% 10%, 11% 6%, 14% 9%, 17% 6%, 20% 9%,
    23% 6%, 26% 9%, 29% 6%, 32% 9%, 35% 6%, 38% 9%, 41% 6%, 44% 9%,
    47% 6%, 50% 9%, 53% 6%, 56% 9%, 59% 6%, 62% 9%, 65% 6%, 68% 9%,
    71% 6%, 74% 9%, 77% 6%, 80% 9%, 83% 6%, 86% 9%, 89% 6%, 92% 9%,
    95% 7%, 98% 9%, 100% 14%,
    99% 86%, 97% 92%, 94% 93%, 91% 90%, 88% 94%, 85% 91%, 82% 94%,
    79% 91%, 76% 94%, 73% 91%, 70% 94%, 67% 91%, 64% 94%, 61% 91%,
    58% 94%, 55% 91%, 52% 94%, 49% 91%, 46% 94%, 43% 91%, 40% 94%,
    37% 91%, 34% 94%, 31% 91%, 28% 94%, 25% 91%, 22% 94%, 19% 91%,
    16% 94%, 13% 91%, 10% 94%, 7% 91%, 4% 93%, 1% 87%
  );
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(var(--cb-shadow-x) var(--cb-shadow-y) 0 var(--cb-accent));
}

/* 9 — Explore Disasters --------------------------------------------------- */
.cb--explore {
  --cb-accent: #6da88d;
  --cb-radius: 999px;
  --cb-icon-size: 88px;
  --cb-art-scale: 1.03;
  padding-inline: 24px 32px;
}

/* 10 — Radio -------------------------------------------------------------- */
.cb--radio {
  --cb-accent: #c28b4a;
  --cb-radius: 30px;
  --cb-icon-size: 88px;
  --cb-art-scale: 1.04;
}

/* Correct interaction shadows for custom silhouettes. */
@media (hover: hover) and (pointer: fine) {
  .cb--report:hover,
  .cb--upload:hover,
  .cb--wall:hover {
    box-shadow: none;
    filter: drop-shadow(calc(var(--cb-shadow-x) + 2px) calc(var(--cb-shadow-y) + 2px) 0 var(--cb-accent));
  }
}

.cb--report:active,
.cb--report.is-pressed,
.cb--upload:active,
.cb--upload.is-pressed,
.cb--wall:active,
.cb--wall.is-pressed {
  box-shadow: none;
  filter: drop-shadow(4px 4px 0 var(--cb-accent));
}

.cb--report:disabled:hover,
.cb--upload:disabled:hover,
.cb--wall:disabled:hover {
  transform: none;
  box-shadow: none;
  filter: grayscale(0.22) drop-shadow(var(--cb-shadow-x) var(--cb-shadow-y) 0 var(--cb-accent));
}

/* Optional sizing helpers ------------------------------------------------- */
.cartoon-button.cb--compact {
  --cb-width: 300px;
  --cb-height: 112px;
  --cb-icon-stage: 72px;
  --cb-icon-size: 66px;
  --cb-shadow-x: 8px;
  --cb-shadow-y: 8px;
  column-gap: 16px;
  padding: 16px 22px 16px 18px;
  font-size: 25px;
}

.cartoon-button.cb--full {
  --cb-width: 100%;
}

@media (max-width: 460px) {
  .cartoon-button {
    --cb-height: 126px;
    --cb-icon-stage: 82px;
    --cb-icon-size: 74px;
    --cb-shadow-x: 8px;
    --cb-shadow-y: 8px;
    column-gap: 16px;
    padding: 17px 22px 17px 18px;
    font-size: 28px;
  }

  .cb--submit .cb__icon-wrap {
    width: 80px;
    height: 80px;
  }

  .cb--submit {
    --cb-icon-size: 68px;
  }

  .cb--bad,
  .cb--report,
  .cb--roast,
  .cb--explore,
  .cb--radio {
    --cb-icon-size: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cartoon-button {
    transition: none;
  }
}
