/* Author: Atanas Shumkov */
.cookie-banner,
.cookie-dialog {
    box-sizing: border-box;
    background: #fffaf4;
    color: #382720;
    border: 1px solid #d5c2ad;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgb(52 34 26 / 20%);
    padding: clamp(16px, 3vw, 26px);
    font-size: .95rem;
    line-height: 1.5;
}
.cookie-banner {
    position: fixed;
    z-index: 500;
    left: max(12px, env(safe-area-inset-left));
    bottom: max(12px, env(safe-area-inset-bottom));
    width: min(475px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    overflow: auto;
}
.cookie-banner[hidden] { display: none; }
.cookie-banner .cookie-compact { display: none; }
.cookie-dialog {
    width: min(460px, calc(100% - 24px));
    max-height: calc(100dvh - 24px);
    margin: auto;
    overflow: auto;
}
.cookie-dialog::backdrop { background: rgb(36 24 20 / 55%); }
.cookie-banner h2,
.cookie-dialog h2 {
    margin: 0 0 10px;
    color: inherit;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: normal;
    text-transform: none;
}
.cookie-banner p { margin: 0 0 14px; color: inherit; }
.cookie-banner a,
.cookie-link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: .16em;
}
.cookie-link {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    min-height: 44px;
    cursor: pointer;
}
.cookie-footer-link { text-align: left; }
.cookie-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.cookie-actions button {
    background: #4b342b;
    color: #fffaf4;
    border: 1px solid #4b342b;
    border-radius: 7px;
    padding: 8px;
    min-height: 44px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.cookie-actions button:hover { background: #684a3d; }
.cookie-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 48px;
    border-top: 1px solid #d5c2ad;
}
.cookie-option input {
    width: 21px;
    height: 21px;
    accent-color: #4b342b;
}
.cookie-dialog .cookie-actions { margin-top: 12px; }
.cookie-banner :focus-visible,
.cookie-dialog :focus-visible,
.cookie-footer-link:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}
@media (max-width: 600px) {
    .cookie-banner {
        left: max(8px, env(safe-area-inset-left));
        right: max(8px, env(safe-area-inset-right));
        bottom: max(8px, env(safe-area-inset-bottom));
        width: auto;
        padding: 11px 13px 3px;
        border-radius: 10px;
        box-shadow: 0 4px 18px rgb(52 34 26 / 14%);
        font-size: .875rem;
        line-height: 1.4;
    }
    .cookie-banner .cookie-wide { display: none; }
    .cookie-banner .cookie-compact { display: revert; }
    .cookie-banner h2 {
        margin-bottom: 4px;
        font-size: 1rem;
    }
    .cookie-banner p { margin-bottom: 8px; }
    .cookie-banner .cookie-actions button {
        border-color: #b19b88;
        color: #382720;
        padding: 5px 8px;
    }
    .cookie-banner .cookie-actions [data-choice="reject"] { background: transparent; }
    .cookie-banner .cookie-actions [data-choice="reject"]:hover { background: #f5eee4; }
    .cookie-banner .cookie-actions [data-choice="accept"] {
        background: #c7a676;
        border-color: #a28358;
    }
    .cookie-banner .cookie-actions [data-choice="accept"]:hover { background: #d3b68b; }
    .cookie-banner-links {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0 16px;
        font-size: .8125rem;
    }
    .cookie-banner-links a.cookie-compact {
        display: inline-flex;
        align-items: center;
        min-height: 44px;
    }
}
@media (max-width: 360px) {
    .cookie-dialog .cookie-actions { grid-template-columns: 1fr; }
}
