/* Kerstwinkel-teaser — schuin kerstboompje (sticker) met label en tekstballon; rechtsonder, op desktop binnen de hoofdcontainer */

.rr-xmas {
    position: fixed;
    right: 18px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 10px);
    z-index: 9000;
    opacity: 0;
    pointer-events: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

@media (min-width: 1000px) {
    .rr-xmas {
        right: max(18px, calc((100% - min(var(--theme-container-edge-spacing, 90vw), var(--theme-normal-container-max-width, 1290px))) / 2));
    }
}

.rr-xmas[hidden] {
    display: none;
}

.rr-xmas.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.rr-xmas__link {
    display: flex;
    align-items: flex-end;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.rr-xmas__link * {
    cursor: pointer;
}

.rr-xmas__link:hover,
.rr-xmas__link:focus {
    color: inherit;
    text-decoration: none;
}

.rr-xmas__link:focus-visible {
    outline: none;
}

.rr-xmas__link:focus-visible .rr-xmas__bubble {
    outline: 3px solid var(--theme-palette-color-1, #e87925);
    outline-offset: 2px;
}

/* Boom */

.rr-xmas__tree {
    position: relative;
    z-index: 1;
    flex: none;
    width: 132px;
    transform: rotate(-10deg);
    transform-origin: 50% 92%;
    transition: scale 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.rr-xmas.is-visible .rr-xmas__tree {
    animation: rr-xmas-pop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.05s both;
}

.rr-xmas__link:hover .rr-xmas__tree {
    scale: 1.06;
}

.rr-xmas__svg {
    display: block;
    width: 100%;
    height: auto;
    overflow: visible;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.22)) drop-shadow(0 1px 2px rgba(0, 0, 0, 0.18));
    transform-origin: 50% 92%;
    animation: rr-xmas-sway 5s ease-in-out 1s infinite;
}

.rr-xmas__light {
    animation: rr-xmas-twinkle 1.6s ease-in-out infinite;
}

.rr-xmas__light:nth-child(1) { animation-duration: 1.3s; animation-delay: 0s; }
.rr-xmas__light:nth-child(2) { animation-duration: 1.9s; animation-delay: 0.6s; }
.rr-xmas__light:nth-child(3) { animation-duration: 1.5s; animation-delay: 0.3s; }
.rr-xmas__light:nth-child(4) { animation-duration: 2.1s; animation-delay: 0.9s; }
.rr-xmas__light:nth-child(5) { animation-duration: 1.4s; animation-delay: 0.15s; }
.rr-xmas__light:nth-child(6) { animation-duration: 1.8s; animation-delay: 1.1s; }
.rr-xmas__light:nth-child(7) { animation-duration: 1.6s; animation-delay: 0.45s; }
.rr-xmas__light:nth-child(8) { animation-duration: 1.25s; animation-delay: 0.75s; }
.rr-xmas__light:nth-child(9) { animation-duration: 2s; animation-delay: 0.2s; }

.rr-xmas__star {
    transform-box: fill-box;
    transform-origin: center;
    animation: rr-xmas-star 2.6s ease-in-out infinite;
}

.rr-xmas__sparkle {
    transform-box: fill-box;
    transform-origin: center;
    opacity: 0;
    animation: rr-xmas-sparkle 3.2s ease-in-out 0.8s infinite;
}

.rr-xmas__sparkle--2 {
    animation-delay: 2.4s;
}

/* Label + tekstballon */

.rr-xmas__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
    margin-left: -6px;
    padding-bottom: 30px;
}

.rr-xmas__label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 13px 5px 10px;
    border: 3px solid #fff;
    border-radius: 999px;
    background: #d3263a;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: 0.01em;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    rotate: -4deg;
}

.rr-xmas.is-visible .rr-xmas__label {
    animation: rr-xmas-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.4s both;
}

.rr-xmas__dot {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #7dff9b;
    box-shadow: 0 0 0 0 rgba(125, 255, 155, 0.7);
    animation: rr-xmas-dot 1.8s ease-out infinite;
}

.rr-xmas__bubble {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-left: 8px;
    padding: 10px 10px 10px 16px;
    border-radius: 18px;
    background: #fff;
    color: #1d2a22;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease, translate 0.2s ease;
}

.rr-xmas__bubble::before {
    content: "";
    position: absolute;
    left: -9px;
    bottom: 10px;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 7px 12px 7px 0;
    border-color: transparent #fff transparent transparent;
    rotate: 18deg;
}

.rr-xmas.is-visible .rr-xmas__bubble {
    animation:
        rr-xmas-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.6s both,
        rr-xmas-bob 6s ease-in-out 3s infinite;
}

.rr-xmas__link:hover .rr-xmas__bubble {
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24), 0 1px 3px rgba(0, 0, 0, 0.12);
}

.rr-xmas__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: var(--theme-palette-color-1, #e87925);
    color: #fff;
    transition: background-color 0.2s ease;
}

.rr-xmas__arrow svg {
    display: block;
    animation: rr-xmas-nudge 1.2s ease-in-out infinite alternate;
}

.rr-xmas__link:hover .rr-xmas__arrow {
    background: #cf6413;
}

/* Sluitknop */

.rr-xmas__close {
    position: absolute;
    top: 4px;
    left: -12px;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: #fff;
    color: #444;
    font-size: 19px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
}

.rr-xmas__close::after {
    content: "";
    position: absolute;
    inset: -8px;
}

.rr-xmas__close:hover {
    color: #111;
}

.rr-xmas__close:focus-visible {
    outline: 2px solid var(--theme-palette-color-1, #e87925);
    outline-offset: 2px;
}

/* Keyframes */

@keyframes rr-xmas-pop {
    from {
        opacity: 0;
        transform: translateY(40px) rotate(12deg) scale(0.4);
    }
    to {
        opacity: 1;
        transform: rotate(-10deg) scale(1);
    }
}

@keyframes rr-xmas-sway {
    0%, 100% { transform: rotate(0deg); }
    50% { transform: rotate(3.5deg); }
}

@keyframes rr-xmas-twinkle {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.25; }
}

@keyframes rr-xmas-star {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.15) rotate(8deg); }
}

@keyframes rr-xmas-sparkle {
    0%, 60%, 100% { opacity: 0; transform: scale(0.3) rotate(0deg); }
    75% { opacity: 1; transform: scale(1) rotate(45deg); }
}

@keyframes rr-xmas-in {
    from {
        opacity: 0;
        transform: translateX(-14px) scale(0.85);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

@keyframes rr-xmas-bob {
    0%, 82%, 100% { translate: 0 0; }
    87% { translate: 0 -5px; }
    92% { translate: 0 0; }
    96% { translate: 0 -2px; }
}

@keyframes rr-xmas-nudge {
    from { transform: translateX(-1px); }
    to { transform: translateX(2px); }
}

@keyframes rr-xmas-dot {
    0% { box-shadow: 0 0 0 0 rgba(125, 255, 155, 0.7); }
    70%, 100% { box-shadow: 0 0 0 7px rgba(125, 255, 155, 0); }
}

/* Tablet */

@media (max-width: 999px) {
    .rr-xmas {
        right: 14px;
    }

    .rr-xmas__tree {
        width: 110px;
    }

    .rr-xmas__text {
        gap: 8px;
        padding-bottom: 24px;
    }

    .rr-xmas__label {
        font-size: 0.88rem;
    }

    .rr-xmas__bubble {
        font-size: 0.94rem;
        padding: 9px 9px 9px 14px;
    }

}

/* Mobiel */

@media (max-width: 689px) {
    .rr-xmas {
        right: 10px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 6px);
    }

    .rr-xmas__tree {
        width: 86px;
    }

    .rr-xmas__text {
        gap: 6px;
        margin-left: -4px;
        padding-bottom: 18px;
    }

    .rr-xmas__label {
        gap: 6px;
        padding: 3px 10px 3px 8px;
        border-width: 2px;
        font-size: 0.78rem;
    }

    .rr-xmas__dot {
        width: 7px;
        height: 7px;
    }

    .rr-xmas__bubble {
        gap: 8px;
        margin-left: 6px;
        padding: 7px 7px 7px 12px;
        border-radius: 15px;
        font-size: 0.84rem;
    }

    .rr-xmas__bubble::before {
        bottom: 8px;
    }

    .rr-xmas__arrow {
        width: 22px;
        height: 22px;
    }

    .rr-xmas__close {
        top: 0;
        left: -6px;
        width: 26px;
        height: 26px;
        font-size: 17px;
    }
}

@media (max-width: 359px) {
    .rr-xmas {
        right: 6px;
    }

    .rr-xmas__tree {
        width: 76px;
    }

    .rr-xmas__bubble {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rr-xmas,
    .rr-xmas__tree,
    .rr-xmas__bubble {
        transition: none;
    }

    .rr-xmas.is-visible .rr-xmas__tree,
    .rr-xmas.is-visible .rr-xmas__label,
    .rr-xmas.is-visible .rr-xmas__bubble,
    .rr-xmas__svg,
    .rr-xmas__light,
    .rr-xmas__star,
    .rr-xmas__dot,
    .rr-xmas__arrow svg {
        animation: none;
    }

    .rr-xmas__sparkle {
        display: none;
    }
}
