/* Explain: Styles for the dancing Father Christmas pop-up element. */
.santa-dance {
    position: fixed;
    left: clamp(0.4rem, 1.6vw, 1.35rem);
    top: 50%;
    z-index: 70;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
    width: clamp(8.5rem, 14vw, 11rem);
    transform: translateY(-50%);
    pointer-events: none;
}

.santa-dance.is-visible {
    display: flex;
    animation: santa-drop-in 680ms cubic-bezier(0.22, 0.68, 0.3, 1) both;
}

body.holiday-lock .santa-dance.is-visible {
    display: none;
}

.santa-close {
    position: absolute;
    top: -0.55rem;
    right: -0.35rem;
    z-index: 5;
    display: grid;
    width: 1.9rem;
    height: 1.9rem;
    place-items: center;
    border: 1px solid rgba(201, 162, 39, 0.62);
    border-radius: 999px;
    background: var(--charcoal-ink);
    color: var(--warm-ivory);
    font-size: 0.8rem;
    cursor: pointer;
    pointer-events: auto;
    box-shadow: 0 10px 22px rgba(20, 18, 20, 0.36);
    transition: all 220ms ease;
}

.santa-close:hover,
.santa-close:focus-visible {
    background: var(--gold-color);
    border-color: var(--gold-deep);
    color: var(--charcoal-ink);
    transform: rotate(90deg);
}

.santa-figure {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    border: 3px solid rgba(201, 162, 39, 0.78);
    border-radius: 6rem 6rem 1.35rem 1.35rem;
    background: radial-gradient(circle at 50% 14%, rgba(230, 201, 107, 0.5), rgba(36, 33, 36, 0.92));
    box-shadow: 0 26px 58px rgba(20, 18, 20, 0.4), 0 0 0 5px rgba(255, 248, 244, 0.62);
    pointer-events: auto;
    transform-origin: 50% 92%;
    will-change: transform;
    animation:
        santa-dance-bounce 1.9s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite,
        santa-halo 2.6s ease-in-out infinite;
}

.santa-figure:hover,
.santa-figure:focus-visible {
    animation-duration: 0.95s, 1.35s;
}

.santa-figure::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(115deg, transparent 32%, rgba(255, 253, 248, 0.46) 50%, transparent 68%);
    transform: translateX(-120%);
    animation: santa-sheen 3.6s ease-in-out infinite;
}

.santa-portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: saturate(1.03) contrast(1.03);
    transform-origin: 50% 100%;
    animation: santa-sway 1.9s ease-in-out infinite;
}

.santa-sparkle {
    position: absolute;
    z-index: 3;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--gold-soft);
    box-shadow: 0 0 12px rgba(230, 201, 107, 0.95);
    animation: santa-twinkle 2.4s ease-in-out infinite;
}

.santa-sparkle-one {
    top: 12%;
    left: 10%;
}

.santa-sparkle-two {
    bottom: 18%;
    right: 11%;
    animation-delay: 0.8s;
}

.santa-sparkle-three {
    top: 46%;
    right: 6%;
    width: 0.33rem;
    height: 0.33rem;
    animation-delay: 1.5s;
}

.santa-note {
    position: absolute;
    z-index: 6;
    color: var(--gold-soft);
    font-size: 0.9rem;
    opacity: 0;
    pointer-events: none;
    text-shadow: 0 0 14px rgba(230, 201, 107, 0.92);
}

.santa-note-one {
    top: 12%;
    right: -0.4rem;
    animation: santa-float 3.2s ease-in-out infinite;
}

.santa-note-two {
    top: 38%;
    left: -0.5rem;
    font-size: 0.72rem;
    animation: santa-float 3.6s ease-in-out 0.9s infinite;
}

.santa-note-three {
    top: 60%;
    right: 0.1rem;
    font-size: 0.6rem;
    animation: santa-float 3s ease-in-out 1.7s infinite;
}

.santa-bubble {
    position: relative;
    display: grid;
    gap: 0.15rem;
    width: 100%;
    border: 1px solid rgba(201, 162, 39, 0.58);
    border-radius: 1.1rem;
    padding: 0.7rem 0.8rem;
    background: linear-gradient(155deg, #fffdf8 0%, var(--warm-ivory) 58%, #fdf1ea 100%);
    box-shadow: 0 18px 42px rgba(20, 18, 20, 0.3);
    color: var(--charcoal-ink);
    text-decoration: none;
    pointer-events: auto;
    animation: santa-bubble-bob 3.6s ease-in-out infinite;
    transition: box-shadow 240ms ease, transform 240ms ease;
}

.santa-bubble::before {
    content: '';
    position: absolute;
    top: -0.42rem;
    left: 1.5rem;
    width: 0.8rem;
    height: 0.8rem;
    transform: rotate(45deg);
    border-left: 1px solid rgba(201, 162, 39, 0.58);
    border-top: 1px solid rgba(201, 162, 39, 0.58);
    background: #fffdf8;
}

.santa-bubble:hover,
.santa-bubble:focus-visible {
    box-shadow: 0 22px 50px rgba(20, 18, 20, 0.34);
    transform: translateY(-2px);
}

.santa-bubble-label {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    color: var(--gold-deep);
    font-size: 0.6rem;
    font-weight: 900;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

.santa-bubble-label i {
    color: var(--gold-color);
    font-size: 0.7rem;
}

.santa-bubble-text {
    color: var(--ink-soft);
    font-size: 0.74rem;
    line-height: 1.42;
}

.santa-bubble-text strong {
    color: var(--charcoal-ink);
    font-weight: 900;
    letter-spacing: 0.03em;
}

.santa-bubble-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: 0.2rem;
    color: var(--gold-deep);
    font-size: 0.62rem;
    font-weight: 900;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.santa-bubble-cta i {
    font-size: 0.65rem;
    transition: transform 240ms ease;
}

.santa-bubble:hover .santa-bubble-cta i,
.santa-bubble:focus-visible .santa-bubble-cta i {
    transform: translateX(0.2rem);
}

@keyframes santa-drop-in {
    from {
        opacity: 0;
        transform: translate(-2.5rem, -50%) scale(0.88);
    }

    to {
        opacity: 1;
        transform: translate(0, -50%) scale(1);
    }
}

@keyframes santa-dance-bounce {
    0%,
    100% {
        transform: translate(0, 0) rotate(-4.5deg);
    }

    18% {
        transform: translate(-0.28rem, -0.72rem) rotate(3deg);
    }

    38% {
        transform: translate(0, -0.1rem) rotate(4.5deg);
    }

    58% {
        transform: translate(0.3rem, -0.5rem) rotate(-2deg);
    }

    78% {
        transform: translate(0, 0.12rem) rotate(-5deg);
    }
}

@keyframes santa-sway {
    0%,
    100% {
        transform: rotate(-2.4deg) scale(1.03) translateY(0);
    }

    50% {
        transform: rotate(2.4deg) scale(1.06) translateY(-0.12rem);
    }
}

@keyframes santa-halo {
    0%,
    100% {
        box-shadow: 0 26px 58px rgba(20, 18, 20, 0.4), 0 0 0 5px rgba(255, 248, 244, 0.62);
    }

    50% {
        box-shadow: 0 32px 68px rgba(20, 18, 20, 0.48), 0 0 0 8px rgba(230, 201, 107, 0.78);
    }
}

@keyframes santa-sheen {
    0%,
    62% {
        transform: translateX(-120%);
    }

    88%,
    100% {
        transform: translateX(120%);
    }
}

@keyframes santa-float {
    0% {
        opacity: 0;
        transform: translateY(0.5rem) rotate(-10deg) scale(0.7);
    }

    26% {
        opacity: 0.95;
    }

    70% {
        opacity: 0.65;
    }

    100% {
        opacity: 0;
        transform: translateY(-2.8rem) rotate(14deg) scale(1.05);
    }
}

@keyframes santa-bubble-bob {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-0.22rem);
    }
}

@keyframes santa-twinkle {
    0%,
    100% {
        opacity: 0.15;
        transform: scale(0.7);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@keyframes santa-rise-in {
    from {
        opacity: 0;
        transform: translateY(1.6rem) scale(0.9);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@media (max-width: 720px) {
    .santa-dance {
        left: 0.35rem;
        top: auto;
        bottom: 0.85rem;
        width: 5.9rem;
        gap: 0.45rem;
        transform: none;
    }

    .santa-dance.is-visible {
        animation: santa-rise-in 520ms cubic-bezier(0.22, 0.68, 0.3, 1) both;
    }

    .santa-bubble {
        display: none;
    }

    .santa-close {
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.7rem;
        right: -0.2rem;
        top: -0.4rem;
    }

    .santa-note-two,
    .santa-note-three {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .santa-dance.is-visible {
        animation: none;
    }

    .santa-figure,
    .santa-portrait,
    .santa-bubble,
    .santa-sparkle,
    .santa-note,
    .santa-figure::after {
        animation: none;
    }

    .santa-figure {
        transform: none;
    }

    .santa-note {
        opacity: 0.5;
    }

    .santa-close:hover,
    .santa-close:focus-visible {
        transform: none;
    }
}