.cookie-consent {
    --cookie-consent-offset: 16px;
    position: fixed;
    left: calc(16px + max(0px, (100vw - var(--site-max-width)) / 2));
    right: calc(16px + max(0px, (100vw - var(--site-max-width)) / 2));
    bottom: var(--cookie-consent-offset);
    z-index: 300;
    background-color: var(--color-vanilla-cream);
    color: var(--color-dark-green);
    border-radius: 20px;
    box-shadow: 0 4px 24px rgba(19, 47, 29, 0.24);
    overflow: hidden;
    transform: translateY(calc(100% + var(--cookie-consent-offset)));
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-consent.is-visible {
    transform: translateY(0);
}

.cookie-consent__inner {
    margin: 0 auto;
    padding: clamp(16px, 1.667vw, 28px) clamp(20px, 2vw, 32px);
    display: flex;
    align-items: center;
    gap: clamp(16px, 1.667vw, 32px);
}

.cookie-consent__text {
    flex: 1;
}

.cookie-consent__text p {
    font-size: var(--text-m);
    line-height: 1.4;
    color: var(--color-dark-green);
}

.cookie-consent__text a {
    color: var(--color-matcha-green);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.cookie-consent__actions {
    display: flex;
    align-items: center;
    gap: clamp(12px, 1.111vw, 24px);
    flex-shrink: 0;
}

.cookie-consent__text-btn {
    background: none;
    border: none;
    padding: 0;
    font-family: var(--font-primary);
    font-size: var(--text-m);
    font-weight: 500;
    color: var(--color-dark-green);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.cookie-consent__text-btn:hover {
    color: var(--color-matcha-green);
}

.cookie-consent__accept-btn {
    padding: clamp(5px, 0.347vw, 7px) clamp(20px, 1.389vw, 28px);
    white-space: nowrap;
}

.cookie-consent__panel {
    border-top: 1.5px solid var(--color-dark-green-10);
    padding: clamp(16px, 1.667vw, 28px) clamp(20px, 2vw, 32px);
    display: flex;
    gap: clamp(20px, 2.222vw, 40px);
}

.cookie-consent__panel[hidden] {
    display: none;
}

.cookie-consent__category {
    flex: 1;
}

.cookie-consent__category-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-consent__category-head span {
    font-size: var(--text-body);
    font-weight: 500;
}

.cookie-consent__category p {
    font-size: var(--text-m);
    color: var(--color-dark-green-50);
    line-height: 1.4;
    margin-top: 4px;
}

.cookie-consent__toggle {
    position: relative;
    display: inline-flex;
    flex-shrink: 0;
    cursor: pointer;
}

.cookie-consent__toggle--locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-consent__toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.cookie-consent__toggle-track {
    width: 40px;
    height: 24px;
    border-radius: 100px;
    background-color: var(--color-dark-green-20);
    display: inline-flex;
    align-items: center;
    padding: 3px;
    transition: background-color 0.2s ease;
}

.cookie-consent__toggle-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--color-vanilla-cream);
    transition: transform 0.2s ease;
}

.cookie-consent__toggle-input:checked + .cookie-consent__toggle-track {
    background-color: var(--color-matcha-green);
}

.cookie-consent__toggle-input:checked + .cookie-consent__toggle-track .cookie-consent__toggle-thumb {
    transform: translateX(16px);
}

.cookie-consent__toggle-input:focus-visible + .cookie-consent__toggle-track {
    outline: 2px solid var(--color-matcha-green);
    outline-offset: 2px;
}

@media (max-width: 768px) {
    .cookie-consent__inner {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 16px;
    }

    .cookie-consent__actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .cookie-consent__accept-btn {
        order: -1;
        width: 100%;
        justify-content: center;
    }

    .cookie-consent__panel {
        flex-direction: column;
    }
}

