.cookie-consent,
.cookie-preferences {
    box-sizing: border-box;
    font-family: 'Heebo', Arial, sans-serif;
}

.cookie-consent *,
.cookie-consent *::before,
.cookie-consent *::after,
.cookie-preferences *,
.cookie-preferences *::before,
.cookie-preferences *::after {
    box-sizing: inherit;
}

.cookie-consent {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 100000;
    padding: 14px;
    color: #fff;
    background: rgba(18, 18, 18, 0.96);
    border-top: 1px solid rgba(224, 187, 130, 0.4);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.28);
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.24s ease, opacity 0.24s ease;
}

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

.cookie-consent__body {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    gap: 12px;
}

.cookie-consent__title,
.cookie-consent__description,
.cookie-preferences__title,
.cookie-preferences__intro,
.cookie-category__title,
.cookie-category__description {
    margin: 0;
}

.cookie-consent__title {
    font-size: 1rem;
    font-weight: 800;
    color: #e0bb82;
}

.cookie-consent__description {
    margin-top: 4px;
    font-size: 0.9rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-consent__link {
    color: #e0bb82;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cookie-consent__link:hover {
    color: #f1d3a1;
}

.cookie-consent__actions,
.cookie-preferences__footer {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.cookie-consent__button,
.cookie-preferences__button,
.cookie-preferences__close {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 8px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.cookie-consent__button,
.cookie-preferences__button {
    color: #fff;
    background: transparent;
}

.cookie-consent__button--primary,
.cookie-preferences__button--primary {
    color: #161616;
    background: #e0bb82;
    border-color: #e0bb82;
}

.cookie-consent__button--ghost {
    color: #e0bb82;
    border-color: rgba(224, 187, 130, 0.7);
}

.cookie-consent__button:hover,
.cookie-preferences__button:hover {
    filter: brightness(1.08);
}

.cookie-consent__button:focus-visible,
.cookie-preferences__button:focus-visible,
.cookie-preferences__close:focus-visible,
.cookie-toggle__input:focus-visible + .cookie-toggle__track {
    outline: 3px solid #ffd54f;
    outline-offset: 3px;
}

.cookie-preferences {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: grid;
    place-items: center;
    padding: 18px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cookie-preferences--visible {
    opacity: 1;
    visibility: visible;
}

.cookie-preferences__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.cookie-preferences__dialog {
    position: relative;
    z-index: 1;
    width: min(560px, 100%);
    max-height: min(680px, 92vh);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    color: #202020;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

.cookie-preferences__header,
.cookie-preferences__content,
.cookie-preferences__footer {
    padding: 18px;
}

.cookie-preferences__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #e7e0d5;
}

.cookie-preferences__title {
    font-size: 1.25rem;
    font-weight: 800;
}

.cookie-preferences__close {
    width: 42px;
    padding: 0;
    color: #333;
    background: #f5f1ea;
    border-color: #e7e0d5;
    font-size: 1.5rem;
    line-height: 1;
}

.cookie-preferences__content {
    overflow-y: auto;
}

.cookie-preferences__intro,
.cookie-category__description {
    color: #545454;
    line-height: 1.6;
}

.cookie-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 14px;
    padding: 14px;
    border: 1px solid #e7e0d5;
    border-radius: 8px;
    background: #faf8f4;
}

.cookie-category__title {
    font-size: 1rem;
    font-weight: 800;
}

.cookie-category__description {
    margin-top: 4px;
    font-size: 0.92rem;
}

.cookie-category__status,
.cookie-toggle__text {
    min-width: 84px;
    color: #6f542d;
    font-size: 0.88rem;
    font-weight: 800;
    text-align: left;
}

.cookie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.cookie-toggle__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.cookie-toggle__track {
    position: relative;
    width: 48px;
    height: 26px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #b8b8b8;
    transition: background 0.2s ease;
}

.cookie-toggle__track::after {
    content: '';
    position: absolute;
    top: 3px;
    right: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
    transition: transform 0.2s ease;
}

.cookie-toggle__input:checked + .cookie-toggle__track {
    background: #237a4b;
}

.cookie-toggle__input:checked + .cookie-toggle__track::after {
    transform: translateX(-22px);
}

.cookie-preferences__footer {
    border-top: 1px solid #e7e0d5;
}

.cookie-preferences__button {
    color: #202020;
    border-color: #d6c8b2;
}

@media (min-width: 760px) {
    .cookie-consent__body {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
        gap: 20px;
    }

    .cookie-consent__actions {
        width: 330px;
    }
}

@media (max-width: 520px) {
    .cookie-consent__actions,
    .cookie-preferences__footer {
        grid-template-columns: 1fr;
    }

    .cookie-category {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cookie-consent,
    .cookie-preferences,
    .cookie-toggle__track,
    .cookie-toggle__track::after {
        transition: none;
    }
}

@media print {
    .cookie-consent,
    .cookie-preferences {
        display: none !important;
    }
}
