.cookie-consent-banner {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 120;
    width: min(620px, calc(100vw - 48px));
    padding: 24px;
    border: 1px solid var(--importeria-line);
    background: var(--importeria-paper);
    box-shadow: 0 18px 50px rgba(52, 35, 29, 0.22);
}

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

.cookie-consent-dismiss {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 38px;
    height: 38px;
    border: 0;
    background: transparent;
    color: var(--importeria-burgundy);
    font: inherit;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.cookie-consent-dismiss:hover,
.cookie-consent-dismiss:focus-visible {
    background: rgba(181, 72, 55, 0.1);
    outline: 3px solid rgba(181, 72, 55, 0.28);
    outline-offset: 1px;
}

.cookie-consent-banner h2,
.cookie-settings-panel h1,
.cookie-settings-panel h2 {
    margin: 0;
    color: var(--importeria-burgundy);
    font-weight: 500;
}

.cookie-consent-banner h2 {
    font-size: 28px;
}

.cookie-consent-banner p {
    margin: 14px 0 0;
    color: var(--importeria-muted);
    line-height: 1.58;
}

.cookie-consent-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 16px;
}

.cookie-consent-links a,
.cookie-settings-detail-link {
    color: var(--importeria-burgundy);
    font-weight: 700;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.cookie-consent-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 20px;
}

.cookie-consent-actions form {
    display: contents;
}

.cookie-consent-button,
.cookie-consent-customise {
    min-height: 46px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 14px;
    border: 1px solid var(--importeria-burgundy);
    background: transparent;
    color: var(--importeria-burgundy);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.cookie-consent-button:hover,
.cookie-consent-button:focus-visible,
.cookie-consent-customise:hover,
.cookie-consent-customise:focus-visible {
    background: var(--importeria-burgundy);
    color: var(--importeria-cream);
    outline: 3px solid rgba(181, 72, 55, 0.28);
    outline-offset: 2px;
}

.cookie-settings-page {
    padding: 56px 0 72px;
}

.cookie-settings-panel {
    max-width: 900px;
}

.cookie-settings-panel > p {
    max-width: 720px;
    color: var(--importeria-muted);
    font-size: 18px;
    line-height: 1.65;
}

.cookie-settings-categories {
    margin: 34px 0 26px;
    border-top: 1px solid var(--importeria-line);
}

.cookie-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    padding: 22px 0;
    border-bottom: 1px solid var(--importeria-line);
}

.cookie-category-row h2 {
    font-size: 21px;
}

.cookie-category-row p {
    margin: 8px 0 0;
    color: var(--importeria-muted);
    line-height: 1.55;
}

.cookie-category-count {
    font-size: 13px;
}

.cookie-category-toggle {
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: var(--importeria-burgundy);
    font-weight: 700;
    cursor: pointer;
}

.cookie-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.cookie-toggle-track {
    position: relative;
    display: inline-flex;
    flex: 0 0 auto;
    width: 54px;
    height: 30px;
    box-sizing: border-box;
    align-items: center;
    padding: 3px;
    border: 1px solid #777;
    border-radius: 999px;
    background: #858585;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.cookie-toggle-thumb {
    display: block;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(35, 24, 20, 0.28);
    transition: transform 160ms ease;
}

.cookie-toggle-input:checked + .cookie-toggle-track {
    border-color: var(--importeria-burgundy);
    background: var(--importeria-burgundy);
}

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

.cookie-toggle-input:focus-visible + .cookie-toggle-track {
    outline: 3px solid rgba(181, 72, 55, 0.3);
    outline-offset: 3px;
}

.cookie-toggle-input:disabled + .cookie-toggle-track {
    cursor: not-allowed;
}

.cookie-toggle-fixed {
    min-width: max-content;
    color: var(--importeria-burgundy);
    font-size: 14px;
}

.cookie-settings-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 10px;
    margin-top: 20px;
}

.cookie-settings-actions form {
    display: contents;
}

.cookie-settings-actions .cookie-consent-button {
    width: 100%;
    height: 100%;
}

@media (max-width: 720px) {
    .cookie-consent-banner {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        padding: 20px;
    }

    .cookie-consent-actions {
        grid-template-columns: 1fr;
    }

    .cookie-settings-actions {
        grid-template-columns: 1fr;
    }

    .cookie-category-row {
        grid-template-columns: 1fr;
    }

    .cookie-category-toggle {
        width: 100%;
        justify-content: flex-start;
    }
}
