/* Extra styles for the static copy of the Copperfold demo shop on oclabs.co.uk. */

/* The note at the top of every page saying this is an OC Labs demo. It uses
   the OC Labs colour rather than the shop's, so it reads as separate. */
.demo-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.15rem 1.5rem;
  padding: 0.55rem var(--page-margin, 20px);
  background: #4b3cfa;
  color: #fff;
  font-size: 0.8125rem;
  line-height: 1.45;
}

.demo-bar a {
  color: inherit;
}

.demo-bar a:hover {
  text-decoration-thickness: 2px;
}

.demo-bar__about {
  font-weight: var(--font-body-weight-bold, 700);
  white-space: nowrap;
}

/* Shown when someone presses Check out. */
.demo-checkout {
  width: min(31rem, calc(100vw - 2 * var(--page-margin, 20px)));
  max-width: none;
  margin: auto; /* the theme's reset removes the browser's centring */
  padding: clamp(1.5rem, 5vw, 2.5rem);
  border: 0;
  border-radius: var(--radius, 4px);
  box-shadow: 0 1.5rem 4rem rgb(30 25 22 / 0.35);
}

.demo-checkout::backdrop {
  background: rgb(30 25 22 / 0.55);
}

.demo-checkout h2 {
  margin-bottom: 1rem;
  font-size: clamp(2.25rem, 7vw, 3rem);
}

.demo-checkout p {
  margin-bottom: 1.75rem;
}

.demo-checkout__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.75rem;
}

@media (prefers-reduced-motion: no-preference) {
  .demo-checkout[open] {
    animation: demo-checkout-in 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
  }

  .demo-checkout[open]::backdrop {
    animation: demo-backdrop-in 220ms ease-out;
  }
}

@keyframes demo-checkout-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
  }
}

@keyframes demo-backdrop-in {
  from {
    opacity: 0;
  }
}

@media (max-width: 549px) {
  .demo-bar__wide {
    display: none;
  }
}
