@keyframes cookie-slide-up {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cookie-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-consent {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 100;
    pointer-events: none;
}

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

.cookie-consent__shell {
    position: relative;
    display: flex;
    width: 100%;
    flex-direction: column;
}

.cookie-consent__backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(18, 26, 34, 0.4);
    backdrop-filter: blur(2px);
    animation: cookie-backdrop-in 0.25s ease-out;
}

.cookie-consent__bar {
    position: relative;
    z-index: 101;
    width: 100%;
    border-top: 1px solid rgba(197, 205, 214, 0.9);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -8px 32px rgba(18, 26, 34, 0.12);
    backdrop-filter: blur(16px);
    animation: cookie-slide-up 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-consent__container {
    margin-inline: auto;
    width: 100%;
    max-width: 80rem;
    padding: 1rem 1rem;
}

@media (min-width: 640px) {
    .cookie-consent__container {
        padding: 1.25rem 1.5rem;
    }
}

.cookie-consent__inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 1024px) {
    .cookie-consent__inner {
        flex-direction: row;
        align-items: center;
        gap: 1.5rem;
    }
}

.cookie-consent__brand {
    display: none;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .cookie-consent__brand {
        display: block;
    }
}

.cookie-consent__icon {
    display: flex;
    height: 2.75rem;
    width: 2.75rem;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(245, 158, 11, 0.1);
    color: #d97706;
}

.cookie-consent__icon svg {
    height: 1.5rem;
    width: 1.5rem;
}

.cookie-consent__copy {
    min-width: 0;
    flex: 1;
}

.cookie-consent__title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #1c2630;
}

@media (min-width: 640px) {
    .cookie-consent__title {
        font-size: 1.125rem;
    }
}

.cookie-consent__text {
    margin-top: 0.375rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: #354656;
}

.cookie-consent__link {
    font-weight: 500;
    color: #1c2630;
    text-decoration: underline;
    text-decoration-color: #9aa8b5;
    text-underline-offset: 2px;
}

.cookie-consent__link:hover {
    text-decoration-color: #1c2630;
}

.cookie-consent__actions {
    display: flex;
    width: 100%;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .cookie-consent__actions {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}

@media (min-width: 1024px) {
    .cookie-consent__actions {
        width: auto;
    }
}

.cookie-consent__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.75rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    transition: background-color 0.15s, color 0.15s, border-color 0.15s;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.cookie-consent__btn:focus {
    outline: none;
}

.cookie-consent__btn:focus-visible {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4);
}

.cookie-consent__btn--primary {
    background: #1c2630;
    color: #fff;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.cookie-consent__btn--primary:hover {
    background: #283542;
}

.cookie-consent__btn--ghost {
    border: 1px solid #c5cdd6;
    background: #fff;
    color: #1c2630;
}

.cookie-consent__btn--ghost:hover {
    background: #f4f6f8;
}

.cookie-consent__panel {
    position: relative;
    z-index: 102;
    display: flex;
    width: 100%;
    max-height: min(85vh, 640px);
    flex-direction: column;
    border-top: 1px solid rgba(197, 205, 214, 0.9);
    background: #fff;
    box-shadow: 0 -16px 48px rgba(18, 26, 34, 0.16);
    animation: cookie-slide-up 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cookie-consent__panel-handle {
    margin: 0.75rem auto 0;
    height: 0.25rem;
    width: 2.5rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: #9aa8b5;
}

@media (min-width: 640px) {
    .cookie-consent__panel-handle {
        display: none;
    }
}

.cookie-consent__panel-scroll {
    overflow-y: auto;
    padding: 1rem 1rem;
}

@media (min-width: 640px) {
    .cookie-consent__panel-scroll {
        padding: 1.25rem 1.5rem;
    }
}

.cookie-consent__panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

@media (min-width: 640px) {
    .cookie-consent__panel-head {
        margin-bottom: 1.5rem;
    }
}

.cookie-consent__panel-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #1c2630;
}

.cookie-consent__panel-lead {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: #354656;
}

.cookie-consent__close {
    flex-shrink: 0;
    border: none;
    border-radius: 0.5rem;
    padding: 0.5rem;
    background: transparent;
    color: #4a5d70;
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.cookie-consent__close:hover {
    background: #e8ecf0;
    color: #1c2630;
}

.cookie-consent__categories {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cookie-consent__category {
    border-radius: 0.75rem;
    border: 1px solid #c5cdd6;
    background: rgba(244, 246, 248, 0.8);
    padding: 1rem;
}

.cookie-consent__category-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-consent__category-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #1c2630;
}

.cookie-consent__category-desc {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    line-height: 1.625;
    color: #354656;
}

.cookie-consent__category-meta {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: #4a5d70;
}

.cookie-consent__always {
    flex-shrink: 0;
    border-radius: 9999px;
    background: #c5cdd6;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #283542;
}

.cookie-consent__switch {
    position: relative;
    display: inline-flex;
    height: 1.75rem;
    width: 3rem;
    flex-shrink: 0;
    cursor: pointer;
    align-items: center;
}

.cookie-consent__switch-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cookie-consent__switch-track {
    position: absolute;
    inset: 0;
    border-radius: 9999px;
    background: #9aa8b5;
    transition: background-color 0.2s;
}

.cookie-consent__switch-track::after {
    content: '';
    position: absolute;
    left: 0.125rem;
    top: 0.125rem;
    height: 1.5rem;
    width: 1.5rem;
    border-radius: 9999px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
}

.cookie-consent__switch-input:checked + .cookie-consent__switch-track {
    background: #f59e0b;
}

.cookie-consent__switch-input:checked + .cookie-consent__switch-track::after {
    transform: translateX(1.25rem);
}

.cookie-consent__switch-input:focus-visible + .cookie-consent__switch-track {
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.5);
}

.cookie-consent__panel-footer {
    display: flex;
    flex-shrink: 0;
    flex-direction: column;
    gap: 0.5rem;
    border-top: 1px solid rgba(197, 205, 214, 0.8);
    background: rgba(244, 246, 248, 0.9);
    padding: 1rem;
}

@media (min-width: 640px) {
    .cookie-consent__panel-footer {
        flex-direction: row;
        justify-content: flex-end;
        padding: 1rem 1.5rem;
    }
}

html.cookie-consent-panel-open {
    overflow: hidden;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
