/* Cyber Monday theme (WI 5726). Linked only while the theme is active, after themes/base.css; it never edits base files. */
/* Pictures and the font are cached for a year: bump a url()'s ?v= whenever its file changes. */

@font-face {
    font-family: "Cyber Monday Mono";
    src: url("jetbrains-mono-700.woff2?v=1") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --cm-navy: #0b1026;
    --cm-panel: #141b3a;
    --cm-line: #2a3566;
    --cm-cyan: #22d3ee;
    --cm-cyan-light: #67e8f9;
    --cm-pink: #d6006f;
    --cm-pink-dark: #c2186b;
    --cm-footer: #060914;
    --cm-copy: #c3c9e6;
    --cm-font: "Cyber Monday Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --cm-glow: 0 0 10px rgba(34, 211, 238, .55);
    --cm-dropdown-bg: var(--cm-panel);
    --clr-page: var(--cm-navy);
    --clr-usp-bg: var(--cm-panel);
    --clr-usp-border: var(--cm-line);
    --clr-usp-divider: var(--cm-line);
    --clr-usp-title: #fff;
    --clr-usp-copy: var(--cm-copy);
    --clr-footer-bg: var(--cm-footer);
    --clr-footer-link: var(--cm-cyan-light);
    --theme-accent: var(--cm-cyan);
    --theme-on-accent: var(--cm-navy);
    --theme-header-link: var(--cm-cyan-light);
    --theme-menu-link-hover: var(--cm-cyan-light);
    --theme-checkout-link: var(--cm-cyan-light);
    --theme-muted: #aab3d6;
    --theme-banner-bg: var(--cm-panel);
    --theme-top-bg: var(--cm-navy);
    --theme-top-text: var(--cm-cyan);
    --theme-focus: var(--cm-cyan-light);
    --theme-focus-on-light: var(--cm-cyan-light);
    --clr-surface: var(--cm-panel);
    --clr-surface-alt: #1b2348;
    --clr-text: #e2e6f5;
    --clr-heading: #fff;
    --clr-text-muted: var(--cm-copy);
    --clr-border: #323e70;
    --clr-input-bg: var(--cm-navy);
    --clr-input-text: #fff;
    --clr-input-border: #6873a6;
    --clr-btn-bg: var(--cm-line);
    --clr-btn-text: #fff;
    --theme-text-mix: 55%;
    --theme-neutral-mix: 100%;
    --theme-tint-mix: 85%;
    --theme-link-rgb: 103, 232, 249;
    --theme-slide-dim: .8;
    --theme-slide-frame: var(--cm-cyan);
    --theme-phone-menu-bg: var(--cm-navy);
    --theme-phone-menu-text: #fff;
    --theme-phone-menu-line: var(--cm-line);
    --theme-phone-menu-accent: var(--cm-cyan-light);
    --theme-phone-menu-link: #e2e6f5;
    --theme-phone-menu-tint: #10243a;
    --theme-phone-menu-subheading: var(--cm-cyan-light);
    --theme-phone-menu-close-filter: invert(1) grayscale(1) brightness(2);
}

/* Without backdrop-filter the panels stay solid, so text never sits on a busy background. */
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    :root {
        --clr-usp-bg: rgba(20, 27, 58, .62);
        --theme-banner-bg: rgba(20, 27, 58, .62);
        --cm-dropdown-bg: rgba(20, 27, 58, .9);
    }

    .usp-bar,
    .announcement-bar,
    .header .sub-menu,
    .header .sub-menu__needlecrafts-category {
        -webkit-backdrop-filter: blur(14px) saturate(140%);
        backdrop-filter: blur(14px) saturate(140%);
    }
}

/* A faint grid behind the logo and search, faded out by a navy layer before the menu. It lives on the body
   because positioning the header would trap the drop-downs beneath the page's banners. */
body {
    background:
        radial-gradient(1100px 360px at 18% 40px, rgba(42, 20, 88, .9) 0, rgba(42, 20, 88, 0) 65%) no-repeat,
        linear-gradient(to bottom, rgba(11, 16, 38, 0) 0, rgba(11, 16, 38, .55) 170px, var(--cm-navy) 300px) no-repeat,
        linear-gradient(rgba(34, 211, 238, .09) 1px, transparent 1px) 0 0 / 32px 32px,
        linear-gradient(90deg, rgba(34, 211, 238, .09) 1px, transparent 1px) 0 0 / 32px 32px,
        var(--clr-page);
}

:is(h1, h2):not(.header *, .footer *) {
    font-family: var(--cm-font);
    letter-spacing: -.01em;
}

/* Top strip */
.theme-top__ticker {
    border-block: 1px solid rgba(34, 211, 238, .55);
    box-shadow: 0 0 14px rgba(34, 211, 238, .3);
}

.theme-top__group {
    font-family: var(--cm-font);
    font-size: 1rem;
    letter-spacing: .14em;
}

.theme-top__part {
    text-shadow: var(--cm-glow);
}

@media (prefers-reduced-motion: no-preference) {
    .theme-top__part {
        animation: cm-glitch 6s steps(1, end) infinite;
    }
}

/* About 0.3s of every 6s: a cyan/pink split and a small jitter, on the words only. */
@keyframes cm-glitch {
    95% {
        transform: translateX(-2px);
        text-shadow: -2px 0 var(--cm-pink), 2px 0 var(--cm-cyan);
    }

    96.5% {
        transform: translateX(2px) skewX(-8deg);
        text-shadow: 2px 0 var(--cm-pink), -2px 0 var(--cm-cyan);
    }

    98% {
        transform: translateX(-1px);
        text-shadow: -1px 0 var(--cm-pink), 1px 0 var(--cm-cyan);
    }

    99.5% {
        transform: none;
        text-shadow: var(--cm-glow);
    }
}

@media only screen and (max-width: 767px) {
    .theme-top__group {
        line-height: 2rem;
        letter-spacing: .1em;
    }
}

.announcement-bar {
    border-bottom: 1px solid var(--cm-line);
}

/* Logo and its tag. The tag isn't rotated, so its pixels stay sharp. */
.header__logo img {
    filter: brightness(1.2) drop-shadow(0 0 10px rgba(34, 211, 238, .4));
}

.header__logo a::after {
    content: "";
    position: absolute;
    right: 0;
    top: -6%;
    width: 19%;
    aspect-ratio: 120 / 64;
    background: url("sale-tag.svg?v=1") no-repeat center / contain;
    filter: drop-shadow(0 0 6px rgba(34, 211, 238, .55));
    pointer-events: none;
}

/* The checkout logo sits at the very top of the page, so a raised tag would be cut off. */
.header--checkout .header__logo a::after {
    top: 4%;
}

/* Menu */
.menu-wrapper::after {
    height: 2px;
    box-shadow: var(--cm-glow);
}

.header__menu ul li:hover {
    background: var(--cm-dropdown-bg);
}

.header__menu ul li:hover .menu-link {
    border-bottom-color: var(--cm-cyan);
    text-shadow: var(--cm-glow);
}

/* The sale's own menu row: a top-level row with the Sale display style. */
.header__menu ul li .menu-link--sale {
    margin-top: -4px;
    padding: 4px 16px 14px;
    border-radius: 8px 8px 0 0;
    background: var(--cm-pink);
    box-shadow: 0 0 14px rgba(214, 0, 111, .6);
    color: #fff;
    font-family: var(--cm-font);
    font-weight: 700;
}

.header__menu ul li:hover .menu-link--sale {
    background: #fff;
    color: var(--cm-pink-dark);
    text-shadow: none;
}

.mobile-menu__promo--sale,
.mobile-menu__toggle--sale {
    background: var(--cm-pink);
    color: #fff;
    font-family: var(--cm-font);
    font-weight: 700;
}

.mobile-menu__toggle--sale {
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: 6px;
}

.mobile-menu__toggle--sale .fa-chevron-right {
    color: #fff;
}

.mobile-menu__promo--sale:hover,
.mobile-menu__promo--sale:focus,
.mobile-menu__toggle--sale:hover,
.mobile-menu__toggle--sale:focus {
    background: var(--cm-pink-dark);
    color: #fff;
}

/* Drop-downs: glass panels. The threads mega menu keeps its own white department cards on top. */
.header .sub-menu,
.header .sub-menu__needlecrafts-category {
    background: var(--cm-dropdown-bg);
}

.header .sub-menu {
    border-top: 2px solid var(--cm-cyan);
}

.header .sub-menu:not(.sub-menu--threads) a {
    color: #e2e6f5;
}

.header .sub-menu:not(.sub-menu--threads) .sub-title,
.header .sub-menu:not(.sub-menu--threads) .sub-title a {
    border-bottom-color: var(--cm-line);
    color: var(--cm-cyan-light);
}

/* menu.css sets this hover colour with !important. */
.header .sub-menu:not(.sub-menu--threads) a:hover,
.header .sub-menu__needlecrafts-category a:hover {
    background: rgba(34, 211, 238, .14);
    color: var(--cm-cyan-light) !important;
}

.sub-menu--threads::before {
    border-bottom-color: var(--cm-cyan);
}

.sub-menu--threads::after {
    border-bottom-color: var(--cm-panel);
}

/* Trust bar */
.usp-bar__icon--theme {
    text-shadow: var(--cm-glow);
}

.usp-bar__item--countdown .usp-bar__title {
    font-family: var(--cm-font);
}

/* A strip of circuit traces where the page meets the footer, so the footer needs less room above it than base gives. */
.footer {
    margin-top: 64px;
}

.theme-footer-scene {
    height: 32px;
    background: url("footer-circuit.svg?v=1") repeat-x center bottom / auto 32px;
}

@media only screen and (max-width: 767px) {
    .footer {
        margin-top: 48px;
    }

    .theme-footer-scene {
        height: 24px;
        background-size: auto 24px;
    }
}
