:root {
    --cookie-white: #fffefe;
    --cookie-light: #faf9f7;
    --cookie-beige: #eadfd8;
    --cookie-pink: #dbb8bf;
    --cookie-pink-dark: #cfa8b0;
    --cookie-text: #5a5551;
    --cookie-dark: #2c2927;
    --cookie-shadow: 0 18px 55px rgba(44, 41, 39, 0.18);
}

.cookie-lock {
    overflow: hidden;
}

.cookie-consent-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9998;
    background: rgba(44, 41, 39, 0.28);
    backdrop-filter: blur(2px);
}

.cookie-consent {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 9999;
    box-sizing: border-box;
    width: min(92vw, 520px);
    max-height: min(76vh, 460px);
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    min-height: 0;
    border: 1px solid rgba(234, 223, 216, 0.9);
    border-radius: 10px;
    background: var(--cookie-white);
    box-shadow: 0 14px 42px rgba(44, 41, 39, 0.16);
    color: var(--cookie-dark);
    font-family: 'Montserrat', Arial, sans-serif;
}

.cookie-consent[hidden],
.cookie-consent-backdrop[hidden] {
    display: none !important;
}

.cookie-consent__header {
    position: relative;
    padding: 14px 46px 8px;
    text-align: center;
}

.cookie-consent__title {
    margin: 0;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.08rem;
    font-weight: 400;
    line-height: 1.1;
}

.cookie-consent__close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: var(--cookie-dark);
    font-size: 1.2rem;
    cursor: pointer;
}

.cookie-consent__close:hover,
.cookie-consent__close:focus-visible {
    background: var(--cookie-light);
}

.cookie-consent__body {
    flex: 0 1 auto;
    padding: 0 22px 10px;
    overflow: auto;
}

.cookie-consent__intro {
    margin: 0;
    color: var(--cookie-text);
    font-size: 0.72rem;
    line-height: 1.55;
}

.cookie-consent__actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 0 22px 10px;
}

.cookie-btn {
    min-height: 38px;
    padding: 0 12px;
    border: 1px solid var(--cookie-beige);
    border-radius: 6px;
    background: var(--cookie-white);
    color: var(--cookie-dark);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.76rem;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.cookie-btn--primary {
    border-color: var(--cookie-pink);
    background: var(--cookie-pink);
    color: #fff;
}

.cookie-btn--primary:hover,
.cookie-btn--primary:focus-visible {
    border-color: var(--cookie-pink-dark);
    background: var(--cookie-pink-dark);
}

.cookie-btn--ghost:hover,
.cookie-btn--ghost:focus-visible {
    background: var(--cookie-light);
    border-color: var(--cookie-pink);
}

.cookie-consent__links {
    display: flex;
    justify-content: center;
    gap: 16px;
    padding: 0 22px 14px;
    font-size: 0.68rem;
}

.cookie-consent__links a,
.cookie-link {
    color: #9f7c83;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-preferences {
    display: none;
    gap: 8px;
    margin-top: 10px;
}

.cookie-consent--preferences .cookie-preferences {
    display: grid;
}

.cookie-category {
    padding: 11px 14px 10px;
    background: var(--cookie-light);
    border: 1px solid rgba(234, 223, 216, 0.68);
    border-radius: 8px;
}

.cookie-category__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 6px;
}

.cookie-category__name {
    margin: 0;
    font-size: 0.86rem;
    font-weight: 500;
}

.cookie-category__desc {
    margin: 0;
    color: var(--cookie-text);
    font-size: 0.7rem;
    line-height: 1.45;
}

.cookie-always {
    color: #7a9a56;
    font-size: 0.76rem;
    font-weight: 500;
    white-space: nowrap;
}

.cookie-toggle {
    position: relative;
    display: inline-flex;
    width: 44px;
    height: 24px;
    flex: 0 0 auto;
}

.cookie-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.cookie-toggle span {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #d8d1ca;
    cursor: pointer;
    transition: background-color 0.25s ease;
}

.cookie-toggle span::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(44, 41, 39, 0.18);
    transition: transform 0.25s ease;
}

.cookie-toggle input:checked + span {
    background: var(--cookie-pink);
}

.cookie-toggle input:checked + span::after {
    transform: translateX(20px);
}

.cookie-embed-consent {
    position: absolute;
    inset: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(250, 249, 247, 0.96);
    text-align: center;
}

.cookie-embed-consent__box {
    max-width: 360px;
    color: var(--cookie-text);
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 0.84rem;
    line-height: 1.65;
}

.cookie-embed-consent__box strong {
    display: block;
    margin-bottom: 8px;
    color: var(--cookie-dark);
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.45rem;
    font-weight: 400;
    line-height: 1.1;
}

.cookie-embed-consent__box button {
    margin-top: 14px;
}

.cookie-embed-blocked {
    position: relative;
    min-height: 280px;
    background: var(--cookie-light);
}

@media (max-width: 640px) {
    .cookie-consent {
        right: 10px;
        bottom: 10px;
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        border-radius: 10px;
    }

    .cookie-consent__header {
        padding: 14px 44px 8px;
    }

    .cookie-consent__body {
        padding: 0 16px 10px;
    }

    .cookie-consent__actions {
        grid-template-columns: 1fr;
        padding: 0 16px 10px;
    }

    .cookie-consent__links {
        flex-wrap: wrap;
        padding: 0 16px 14px;
    }
}
