/* Sladka Pohotovost — cookie consent brand overrides (Shoptet-like bottom bar) */

:root {
    --cc-bg: #ffffff;
    --cc-primary-color: #333333;
    --cc-secondary-color: #666666;
    --cc-btn-primary-bg: #d61652;
    --cc-btn-primary-color: #ffffff;
    --cc-btn-primary-hover-bg: #b81245;
    --cc-btn-primary-border-color: #d61652;
    --cc-btn-secondary-bg: #ffffff;
    --cc-btn-secondary-color: #333333;
    --cc-btn-secondary-border-color: #cccccc;
    --cc-btn-secondary-hover-bg: #f5f5f5;
    --cc-separator-border-color: #eeeeee;
    --cc-toggle-on-bg: #d61652;
    --cc-link-color: #d61652;
    --cc-font-family: inherit;
    --cc-modal-border-radius: 0.5rem;
    --cc-btn-border-radius: 0.35rem;
}

#cc-main .cm {
    max-width: 100%;
    border-top: 1px solid #eeeeee;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}

#cc-main .cm.cm--bar.cm--inline .cm__body {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 1.25rem;
    box-sizing: border-box;
}

#cc-main .cm__texts .cm__title {
    font-weight: 700;
}

#cc-main .cm__btn--secondary {
    border: 1px solid #cccccc;
}

#cc-main .pm__btn--primary {
    background: #2e7d32;
    border-color: #2e7d32;
}

#cc-main .pm__btn--primary:hover {
    background: #256b29;
    border-color: #256b29;
}

/* Cookie mascot — own flex box, image centered inside (overrides #cc-main div { all: unset }) */
#cc-main .cm__body .sladka-cookie-mascot {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    align-self: center;
    box-sizing: border-box;
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    max-width: 64px;
    max-height: 64px;
    margin: 0;
    padding: 0.35rem;
    position: relative;
    overflow: visible;
}

#cc-main .cm__body .sladka-cookie-mascot img {
    display: block;
    width: auto;
    height: auto;
    max-width: 52px;
    max-height: 52px;
    margin: 0 auto;
    object-fit: contain;
    object-position: center center;
    transform-origin: center center;
    transition: transform 0.15s ease;
}

/* Bite animation */
@keyframes sladka-cookie-bite {
    0% {
        clip-path: circle(100% at 50% 50%);
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    35% {
        clip-path: polygon(
            0% 0%, 100% 0%, 100% 100%, 0% 100%,
            0% 52%, 18% 48%, 28% 62%, 14% 78%, 0% 68%
        );
        transform: scale(1) rotate(-8deg);
        opacity: 1;
    }

    70% {
        clip-path: polygon(
            0% 0%, 100% 0%, 100% 100%, 0% 100%,
            0% 52%, 18% 48%, 28% 62%, 14% 78%, 0% 68%
        );
        transform: scale(0.85) rotate(-12deg);
        opacity: 0.85;
    }

    100% {
        clip-path: polygon(
            0% 0%, 100% 0%, 100% 100%, 0% 100%,
            0% 52%, 18% 48%, 28% 62%, 14% 78%, 0% 68%
        );
        transform: scale(0.2) rotate(-20deg);
        opacity: 0;
    }
}

@keyframes sladka-cookie-crumbs {
    0% {
        opacity: 0;
        transform: translate(0, 0) scale(0.5);
    }

    30% {
        opacity: 1;
    }

    100% {
        opacity: 0;
        transform: translate(12px, 18px) scale(0.2);
    }
}

@keyframes sladka-bar-slide-out {
    to {
        transform: translateY(110%);
        opacity: 0;
    }
}

#cc-main .cm.sladka-cookie-bite {
    pointer-events: none;
}

#cc-main .cm.sladka-cookie-bite .sladka-cookie-mascot img {
    animation: sladka-cookie-bite 0.65s ease-in forwards;
}

#cc-main .cm.sladka-cookie-bite .sladka-cookie-mascot::after {
    content: "";
    position: absolute;
    top: 18%;
    right: 8%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c8955a;
    box-shadow: 14px 8px 0 2px #c8955a, 6px 16px 0 1px #a06830;
    animation: sladka-cookie-crumbs 0.55s ease-out 0.2s forwards;
    opacity: 0;
}

#cc-main .cm.sladka-cookie-bite {
    animation: sladka-bar-slide-out 0.45s ease 0.55s forwards;
}

#cc-main .cm.sladka-cookie-dismiss {
    animation: sladka-bar-slide-out 0.35s ease forwards;
}

@media (max-width: 768px) {
    #cc-main .cm.cm--bar.cm--inline .cm__body {
        flex-wrap: wrap;
        justify-content: center;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    #cc-main .cm__body .sladka-cookie-mascot {
        width: 56px;
        height: 56px;
        min-width: 56px;
        min-height: 56px;
        max-width: 56px;
        max-height: 56px;
        margin: 0 auto 0.25rem;
        flex-basis: 100%;
    }

    #cc-main .cm__body .sladka-cookie-mascot img {
        max-width: 44px;
        max-height: 44px;
    }

    #cc-main .cm__texts {
        flex-basis: 100%;
    }
}

/* Footer — change cookie preferences anytime */
.footer-cookie-settings {
    margin-left: 0;
}

.footer-cookie-settings button {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.footer-cookie-settings button:hover {
    color: #d61652;
}

.footer-cookie-settings__icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    opacity: 0.9;
}
