/* Accessible, site-wide cookie consent panel. */
.cookie-consent {
    position: fixed !important;
    inset: auto auto max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)) !important;
    margin: 0 !important;
    z-index: 12000;
    width: min(420px, calc(100vw - 28px));
    max-height: calc(100dvh - 28px);
    color: #17342d;
    font-family: inherit;
    isolation: isolate;
    contain: layout style;
    visibility: hidden;
    opacity: 0;
    transform: translateY(18px) scale(.98);
    transition: opacity .3s ease, transform .3s ease, visibility .3s ease;
}
.cookie-consent.is-visible { visibility: visible; opacity: 1; transform: none; }
.cookie-consent__panel {
    position: relative;
    max-height: calc(100dvh - 28px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 1.15rem;
    border: 1px solid rgba(127,166,155,.3);
    border-radius: 22px;
    background: rgba(255,255,255,.97);
    box-shadow: 0 24px 70px rgba(12,46,38,.24), inset 0 1px 0 #fff;
    backdrop-filter: blur(18px);
}
.cookie-consent__panel::before {
    content: '';
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #4b7d70, #9bc7ba, #4b7d70);
}
.cookie-consent__head { display: flex; align-items: flex-start; gap: .8rem; }
.cookie-consent__icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 13px;
    background: linear-gradient(145deg, #1c4b41, #2d6b5d);
    color: #fff;
    box-shadow: 0 10px 22px rgba(30,86,72,.22);
}
.cookie-consent h2 { margin: 0 0 .2rem; font-size: 1.03rem; line-height: 1.25; }
.cookie-consent p { margin: 0; color: #5e746e; font-size: .78rem; line-height: 1.55; }
.cookie-consent p a { color: #2d695b; font-weight: 700; }
.cookie-consent__choices { display: none; gap: .55rem; margin-top: .85rem; }
.cookie-consent.is-customizing .cookie-consent__choices { display: grid; }
.cookie-consent__choice {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .62rem .7rem;
    border: 1px solid rgba(127,166,155,.18);
    border-radius: 12px;
    background: #f6faf8;
}
.cookie-consent__choice strong { display: block; font-size: .76rem; }
.cookie-consent__choice small { display: block; margin-top: .08rem; color: #71847f; font-size: .63rem; }
.cookie-consent__switch { position: relative; width: 38px; height: 22px; flex: 0 0 auto; }
.cookie-consent__switch input { position: absolute; opacity: 0; }
.cookie-consent__switch span { position: absolute; inset: 0; border-radius: 99px; background: #cbd7d3; transition: .2s ease; }
.cookie-consent__switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.18); transition: .2s ease; }
.cookie-consent__switch input:checked + span { background: #4f8b7c; }
.cookie-consent__switch input:checked + span::after { transform: translateX(16px); }
.cookie-consent__switch input:focus-visible + span { outline: 3px solid rgba(79,139,124,.24); outline-offset: 2px; }
.cookie-consent__actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .95rem; }
.cookie-consent__button {
    min-height: 38px;
    padding: .55rem .82rem;
    border: 1px solid rgba(65,112,100,.25);
    border-radius: 11px;
    background: #fff;
    color: #315f54;
    cursor: pointer;
    font: 700 .7rem/1 inherit;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.cookie-consent__button:hover { transform: translateY(-1px); background: #f0f7f4; }
.cookie-consent__button--primary { flex: 1 1 145px; border-color: transparent; background: linear-gradient(135deg, #376f62, #609a8b); color: #fff; box-shadow: 0 10px 22px rgba(55,111,98,.23); }
.cookie-consent__button--primary:hover { background: linear-gradient(135deg, #2e6256, #548c7e); }
.cookie-consent__save { display: none; }
.cookie-consent.is-customizing .cookie-consent__save { display: inline-flex; align-items: center; justify-content: center; }
.cookie-consent.is-customizing .cookie-consent__accept { display: none; }
.cookie-preferences-button {
    position: fixed !important;
    inset: auto auto max(14px, env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left)) !important;
    margin: 0 !important;
    z-index: 11990;
    display: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 50%;
    background: #245e52;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(12,46,38,.25);
}
.cookie-preferences-button.is-visible { display: grid; }
@media (max-width: 520px) {
    .cookie-consent { inset: auto auto max(10px, env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important; width: calc(100vw - 20px); }
    .cookie-consent__panel { padding: 1rem; border-radius: 18px; }
    .cookie-consent__actions { display: grid; grid-template-columns: 1fr 1fr; }
    .cookie-consent__button--primary, .cookie-consent__save { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) {
    .cookie-consent, .cookie-consent *, .cookie-preferences-button { transition: none !important; }
}
