/* Cars Part Shop | mobile call and timed dialogs | 2026-11-14 */
.cps-call-ui {
  --cps-accent: #d4a857;
  --cps-ink: #101923;
  --cps-surface: #111d2c;
  --cps-muted: #b9c4d1;
  --cps-edge: rgba(255, 255, 255, .14);
  font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #fff;
  color-scheme: dark
}

.cps-call-ui--workshop {
  --cps-accent: #f6c328;
  --cps-ink: #171b22;
  --cps-surface: #fff;
  --cps-muted: #56606e;
  --cps-edge: #e3e7ec;
  color: #171b22;
  color-scheme: light
}

.cps-call-ui--showroom {
  --cps-accent: #207cf0
}

.cps-call-ui--complex {
  --cps-accent: #ffbe3b;
  --cps-surface: #0c1523
}

.cps-call-float {
  display: none
}

.cps-call-icon {
  display: block;
  width: 27px;
  height: 27px;
  fill: currentColor;
  flex: none
}

@media(max-width:767px) {
  .cps-call-float {
    position: fixed;
    z-index: 140;
    left: max(22px, env(safe-area-inset-left));
    bottom: calc(24px + env(safe-area-inset-bottom));
    width: 60px;
    height: 60px;
    display: grid;
    place-items: center;
    border: 2px solid rgba(255, 255, 255, .75);
    border-radius: 50%;
    background: linear-gradient(145deg, var(--cps-accent), var(--cps-accent));
    color: var(--cps-ink);
    box-shadow: 0 7px 24px rgba(0, 0, 0, .32), inset 0 2px 0 rgba(255, 255, 255, .3);
    isolation: isolate;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation
  }

  .cps-call-float--right {
    left: auto;
    right: max(22px, env(safe-area-inset-right))
  }

  .cps-call-ui--showroom.cps-call-float {
    color: #fff;
    bottom: calc(96px + env(safe-area-inset-bottom))
  }

  .cps-call-float::before,
  .cps-call-float::after {
    content: '';
    position: absolute;
    inset: -2px;
    border: 2px solid var(--cps-accent);
    border-radius: inherit;
    z-index: -1;
    pointer-events: none;
    animation: cps-call-wave 3s ease-out infinite
  }

  .cps-call-float::after {
    animation-delay: 1.5s
  }

  .cps-call-float .cps-call-icon {
    animation: cps-call-ring 3s ease-in-out infinite;
    transform-origin: 50% 65%
  }

  .cps-call-float:active {
    transform: scale(.95)
  }

  .menu-open .cps-call-float,
  .cps-call-open .cps-call-float {
    visibility: hidden;
    pointer-events: none
  }
}

.cps-call-float:focus-visible,
.cps-modal a:focus-visible,
.cps-modal button:focus-visible {
  outline: 3px solid #318bff;
  outline-offset: 5px
}

@keyframes cps-call-wave {
  0% {
    transform: scale(1);
    opacity: .55
  }

  75%,
  100% {
    transform: scale(1.65);
    opacity: 0
  }
}

@keyframes cps-call-ring {

  0%,
  24%,
  100% {
    transform: rotate(0)
  }

  3%,
  9%,
  15% {
    transform: rotate(-17deg)
  }

  6%,
  12%,
  18% {
    transform: rotate(17deg)
  }

  21% {
    transform: rotate(-8deg)
  }
}

.cps-modal:not([open]) {
  display: none
}

.cps-modal {
  box-sizing: border-box;
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  width: calc(100% - 32px);
  max-width: 780px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  border: 1px solid var(--cps-edge);
  border-radius: 24px;
  background: var(--cps-surface);
  color: #fff;
  box-shadow: 0 30px 100px rgba(0, 0, 0, .5);
  overflow: auto;
  overscroll-behavior: contain;
  text-align: left;
  line-height: 1.5;
  letter-spacing: normal
}

.cps-modal[open] {
  animation: cps-call-enter .3s ease-out both
}

.cps-modal::backdrop {
  background: rgba(3, 9, 18, .78);
  backdrop-filter: blur(7px)
}

.cps-modal * {
  box-sizing: border-box
}

.cps-modal h2,
.cps-modal p,
.cps-modal figure {
  margin: 0
}

.cps-modal button {
  font: inherit;
  cursor: pointer
}

.cps-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--cps-edge);
  border-radius: 50%;
  background: var(--cps-surface);
  color: inherit
}

.cps-modal__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2
}

.cps-modal__layout {
  display: grid;
  grid-template-columns: .85fr 1.15fr;
  min-width: 0
}

.cps-modal__visual {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  padding: 32px 24px;
  background: radial-gradient(ellipse at 50% 36%, rgba(212, 168, 87, .17), transparent 70%);
  border-right: 1px solid var(--cps-edge)
}

.cps-modal__part {
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .12)
}

.cps-modal__part img {
  display: block;
  width: 100%;
  height: 190px;
  object-fit: contain;
  max-width: none;
  transform: none
}

.cps-modal__part figcaption {
  color: #253246;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .02em;
  padding-top: 10px
}

.cps-modal__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px
}

.cps-modal__tags span {
  border: 1px solid var(--cps-edge);
  border-radius: 99px;
  padding: 5px 10px;
  font-size: 11px;
  color: var(--cps-muted)
}

.cps-modal__content {
  padding: 54px 30px 30px;
  min-width: 0;
  align-self: center
}

.cps-modal__eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 13px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--cps-accent)
}

.cps-modal__eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cps-accent);
  flex: none
}

.cps-modal h2 {
  font: 650 clamp(25px, 3vw, 33px)/1.13 system-ui, -apple-system, 'Segoe UI', sans-serif;
  letter-spacing: -.035em;
  color: inherit;
  max-width: 16ch
}

.cps-modal__description {
  margin-top: 14px !important;
  color: var(--cps-muted);
  font-size: 14px;
  line-height: 1.65
}

.cps-modal__checklist {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 13px;
  margin: 18px 0 22px;
  padding: 0;
  list-style: none;
  font-size: 11px;
  color: var(--cps-muted)
}

.cps-modal__checklist li::before {
  content: '\2713';
  color: var(--cps-accent);
  margin-right: 5px
}

.cps-modal__call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 72px;
  padding: 13px 16px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: var(--cps-accent);
  color: var(--cps-ink);
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
  text-align: left;
  touch-action: manipulation
}

.cps-modal__call span {
  display: flex;
  flex-direction: column;
  gap: 1px
}

.cps-modal__call small {
  font: 600 11px/1.4 system-ui, sans-serif;
  letter-spacing: .02em
}

.cps-modal__call strong {
  font: 750 clamp(17px, 2vw, 21px)/1.3 system-ui, sans-serif;
  white-space: nowrap;
  letter-spacing: -.03em
}

.cps-modal__hint {
  margin-top: 12px !important;
  text-align: center;
  font-size: 11px;
  color: var(--cps-muted);
  line-height: 1.55
}

.cps-call-ui--workshop .cps-modal__eyebrow {
  color: #725600
}

.cps-call-ui--workshop .cps-modal__eyebrow::before {
  background: #725600
}

.cps-call-ui--workshop .cps-modal__visual {
  background: #f6c328;
  border: 0
}

.cps-call-ui--workshop .cps-modal__tags span {
  color: #403300;
  border-color: rgba(64, 51, 0, .25)
}

.cps-call-ui--workshop .cps-modal__checklist li::before {
  color: #725600
}

.cps-call-ui--workshop.cps-modal {
  border-radius: 8px;
  color: #171b22
}

.cps-call-ui--heritage.cps-modal {
  border-top: 3px solid var(--cps-accent)
}

.cps-call-ui--heritage h2 {
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 500
}

@keyframes cps-call-enter {
  from {
    opacity: 0;
    transform: translateY(12px) scale(.98)
  }

  to {
    opacity: 1;
    transform: none
  }
}

@media(max-width:599px) {
  .cps-modal {
    width: calc(100% - 28px);
    border-radius: 20px
  }

  .cps-modal__layout {
    grid-template-columns: 1fr
  }

  .cps-modal__visual {
    padding: 24px 24px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--cps-edge);
    gap: 12px
  }

  .cps-modal__part {
    padding: 10px 16px;
    width: 100%
  }

  .cps-modal__part img {
    height: 125px
  }

  .cps-modal__part figcaption {
    padding-top: 4px;
    font-size: 10px
  }

  .cps-modal__content {
    padding: 22px 22px 24px
  }

  .cps-modal h2 {
    font-size: 28px;
    max-width: 19ch
  }

  .cps-modal__eyebrow {
    font-size: 9px;
    margin-bottom: 10px
  }

  .cps-modal__description {
    font-size: 13px;
    margin-top: 10px !important
  }

  .cps-modal__checklist {
    margin: 13px 0 17px
  }

  .cps-modal__close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px
  }
}

/* Only this project uses an edge-to-edge mobile dialog. */
@media(max-width:767px) {
  .cps-modal--fullscreen {
    inset: 0;
    margin: 0;
    width: 100%;
    max-width: none;
    height: 100vh;
    height: 100dvh;
    max-height: none;
    border: 0;
    border-radius: 0;
    padding: max(24px, env(safe-area-inset-top)) max(24px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    background: radial-gradient(ellipse at 80% 0, rgba(44, 81, 122, .24), transparent 60%), #0c1523
  }

  .cps-modal--fullscreen .cps-modal__layout {
    grid-template-columns: 1fr;
    min-height: 100%;
    width: 100%;
    max-width: 520px;
    margin: auto;
    align-content: center;
    gap: 24px
  }

  .cps-modal--fullscreen .cps-modal__visual {
    display: block;
    padding: 0;
    border: 0;
    background: none
  }

  .cps-modal__brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 22px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: -.01em
  }

  .cps-modal__brand small {
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 500;
    color: var(--cps-muted)
  }

  .cps-modal--fullscreen .cps-modal__part {
    border-radius: 20px;
    padding: 18px 24px
  }

  .cps-modal--fullscreen .cps-modal__part img {
    height: clamp(125px, 23dvh, 220px)
  }

  .cps-modal--fullscreen .cps-modal__part figcaption {
    font-size: 11px;
    padding-top: 12px
  }

  .cps-modal--fullscreen .cps-modal__tags {
    margin-top: 14px
  }

  .cps-modal--fullscreen .cps-modal__content {
    padding: 0
  }

  .cps-modal--fullscreen h2 {
    font-size: clamp(29px, 7.9vw, 40px);
    max-width: 16ch
  }

  .cps-modal--fullscreen .cps-modal__call {
    min-height: 80px;
    border-radius: 16px
  }

  .cps-modal--fullscreen .cps-modal__description {
    max-width: 34ch
  }
}

@media(max-width:767px) and (max-height:680px) {
  .cps-modal--fullscreen .cps-modal__layout {
    gap: 18px
  }

  .cps-modal--fullscreen .cps-modal__brand {
    padding-bottom: 15px
  }

  .cps-modal--fullscreen .cps-modal__part img {
    height: 110px
  }

  .cps-modal--fullscreen .cps-modal__tags {
    display: none
  }

  .cps-modal--fullscreen h2 {
    font-size: 28px
  }

  .cps-modal--fullscreen .cps-modal__description {
    font-size: 12px
  }

  .cps-modal--fullscreen .cps-modal__checklist {
    margin: 12px 0 16px
  }
}

@media(prefers-reduced-motion:reduce) {

  .cps-call-float::before,
  .cps-call-float::after,
  .cps-call-float .cps-call-icon,
  .cps-modal[open] {
    animation: none !important
  }

  .cps-call-float::before,
  .cps-call-float::after {
    display: none
  }
}
