#st-cookie-panel[hidden], [data-st-cookie-settings][hidden] { display: none !important; }

#st-cookie-panel {
    position: fixed;
    z-index: 31;
    inset-inline: max(12px, env(safe-area-inset-left)) max(12px, env(safe-area-inset-right));
    inset-block-end: calc(max(12px, env(safe-area-inset-bottom)) + var(--st-cookie-lift, 0px));
    box-sizing: border-box;
    inline-size: min(880px, calc(100% - 24px));
    max-block-size: calc(100dvh - 40px);
    margin-inline: auto;
    padding: 8px 10px;
    overflow: auto;
    color: #252820;
    background: #fcfbf8;
    border: 1px solid #d5d4cb;
    border-radius: 9px;
    box-shadow: 0 4px 20px rgb(34 40 31 / 13%);
    font: 400 13px/1.3 var(--flow-font, Arial, sans-serif);
}

/* Keep the consent view out of both native dialogs and the legacy quick order. */
body:has(dialog[open]) #st-cookie-panel,
body.st-quick-order-open #st-cookie-panel { display: none; }

html:has(#st-cookie-panel:not([hidden])) { scroll-padding-block-end: 10rem; }

#st-cookie-panel #st-cookie-title {
    display: inline;
    margin: 0;
    padding: 0;
    color: inherit;
    text-align: start;
    text-transform: none;
    font: 700 15px/1.2 var(--flow-font, Arial, sans-serif);
}

#st-cookie-panel #st-cookie-title::after { content: ". "; white-space: pre; }

#st-cookie-panel p { display: inline; margin: 0; font: inherit; }

.st-cookie-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    margin-block-start: 6px;
}

#st-cookie-panel [data-st-cookie-choice] {
    box-sizing: border-box;
    min-block-size: 44px;
    padding: 4px 6px;
    color: #28322b;
    background: #edf0e9;
    border: 1px solid #899487;
    border-radius: 5px;
    font: 700 13px/1.2 var(--flow-font, Arial, sans-serif);
    text-transform: none;
    white-space: normal;
    cursor: pointer;
}

#st-cookie-panel [data-st-cookie-choice]:hover { background: #e2e8de; }

[data-st-cookie-settings]:not([hidden]) {
    color: inherit;
    background: none;
    border: 0;
    text-decoration: underline;
    text-underline-offset: .15em;
    text-transform: none;
    font: inherit;
    cursor: pointer;
}

#st-cookie-panel :is(button, #st-cookie-title):focus-visible,
[data-st-cookie-settings]:focus-visible {
    outline: 2px solid #31574b;
    outline-offset: 3px;
}

#st-cookie-status {
    position: absolute;
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

@media (min-width: 760px) {
    #st-cookie-panel {
        display: grid;
        grid-template-columns: minmax(0, 1fr) min(320px, 42%);
        align-items: center;
        gap: 2px 14px;
        padding: 9px 14px;
    }

    #st-cookie-panel #st-cookie-title { grid-column: 1; }
    #st-cookie-panel #st-cookie-title::after { content: none; }
    #st-cookie-panel p { grid-column: 1; }

    #st-cookie-panel .st-cookie-actions {
        grid-column: 2;
        grid-row: 1 / span 2;
        margin-block-start: 0;
    }
}

#st-cookie-panel p a {
    color: #31574b;
    text-decoration: underline;
    text-underline-offset: .15em;
}

#st-cookie-panel p a:focus-visible {
    outline: 2px solid #31574b;
    outline-offset: 2px;
}

.st-cookie-footer-links {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .3em 1em;
}

.st-cookie-footer-links a { color: inherit; text-decoration: underline; }
