/**
 * Mimi's Halloween homepage test — seasonal presentation and transition.
 * Version: 0.4.0
 * Every selector is confined to bodies explicitly enabled by this plugin.
 */

/* Inactive content remains absent before JavaScript and after mode changes. */
body.mimis-halloween-test [hidden],
body.mimis-halloween-test:not([data-mht-theme="halloween"]) .mht-halloween-only,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-normal-only {
  display: none !important;
}

/* An invitation that belongs to the page, with room for a clear return button. */
body.mimis-halloween-test .mht-switchbar {
  background: #fff5e7;
  border-bottom: 1px solid #d5c4d7;
  color: #24152e;
  position: relative;
  z-index: 5;
}

body.mimis-halloween-test .mht-switchbar__inner {
  align-items: center;
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  margin: 0 auto;
  max-width: 1440px;
  padding: 1rem 0;
  width: calc(100% - clamp(24px, 4vw, 64px) * 2);
}

body.mimis-halloween-test .mht-switchbar__copy {
  min-width: 0;
}

body.mimis-halloween-test .mht-switchbar__copy p {
  color: inherit;
  font-size: 0.96rem;
  line-height: 1.45;
  margin: 0;
}

body.mimis-halloween-test .mht-switchbar__copy .mht-switchbar__eyebrow {
  color: #6c3c7e;
  font-size: 0.69rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
}

body.mimis-halloween-test button.mht-toggle {
  align-items: center;
  background: #24152e;
  border: 2px solid #24152e;
  border-radius: 999px !important;
  box-shadow: 3px 3px 0 #f78b38;
  color: #fff5e7;
  cursor: pointer;
  display: inline-flex;
  flex: 0 1 auto;
  font-family: fira-sans, Arial, sans-serif;
  font-size: 0.93rem;
  font-weight: 700;
  gap: 0.7rem;
  justify-content: center;
  letter-spacing: 0;
  line-height: 1.25;
  margin: 0;
  max-width: 100%;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  text-align: center;
  text-transform: none;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

body.mimis-halloween-test button.mht-toggle:hover {
  background: #4b2b5b;
  color: #fff5e7;
}

body.mimis-halloween-test button.mht-toggle:focus-visible {
  outline: 3px solid #6c3c7e;
  outline-offset: 5px;
}

body.mimis-halloween-test button.mht-toggle[aria-busy="true"],
body.mimis-halloween-test button.mht-toggle:disabled {
  cursor: progress;
  opacity: 1;
}

body.mimis-halloween-test .mht-toggle__icon {
  color: #f78b38;
  display: block;
  flex: 0 0 23px;
  height: 23px;
  width: 23px;
}

body.mimis-halloween-test .mht-status {
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

/* A fully opaque, deliberately blank screen covers the change underneath. */
body.mimis-halloween-test .mht-transition {
  background: #170f1e;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  position: fixed;
  transition: opacity 220ms ease-in-out;
  z-index: 2147483646;
}

body.mimis-halloween-test .mht-transition.is-covered {
  opacity: 1;
}

body.mimis-halloween-test.mht-transitioning .mht-transition {
  pointer-events: auto;
}

/* The canvas owns opacity during the bat arrival, blackout and departure. */
body.mimis-halloween-test .mht-transition.has-swarm {
  background: transparent;
  opacity: 1;
  transition: none;
}

body.mimis-halloween-test .mht-transition__canvas {
  display: block;
  height: 100%;
  inset: 0;
  pointer-events: none;
  position: absolute;
  width: 100%;
}

/* Warm paper, pumpkin and lilac replace the everyday pastel colour tokens. */
body.mimis-halloween-test.mimis-halloween-test-page[data-mht-theme="halloween"] {
  --mh3-ink: #24152e;
  --mh3-ink-soft: #66536c;
  --mh3-cream: #fff5e7;
  --mh3-paper: #fffbf4;
  --mh3-white: #ffffff;
  --mh3-blue: #bda2db;
  --mh3-blue-soft: #eee4f7;
  --mh3-pink: #f78b38;
  --mh3-pink-soft: #fbe1cd;
  --mh3-yellow: #f78b38;
  --mh3-yellow-soft: #f8ead8;
  --mh3-green: #a7b997;
  --mh3-purple: #bda2db;
  --mh3-purple-dark: #57316c;
  --mh3-purple-soft: #eee4f7;
  --mh3-line: rgba(36, 21, 46, 0.2);
  --mh3-shadow-sm: 0 10px 28px rgba(36, 21, 46, 0.12);
  --mh3-shadow: 0 22px 56px rgba(36, 21, 46, 0.18);
  background: #170f1e;
  color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-switchbar {
  background: #f78b38;
  border-bottom-color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-switchbar__eyebrow {
  color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] button.mht-toggle {
  box-shadow: 3px 3px 0 #fff5e7;
}

/* The seasonal hero and product edit form one dark opening spread. */
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products {
  --mh3-ink: #fff5e7;
  --mh3-ink-soft: #e4cced;
  --mh3-line: rgba(255, 245, 231, 0.26);
  background: #24152e;
  color: #fff5e7;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__media-col {
  background: #24152e;
}

/* A reserved strip lets the witch pass without crossing headings or controls. */
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy {
  justify-content: flex-start;
  padding-top: 172px;
}

body.mimis-halloween-test .mht-hero__flight {
  display: none;
  pointer-events: none;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy > .mht-hero__flight {
  --mht-witch-width: 168px;
  height: 142px;
  left: calc(-1 * var(--mht-witch-width));
  margin: 0;
  pointer-events: none;
  position: absolute;
  top: 14px;
  width: calc(100% + var(--mht-witch-width));
  z-index: 2;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero__flight.is-flying {
  animation: mht-witch-traverse 3400ms cubic-bezier(0.3, 0.12, 0.65, 0.85) both;
  display: block;
  will-change: transform;
}

body.mimis-halloween-test .mht-witch {
  background: #fff5e7;
  display: block;
  height: 100%;
  -webkit-mask: url("../images/witch-and-cat.png") center / contain no-repeat;
  mask: url("../images/witch-and-cat.png") center / contain no-repeat;
  pointer-events: none;
  transform-origin: 55% 55%;
  width: var(--mht-witch-width);
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero__flight.is-flying .mht-witch {
  animation: mht-witch-bob 3400ms ease-in-out both;
}

@keyframes mht-witch-traverse {
  0% { opacity: 0; transform: translateX(0); }
  10% { opacity: 1; }
  86% { opacity: 1; }
  100% { opacity: 0; transform: translateX(100%); }
}

@keyframes mht-witch-bob {
  0% { transform: translateY(8px) rotate(-5deg); }
  28% { transform: translateY(-8px) rotate(3deg); }
  58% { transform: translateY(6px) rotate(-3deg); }
  82% { transform: translateY(-6px) rotate(2deg); }
  100% { transform: translateY(0) rotate(-4deg); }
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy::before {
  background-image: radial-gradient(circle at 18% 22%, #e8cfa7 0 1px, transparent 2px), radial-gradient(circle at 74% 65%, #bda2db 0 1px, transparent 2px), radial-gradient(circle at 52% 90%, #e8cfa7 0 1px, transparent 2px);
  background-repeat: repeat;
  background-size: 130px 160px, 180px 210px, 230px 190px;
  inset: 0;
  opacity: 0.3;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy::after {
  background: #f78b38;
  border-radius: 50%;
  box-shadow: 23px -12px 0 2px #24152e;
  content: "";
  height: 74px;
  opacity: 0.4;
  pointer-events: none;
  position: absolute;
  right: 3rem;
  top: 2.75rem;
  transform: rotate(-18deg);
  width: 74px;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero::after {
  background: repeating-linear-gradient(90deg, #f78b38 0 24px, #24152e 24px 48px);
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-script,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products .mh3-script {
  color: #f9ae72;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy h1 {
  color: #fff5e7;
  font-size: clamp(3.2rem, 5.1vw, 5.5rem);
  max-width: 11ch;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__media figcaption {
  background: #f78b38;
  border-color: #24152e;
  box-shadow: 4px 4px 0 #24152e;
  color: #24152e;
}

/* Clip one corner from the supplied transparent cobweb sheet; no extra markup. */
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__media::after {
  background: #fff5e7;
  clip-path: polygon(0 0, 100% 0, 100% 75%, 80% 75%, 80% 100%, 0 100%);
  content: "";
  height: 160px;
  -webkit-mask-image: url("../images/cobwebs.png");
  mask-image: url("../images/cobwebs.png");
  -webkit-mask-position: -857.5px -27.5px;
  mask-position: -857.5px -27.5px;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 1024px 337px;
  mask-size: 1024px 337px;
  opacity: 0.85;
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 8px;
  width: 150px;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products {
  border-bottom: 1px solid #5a3e67;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products .mh3-product-grid .box-image {
  background: #fff5e7;
  border: 1px solid #c8a8d7;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.17);
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products .mh3-product-grid .box-text {
  padding-top: 1.1rem;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products .price,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products .price .amount,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-products .name a {
  color: #fff5e7;
}

/* Button colours are explicit so light and dark sections both stay legible. */
body.mimis-halloween-test[data-mht-theme="halloween"] .mimis-homepage-v3 a.mh3-button--primary,
body.mimis-halloween-test[data-mht-theme="halloween"] .mimis-homepage-v3 button#mh3-subscribe {
  background: #f78b38 !important;
  border-color: #24152e !important;
  box-shadow: 3px 3px 0 #24152e;
  color: #24152e !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mimis-homepage-v3 a.mh3-button--secondary {
  background: #fff5e7 !important;
  border-color: #24152e !important;
  box-shadow: 3px 3px 0 #24152e;
  color: #24152e !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero a.mh3-button--primary,
body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero a.mh3-button--secondary {
  border-color: #fff5e7 !important;
  box-shadow: 3px 3px 0 #bda2db;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-product-grid .badge-inner {
  background: #57316c;
  color: #fff5e7;
}

/* Recolour the shared page rather than duplicating its content or forms. */
body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-categories {
  background: #fff5e7;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-categories > .section-bg::after {
  background-image: url("../images/pumpkin-pattern.jpg");
  background-position: center top;
  background-repeat: repeat;
  background-size: 640px auto;
  opacity: 0.22;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-cake-club > .section-bg::after {
  background-image: radial-gradient(ellipse at center, #57316c 0 1px, transparent 2px);
  background-size: 24px 32px;
  opacity: 0.1;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-product-grid .product-small .box-image {
  background-color: #f8ead8;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-uk-wide > .section-bg::after {
  background-image: repeating-linear-gradient(-22deg, transparent 0 90px, rgba(87, 49, 108, 0.08) 90px 91px, transparent 91px 180px);
  background-position: center;
  background-size: auto;
  opacity: 1;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-uk-wide__copy,
body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-signup-card {
  background-color: #fffbf4;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-reassurance {
  background: #e8c8a9;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-experiences > .section-bg::after {
  background-image: repeating-linear-gradient(90deg, #57316c 0 2px, transparent 2px 46px);
  background-repeat: repeat;
  background-size: auto;
  opacity: 0.065;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-experience-aside > .col-inner {
  background: #f6cfb0;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-experience-aside > .col-inner::before {
  background-image: radial-gradient(ellipse at 50% 0, rgba(255, 245, 231, 0.85), transparent 65%);
  opacity: 1;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-story__panel {
  --mh3-ink: #fff5e7;
  --mh3-ink-soft: #e4cced;
  background: #24152e;
  border-top-color: #f78b38;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-award-stamp {
  border-left-color: #f78b38;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-cake-club {
  --mh3-ink: #fff5e7;
  --mh3-ink-soft: #e4cced;
  background: #4b2b5b;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mimis-homepage-v3.mh3-cake-club p.mh3-script {
  color: #f9ae72;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-signup-card {
  --mh3-ink: #24152e;
  --mh3-ink-soft: #66536c;
  --mh3-line: rgba(36, 21, 46, 0.2);
  color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .mh3-signup-card input[type="email"] {
  color: #24152e;
}

/* Header/footer colours change only inside this test-page Halloween state. */
body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-bg-color,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-main,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-bottom,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .nav-dropdown {
  background-color: #fff5e7 !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #header .nav > li > a,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .nav-dropdown a,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .cart-icon strong {
  color: #24152e !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #header .cart-icon strong,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .cart-icon strong::after {
  border-color: #24152e !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-top {
  background: #24152e !important;
  color: #fff5e7;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-top a,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-top p,
body.mimis-halloween-test[data-mht-theme="halloween"] #header .header-top .nav > li > a {
  color: #fff5e7 !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #header a:focus-visible,
body.mimis-halloween-test[data-mht-theme="halloween"] #footer a:focus-visible {
  outline: 3px solid #f78b38;
  outline-offset: 4px;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .off-canvas .mfp-content {
  background-color: #fff5e7;
  color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] .off-canvas .nav-sidebar > li > a {
  color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #footer,
body.mimis-halloween-test[data-mht-theme="halloween"] #footer .section,
body.mimis-halloween-test[data-mht-theme="halloween"] #footer .absolute-footer {
  background: #24152e !important;
  color: #fff5e7;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #footer .section-bg {
  background: none !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #footer :where(p, li, a, h1, h2, h3, h4, h5, h6, .widget-title, .copyright-footer) {
  color: #fff5e7 !important;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #footer input:not([type="submit"]),
body.mimis-halloween-test[data-mht-theme="halloween"] #footer textarea {
  background: #fff5e7;
  color: #24152e;
}

body.mimis-halloween-test[data-mht-theme="halloween"] #footer .button,
body.mimis-halloween-test[data-mht-theme="halloween"] #footer button,
body.mimis-halloween-test[data-mht-theme="halloween"] #footer input[type="submit"] {
  background-color: #f78b38 !important;
  border-color: #f78b38 !important;
  color: #24152e !important;
}

@media (max-width: 849px) {
  body.mimis-halloween-test .mht-switchbar__inner {
    width: calc(100% - 40px);
  }
}

@media (max-width: 549px) {
  body.mimis-halloween-test .mht-switchbar__inner {
    align-items: stretch;
    flex-direction: column;
    gap: 0.85rem;
    padding: 1rem 0 1.15rem;
    width: calc(100% - 32px);
  }

  body.mimis-halloween-test button.mht-toggle {
    align-self: flex-start;
    max-width: 100%;
  }

  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy h1 {
    font-size: clamp(2.9rem, 12vw, 4rem);
    max-width: 11ch;
  }

  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy {
    padding-top: 130px;
  }

  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy > .mht-hero__flight {
    --mht-witch-width: 120px;
    height: 101px;
    top: 10px;
  }

  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__media::after {
    height: 112px;
    -webkit-mask-position: -600.25px -19.25px;
    mask-position: -600.25px -19.25px;
    -webkit-mask-size: 716.8px 235.9px;
    mask-size: 716.8px 235.9px;
    right: 8px;
    width: 105px;
  }

  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero .mh3-hero__copy::after {
    height: 50px;
    right: 1.5rem;
    top: 1.5rem;
    width: 50px;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.mimis-halloween-test .mht-transition,
  body.mimis-halloween-test button.mht-toggle {
    transition: none;
  }

  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero__flight.is-flying,
  body.mimis-halloween-test[data-mht-theme="halloween"] .mht-hero__flight.is-flying .mht-witch {
    animation: none;
    display: none;
  }
}
