/* Cookie consent — compact bottom-left card, always light */

.cookie-consent-anchor {
    position: fixed;
    left: clamp(0.75rem, 2vw, 1.1rem);
    bottom: clamp(0.75rem, 2vw, 1.1rem);
    z-index: 120;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
    max-width: min(19rem, calc(100vw - 1.5rem));
}

.cookie-consent-fab {
    order: 2;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border: 0;
    border-radius: 0.55rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(145deg, #ff7a00 0%, #ff6100 100%);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 8px 20px rgba(255, 97, 0, 0.28);
    transition:
        transform 160ms ease,
        box-shadow 160ms ease,
        filter 160ms ease;
}

.cookie-consent-fab:hover {
    transform: translateY(-1px);
    filter: brightness(1.04);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 10px 24px rgba(255, 97, 0, 0.34);
}

.cookie-consent-fab:focus-visible {
    outline: 2px solid rgba(255, 97, 0, 0.45);
    outline-offset: 2px;
}

.cookie-consent-fab__icon {
    width: 1.2rem;
    height: 1.2rem;
}

.cookie-consent {
    order: 1;
    position: relative;
    left: auto;
    bottom: auto;
    right: auto;
    width: min(17.5rem, calc(100vw - 1.5rem));
    pointer-events: none;
}

.cookie-consent:not([hidden]) {
    pointer-events: auto;
}

.cookie-consent__panel {
    width: 100%;
    padding: 0.85rem;
    border: 1px solid rgba(26, 23, 20, 0.08);
    border-radius: 0.65rem;
    background: #fff;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 12px 32px rgba(10, 11, 14, 0.1);
}

.cookie-consent__head {
    display: grid;
    grid-template-columns: 2.5rem 1fr;
    gap: 0.65rem;
    align-items: center;
    margin-bottom: 0.55rem;
}

.cookie-consent__logo {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    border-radius: 0.5rem;
    background: linear-gradient(145deg, rgba(255, 122, 0, 0.1) 0%, rgba(255, 97, 0, 0.06) 100%);
    border: 1px solid rgba(255, 97, 0, 0.12);
}

.cookie-consent__logo img {
    width: 1.65rem;
    height: 1.65rem;
    object-fit: contain;
    display: block;
}

.cookie-consent__eyebrow {
    margin: 0;
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ff6100;
    font-weight: 650;
}

.cookie-consent__title {
    margin: 0.15rem 0 0;
    font-size: 0.82rem;
    line-height: 1.25;
    letter-spacing: -0.02em;
    font-weight: 650;
    color: #1a1714;
}

.cookie-consent__text {
    margin: 0 0 0.65rem;
    font-size: 0.72rem;
    line-height: 1.5;
    color: rgba(26, 23, 20, 0.58);
}

.cookie-consent__text a {
    color: #ff6100;
    font-weight: 600;
    text-decoration: none;
}

.cookie-consent__text a:hover {
    text-decoration: underline;
}

.cookie-consent__main,
.cookie-consent__preferences {
    display: grid;
    gap: 0;
}

.cookie-consent__actions {
    display: grid;
    gap: 0.35rem;
}

.cookie-consent__btn {
    border: 0;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.48rem 0.65rem;
    border-radius: 0.45rem;
    font-size: 0.72rem;
    font-weight: 650;
    transition:
        background 160ms ease,
        color 160ms ease,
        border-color 160ms ease;
}

.cookie-consent__btn--primary {
    color: #0a0b0e;
    background: linear-gradient(135deg, #ff7a00 0%, #ff6100 100%);
}

.cookie-consent__btn--secondary {
    color: #1a1714;
    background: rgba(26, 23, 20, 0.04);
    border: 1px solid rgba(26, 23, 20, 0.08);
}

.cookie-consent__btn--ghost {
    color: rgba(26, 23, 20, 0.52);
    background: transparent;
    border: 1px solid rgba(26, 23, 20, 0.06);
}

.cookie-consent__btn:hover {
    filter: brightness(1.03);
}

.cookie-consent__categories {
    list-style: none;
    margin: 0 0 0.65rem;
    padding: 0;
    display: grid;
    gap: 0.45rem;
}

.cookie-consent__category {
    padding: 0.55rem 0.6rem;
    border: 1px solid rgba(26, 23, 20, 0.06);
    border-radius: 0.45rem;
    background: rgba(250, 250, 250, 0.95);
}

.cookie-consent__category p {
    margin: 0.25rem 0 0;
    font-size: 0.68rem;
    line-height: 1.45;
    color: rgba(26, 23, 20, 0.52);
}

.cookie-consent__category-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.74rem;
    color: #1a1714;
}

.cookie-consent__category-head--toggle {
    width: 100%;
    cursor: pointer;
}

.cookie-consent__category-head strong {
    flex: 1 1 auto;
    min-width: 0;
}

.cookie-consent__always {
    flex-shrink: 0;
    font-size: 0.58rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(26, 23, 20, 0.34);
    font-weight: 650;
}

.cookie-consent__toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    width: 2.35rem;
    height: 1.25rem;
}

.cookie-consent__toggle input {
    position: absolute;
    inset: 0;
    z-index: 1;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.cookie-consent__switch-track {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    background: #e8e4df;
    border: 1px solid rgba(26, 23, 20, 0.12);
    box-shadow: inset 0 1px 2px rgba(26, 23, 20, 0.06);
    transition:
        background 160ms ease,
        border-color 160ms ease;
}

.cookie-consent__switch-track::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 0.14rem;
    width: 0.92rem;
    height: 0.92rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid rgba(26, 23, 20, 0.08);
    box-shadow: 0 1px 3px rgba(10, 11, 14, 0.18);
    transform: translateY(-50%);
    transition: transform 160ms ease;
}

.cookie-consent__toggle input:checked + .cookie-consent__switch-track {
    background: #ff6100;
    border-color: #e85500;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.cookie-consent__toggle input:checked + .cookie-consent__switch-track::after {
    transform: translate(1.05rem, -50%);
    border-color: rgba(255, 255, 255, 0.85);
}

.cookie-consent__toggle input:focus-visible + .cookie-consent__switch-track {
    outline: 2px solid rgba(255, 97, 0, 0.35);
    outline-offset: 2px;
}

.cookie-consent__preferences .cookie-consent__head {
    margin-bottom: 0.65rem;
}

/* Preferences panel slightly wider but still bottom-left */
.cookie-consent-anchor:has([data-cookie-panel="preferences"]:not([hidden])) .cookie-consent {
    width: min(19rem, calc(100vw - 1.5rem));
}

/* Always light — ignore site dark mode */
html.dark .cookie-consent__panel {
    background: #fff;
    border-color: rgba(26, 23, 20, 0.08);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.9) inset,
        0 12px 32px rgba(10, 11, 14, 0.16);
}

html.dark .cookie-consent__title,
html.dark .cookie-consent__category-head {
    color: #1a1714;
}

html.dark .cookie-consent__text,
html.dark .cookie-consent__category p {
    color: rgba(26, 23, 20, 0.58);
}

html.dark .cookie-consent__category {
    background: rgba(250, 250, 250, 0.95);
    border-color: rgba(26, 23, 20, 0.06);
}

html.dark .cookie-consent__btn--secondary {
    color: #1a1714;
    background: rgba(26, 23, 20, 0.04);
    border-color: rgba(26, 23, 20, 0.08);
}

html.dark .cookie-consent__btn--ghost {
    color: rgba(26, 23, 20, 0.52);
}
