.hc-cookie {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100002;
    color: #1f1911;
}

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

.hc-cookie__banner,
.hc-cookie__panel {
    display: none;
}

.hc-cookie[data-state='banner'] .hc-cookie__banner {
    display: block;
}

.hc-cookie[data-state='panel'] .hc-cookie__panel {
    display: flex;
    align-items: center;
    justify-content: center;
}

body.hc-cookie-locked {
    overflow: hidden;
}

/* ---------------------------------------------------------------- banner -- */

.hc-cookie__banner {
    padding: 12px;
}

.hc-cookie__banner-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1680px;
    margin: 0 auto;
    padding: 20px;
    border-radius: 20px;
    background: #fefcf9;
    box-shadow: 0 -2px 40px rgba(31, 25, 17, 0.16);
    animation: hc-cookie-rise 320ms ease-out both;
}

@keyframes hc-cookie-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

.hc-cookie__banner-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hc-cookie__banner-title {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #1f1911;
}

.hc-cookie__banner-body {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    color: #7b6f5e;
}

.hc-cookie__banner-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.hc-cookie__link {
    color: #1f1911;
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: color 200ms ease;
}

.hc-cookie__link:hover {
    color: #ff5500;
}

@media (min-width: 1000px) {
    .hc-cookie__banner {
        padding: 0 80px 10px;
    }

    .hc-cookie__banner-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 32px;
        padding: 24px 32px;
    }

    .hc-cookie__banner-body {
        font-size: 13px;
        line-height: 18px;
    }

    .hc-cookie__banner-actions {
        flex-wrap: nowrap;
        flex-shrink: 0;
    }
}

/* --------------------------------------------------------------- buttons -- */

.hc-cookie__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    white-space: nowrap;
    cursor: pointer;
    transition: background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}

.hc-cookie__btn:focus-visible {
    outline: 2px solid #ff5500;
    outline-offset: 2px;
}

.hc-cookie__btn--primary {
    background: #ff5500;
    color: #fff;
}

.hc-cookie__btn--primary:hover {
    background: #e64c00;
}

.hc-cookie__btn--secondary {
    border-color: #b0a89d;
    color: #423a2e;
}

.hc-cookie__btn--secondary:hover {
    border-color: #423a2e;
    background: #efebe5;
}

.hc-cookie__btn--ghost {
    background: #efebe5;
    color: #1f1911;
}

.hc-cookie__btn--ghost:hover {
    background: #e3ddd4;
}

/* Icon-only trigger for the preferences panel. Its accessible name comes from
   the aria-label in the template, so nothing is lost by dropping the caption. */
.hc-cookie__btn--icon {
    flex: 0 0 auto;
    width: 44px;
    padding: 0;
    color: #7b6f5e;
}

.hc-cookie__btn--icon:hover {
    background: #efebe5;
    color: #1f1911;
}

.hc-cookie__btn--icon i {
    font-size: 29px;
    line-height: 1;
}

@media (min-width: 1000px) {
    .hc-cookie__btn {
        flex: 0 0 auto;
        font-size: 16px;
    }
}

/* ----------------------------------------------------------------- panel -- */

.hc-cookie__panel {
    position: fixed;
    inset: 0;
    padding: 12px;
}

.hc-cookie__backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    border: 0;
    padding: 0;
    background: rgba(31, 25, 17, 0.8);
    cursor: pointer;
}

.hc-cookie__dialog {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: min(720px, 100%);
    max-height: 100%;
    overflow: hidden;
    border-radius: 20px;
    background: #fefcf9;
    animation: hc-cookie-pop 220ms ease-out both;
}

@keyframes hc-cookie-pop {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hc-cookie__dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 12px;
}

.hc-cookie__dialog-title {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    line-height: 28px;
    color: #1f1911;
}

.hc-cookie__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 8px;
    background: #efebe5;
    color: #1f1911;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 200ms ease;
}

.hc-cookie__close:hover {
    background: #e3ddd4;
}

.hc-cookie__close:focus-visible {
    outline: 2px solid #ff5500;
    outline-offset: 2px;
}

.hc-cookie__dialog-body {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 0 20px 20px;
}

.hc-cookie__intro {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 20px;
    color: #7b6f5e;
}

.hc-cookie__policy {
    margin: 20px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: #7b6f5e;
}

.hc-cookie__dialog-foot {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 16px 20px;
    border-top: 1px solid #efebe5;
    background: #fefcf9;
}

@media (min-width: 640px) {
    .hc-cookie__panel {
        padding: 20px;
    }

    .hc-cookie__dialog-head {
        padding: 32px 32px 16px;
    }

    .hc-cookie__dialog-title {
        font-size: 24px;
        line-height: 32px;
    }

    .hc-cookie__dialog-body {
        padding: 0 32px 24px;
    }

    .hc-cookie__dialog-foot {
        flex-wrap: nowrap;
        justify-content: flex-end;
        padding: 20px 32px;
    }
}

/* ------------------------------------------------------------ categories -- */

.hc-cookie__cat {
    padding: 16px;
    border-radius: 12px;
    background: #efebe5;
}

.hc-cookie__cat + .hc-cookie__cat {
    margin-top: 12px;
}

.hc-cookie__cat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.hc-cookie__cat-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 500;
    line-height: 24px;
    color: #1f1911;
    text-align: left;
    cursor: pointer;
}

.hc-cookie__cat-trigger:focus-visible {
    outline: 2px solid #ff5500;
    outline-offset: 2px;
    border-radius: 4px;
}

.hc-cookie__chevron {
    flex-shrink: 0;
    font-size: 20px;
    line-height: 1;
    color: #7b6f5e;
    transition: transform 200ms ease;
}

.hc-cookie__cat-trigger[aria-expanded='true'] .hc-cookie__chevron {
    transform: rotate(180deg);
}

.hc-cookie__cat-summary {
    margin: 6px 0 0;
    padding-left: 26px;
    font-size: 13px;
    line-height: 18px;
    color: #7b6f5e;
}

.hc-cookie__badge {
    flex-shrink: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: #d9d3c9;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    color: #423a2e;
    white-space: nowrap;
}

.hc-cookie__cat-details {
    margin-top: 16px;
    padding-left: 26px;
}

.hc-cookie__cat-details[hidden] {
    display: none;
}

.hc-cookie__facts {
    margin: 0;
}

.hc-cookie__fact {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 13px;
    line-height: 18px;
}

.hc-cookie__fact + .hc-cookie__fact {
    margin-top: 4px;
}

.hc-cookie__fact dt {
    font-weight: 500;
    color: #423a2e;
}

.hc-cookie__fact dt::after {
    content: ':';
}

.hc-cookie__fact dd {
    margin: 0;
    min-width: 0;
    color: #7b6f5e;
}

.hc-cookie__table-wrap {
    margin-top: 12px;
    overflow-x: auto;
}

.hc-cookie__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    line-height: 16px;
}

.hc-cookie__table th,
.hc-cookie__table td {
    padding: 6px 12px 6px 0;
    text-align: left;
    vertical-align: top;
    white-space: nowrap;
}

.hc-cookie__table th {
    font-weight: 500;
    color: #b0a89d;
    border-bottom: 1px solid #d9d3c9;
}

.hc-cookie__table td {
    color: #7b6f5e;
    border-bottom: 1px solid #e3ddd4;
}

.hc-cookie__table code {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    color: #1f1911;
}

/* ---------------------------------------------------------------- switch -- */

.hc-cookie__switch {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    cursor: pointer;
}

.hc-cookie__switch-input {
    position: absolute;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.hc-cookie__switch-track {
    display: block;
    position: relative;
    width: 44px;
    height: 24px;
    border-radius: 999px;
    background: #c4bcb0;
    transition: background-color 200ms ease;
}

.hc-cookie__switch-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #fff;
    transition: transform 200ms ease;
}

.hc-cookie__switch-input:checked + .hc-cookie__switch-track {
    background: #ff5500;
}

.hc-cookie__switch-input:checked + .hc-cookie__switch-track::after {
    transform: translateX(20px);
}

.hc-cookie__switch-input:focus-visible + .hc-cookie__switch-track {
    outline: 2px solid #ff5500;
    outline-offset: 2px;
}

/* --------------------------------------------------------- footer trigger -- */

.hc-cookie-trigger {
    display: inline-block;
    position: relative;
    width: fit-content;
    max-width: 100%;
    padding: 0;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 16px;
    font-weight: 400;
    line-height: 20px;
    color: #1f1911;
    text-align: left;
    cursor: pointer;
}

.hc-cookie-trigger::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 1.5px;
    background: #1f1911;
    transition: width 300ms ease;
}

.hc-cookie-trigger:hover::after {
    width: 100%;
}

@media (prefers-reduced-motion: reduce) {
    .hc-cookie__banner-inner,
    .hc-cookie__dialog {
        animation: none;
    }

    .hc-cookie *,
    .hc-cookie-trigger::after {
        transition-duration: 1ms !important;
    }
}
