/* Christmas theme (WI 5702). Linked only while the theme is active, after themes/base.css; it never edits base files. */
/* Pictures are cached for a year: bump a url()'s ?v= whenever its picture changes. */

:root {
    --xmas-night: #0d1830;
    --xmas-red: #d4263a;
    --xmas-red-dark: #a8172b;
    --xmas-snow: #f3f5fb;
    --xmas-pink-light: #f48fbf;
    --clr-page: var(--xmas-night);
    --clr-usp-bg: #142242;
    --clr-usp-border: #23345e;
    --clr-usp-divider: #2a3c6b;
    --clr-usp-title: var(--xmas-snow);
    --clr-usp-copy: #c3cbe0;
    --clr-footer-bg: #0a1428;
    --clr-footer-link: #8cc4f5;
    --theme-accent: var(--xmas-red);
    --theme-header-text: var(--xmas-snow);
    --theme-header-link: var(--xmas-pink-light);
    --theme-menu-link: var(--xmas-snow);
    --theme-banner-bg: var(--xmas-red-dark);
    --clr-surface: #142242;
    --clr-surface-alt: #1a2a50;
    --clr-text: #dfe4f0;
    --clr-heading: var(--xmas-snow);
    --clr-text-muted: #b4bdd3;
    --clr-border: #2f4270;
    --clr-input-bg: #0a1428;
    --clr-input-text: var(--xmas-snow);
    --clr-input-border: #4a5d8c;
    --clr-btn-bg: #23345e;
    --clr-btn-text: var(--xmas-snow);
    --theme-text-mix: 55%;
    --theme-neutral-mix: 100%;
    --theme-tint-mix: 85%;
    --theme-link-rgb: 140, 196, 245;
    --theme-slide-dim: .8;
    --theme-slide-frame: var(--xmas-red);
    --theme-phone-menu-bg: var(--xmas-night);
    --theme-phone-menu-text: var(--xmas-snow);
    --theme-phone-menu-line: #2a3c6b;
    --theme-phone-menu-accent: #ff8f9c;
    --theme-phone-menu-link: #dfe4f0;
    --theme-phone-menu-tint: #3a1426;
    --theme-phone-menu-subheading: #8cc4f5;
    --theme-phone-menu-close-filter: invert(1) grayscale(1) brightness(2);
}

body {
    background-color: var(--clr-page);
    background-image:
        radial-gradient(1.5px 1.5px at 20px 30px, rgba(255, 255, 255, .8), transparent),
        radial-gradient(1px 1px at 140px 90px, rgba(255, 255, 255, .7), transparent),
        radial-gradient(1.5px 1.5px at 260px 40px, rgba(255, 255, 255, .6), transparent),
        radial-gradient(1px 1px at 90px 160px, rgba(255, 255, 255, .6), transparent),
        radial-gradient(1px 1px at 210px 200px, rgba(255, 255, 255, .7), transparent);
    background-size: 300px 240px;
}

.theme-top {
    position: relative;
    min-height: 40px;
    background: url("lights.svg?v=1") repeat-x 0 0;
}

.theme-top::before,
.theme-top::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 40px;
    background: url("lights-glow-a.svg?v=1") repeat-x 0 0;
    pointer-events: none;
}

.theme-top::after {
    background-image: url("lights-glow-b.svg?v=1");
    opacity: .4;
}

.theme-top--message {
    padding-top: 40px;
}

@media (prefers-reduced-motion: no-preference) {
    .theme-top::before,
    .theme-top::after {
        animation: theme-twinkle 2.4s ease-in-out infinite alternate;
    }

    .theme-top::after {
        animation-delay: -1.2s;
    }
}

@keyframes theme-twinkle {
    from { opacity: .25; }
    to { opacity: 1; }
}

@media only screen and (max-width: 767px) {
    .theme-top {
        min-height: 30px;
        background-size: 90px 30px;
    }

    .theme-top::before,
    .theme-top::after {
        height: 30px;
        background-size: 90px 30px;
    }

    .theme-top--message {
        padding-top: 30px;
    }
}

.header__logo a::after {
    content: "";
    position: absolute;
    left: 21.5%;
    top: 16%;
    width: 13.5%;
    aspect-ratio: 64 / 52;
    background: url("santa-hat.svg?v=1") no-repeat center / contain;
    transform: rotate(-14deg);
    pointer-events: none;
}

/* Christmas Shop row (moved from menu.css, D19) */
i.menu-festive-icon {
    display: inline-block;
    margin-right: 8px;
}

.header__menu ul li .menu-link--festive {
    position: relative;
    margin-top: -4px;
    padding: 4px 12px 14px;
    border-radius: 6px 6px 0 0;
    background: var(--xmas-red);
    color: #fff;
}

.header__menu ul li:hover .menu-link--festive {
    background: var(--xmas-red-dark);
    color: #fff;
}

.header__menu ul li .menu-link--festive::before,
.mobile-menu__promo--festive::before,
.mobile-menu__toggle--festive::before,
.basket__sidebar-item::before,
.checkout__payment-item::before,
.sidebar .filter__item::before,
.pdp-delivery::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -7px;
    height: 16px;
    border-radius: 8px 8px 0 0;
    background: url("snow-cap.svg?v=1") repeat-x 0 0 / auto 16px;
    pointer-events: none;
}

.mobile-menu__promo--festive,
.mobile-menu__toggle--festive {
    position: relative;
    background: var(--xmas-red);
    color: #fff;
}

.mobile-menu__toggle--festive {
    margin: 10px 0;
    padding: 12px 14px;
    border-radius: 6px;
}

.mobile-menu__toggle--festive .fa-chevron-right {
    color: #fff;
}

.mobile-menu__promo--festive:hover,
.mobile-menu__promo--festive:focus,
.mobile-menu__toggle--festive:hover,
.mobile-menu__toggle--festive:focus {
    background: var(--xmas-red-dark);
    color: #fff;
}

.usp-bar__icon--theme {
    background: #fde8ea;
}

/* Snow caps (WI 5716) */
.menu-wrapper::after {
    height: 9px;
    margin-top: -5px;
    background:
        url("snow-line.svg?v=1") repeat-x 0 0 / auto 6px,
        linear-gradient(var(--theme-accent), var(--theme-accent)) no-repeat 0 100% / 100% 4px;
}

.basket__sidebar-item::before,
.checkout__payment-item::before,
.sidebar .filter__item::before {
    left: -2px;
    right: -2px;
    top: -9px;
    z-index: 1;
}

.basket__sidebar-item,
.checkout__payment-item,
.sidebar .filter__item {
    margin-bottom: 22px;
}

.pdp-delivery {
    position: relative;
}

.pdp-delivery::before {
    left: 6px;
    right: 6px;
    top: -8px;
}

/* base.css keeps payment on a white card in every theme; inherit hands the Christmas colours back to it. */
html[data-theme] .payment-select {
    --clr-surface: inherit;
    --clr-surface-alt: inherit;
    --clr-text: inherit;
    --clr-text-muted: inherit;
    --clr-heading: inherit;
    --clr-border: inherit;
    --clr-input-bg: inherit;
    --clr-input-text: inherit;
    --clr-input-border: inherit;
    --clr-btn-bg: inherit;
    --clr-btn-text: inherit;
    --theme-text-mix: inherit;
    --theme-neutral-mix: inherit;
    --theme-tint-mix: inherit;
    --bs-body-bg: inherit;
    --bs-body-color: inherit;
    --bs-emphasis-color: inherit;
    --bs-heading-color: inherit;
    --bs-secondary-color: inherit;
    --bs-secondary-bg: inherit;
    --bs-tertiary-bg: inherit;
    --bs-border-color: inherit;
    --bs-link-color-rgb: inherit;
    --bs-link-hover-color-rgb: inherit;
    background: transparent;
    color: var(--clr-text);
}

.payment-option__logos img {
    padding: 2px 4px;
    border-radius: 4px;
    background: #fff;
}

.theme-footer-scene {
    background:
        url("footer-characters.svg?v=1") no-repeat right 8% bottom / auto 110px,
        url("footer-scene.svg?v=1") repeat-x left bottom / auto 110px;
}

@media only screen and (max-width: 767px) {
    .theme-footer-scene {
        background-size: auto 76px, auto 76px;
    }
}

/* Robin on the menu line (WI 5716). Menu links fill the container edge to edge, so it stands just outside it
   and hides where the gutter is too narrow to hold it clear of the last link. */
.menu-wrapper > .container {
    position: relative;
}

.menu-wrapper > .container::after {
    content: "";
    position: absolute;
    left: calc(100% - 8px);
    bottom: 0;
    width: 32px;
    height: 28px;
    background: url("robin.svg?v=1") no-repeat center bottom / contain;
    pointer-events: none;
}

@media (min-width: 991px) and (max-width: 1024.98px), (min-width: 1200px) and (max-width: 1204.98px) {
    .menu-wrapper > .container::after {
        display: none;
    }
}

/* Holly garland in place of the teal heading line (WI 5716) */
.about-category__line {
    top: 15px;
    height: 16px;
    background: url("holly-garland.svg?v=1") repeat-x 0 50% / auto 16px;
}

/* Product page: holly for the teal lines, plus one over In The Range and Recently Viewed, which have none */
.product__line,
.product-list-section__wrapper::before {
    height: 16px;
    background: url("holly-garland.svg?v=1") repeat-x 0 50% / auto 16px;
}

.product-list-section__wrapper::before {
    content: "";
    display: block;
    margin-bottom: 24px;
}

@media only screen and (max-width: 768px) {
    .product-list-section__wrapper::before {
        display: none;
    }
}

/* Empty basket snowman (WI 5716), beside the page's own message */
.row.basket__summary-row--offset {
    flex-wrap: nowrap;
    align-items: center;
    gap: 16px;
}

.row.basket__summary-row--offset::before {
    content: "";
    flex: 0 0 72px;
    height: 90px;
    margin-left: calc(var(--bs-gutter-x) * .5);
    background: url("snowman.svg?v=1") no-repeat center / contain;
    pointer-events: none;
}

.row.basket__summary-row--offset > * {
    flex: 1 1 auto;
    width: auto;
}

@media only screen and (max-width: 767px) {
    .row.basket__summary-row--offset {
        margin-left: 0;
    }
}

/* Falling snow (WI 5716, D1). Painted below the header's content, so flakes pass behind every link, word and the
   search box. Never clip .header: the menu drop-downs hang below it. */
.header:not(.header--checkout) {
    position: relative;
}

@media (prefers-reduced-motion: no-preference) {
    .header:not(.header--checkout)::before {
        content: "";
        position: absolute;
        inset: 0 6px;
        z-index: -1;
        background-image:
            radial-gradient(circle at 30px 40px, rgba(255, 255, 255, .85) 1.5px, transparent 2.3px),
            radial-gradient(circle at 150px 120px, rgba(255, 255, 255, .7) 1.2px, transparent 2px),
            radial-gradient(circle at 90px 20px, rgba(255, 255, 255, .6) 1px, transparent 1.8px),
            radial-gradient(circle at 210px 170px, rgba(255, 255, 255, .75) 1.8px, transparent 2.6px);
        background-size: 240px 200px, 300px 240px, 180px 160px, 360px 280px;
        pointer-events: none;
        animation:
            xmas-snowfall 22s linear infinite,
            xmas-snow-sway 5s ease-in-out infinite alternate;
    }
}

@keyframes xmas-snowfall {
    from { background-position: 0 0, 60px 0, 20px 0, 120px 0; }
    to { background-position: 0 400px, 60px 240px, 20px 480px, 120px 280px; }
}

@keyframes xmas-snow-sway {
    from { transform: translateX(-6px); }
    to { transform: translateX(6px); }
}
