.kosmo-cookie {
    --cookie-accent: #ef493f;
    --cookie-accent-hover: #ff5a50;
    --cookie-background: rgba(6, 16, 30, 0.97);
    --cookie-panel: #0b192a;
    --cookie-border: rgba(130, 177, 218, 0.25);
    --cookie-text: #f6f1e8;
    --cookie-muted: #9fb0c4;
}

.kosmo-cookie__banner[hidden],
.kosmo-cookie__modal[hidden] {
    display: none !important;
}

.kosmo-cookie__banner {
    position: fixed;
    z-index: 2147483000;
    left: clamp(12px, 2vw, 32px);
    bottom: clamp(12px, 2vw, 32px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: center;
    width: min(780px, calc(100vw - 24px));
    padding: 24px;
    border: 1px solid var(--cookie-border);
    border-radius: 24px;
    background:
        linear-gradient(
            135deg,
            rgba(11, 25, 42, 0.98),
            var(--cookie-background)
        );
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.55),
        0 0 32px rgba(239, 73, 63, 0.08);
    color: var(--cookie-text);
    backdrop-filter: blur(16px);
}

.kosmo-cookie__eyebrow {
    margin: 0 0 8px;
    color: var(--cookie-accent);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.14em;
}

.kosmo-cookie h2,
.kosmo-cookie h3,
.kosmo-cookie p {
    margin-top: 0;
}

.kosmo-cookie__banner h2 {
    margin-bottom: 10px;
    color: var(--cookie-text);
    font-size: clamp(20px, 2vw, 26px);
    line-height: 1.15;
}

.kosmo-cookie__text {
    margin-bottom: 0;
    color: var(--cookie-muted);
    font-size: 15px;
    line-height: 1.55;
}

.kosmo-cookie__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.kosmo-cookie__button {
    min-height: 46px;
    padding: 11px 18px;
    border: 1px solid var(--cookie-border);
    border-radius: 14px;
    background: transparent;
    color: var(--cookie-text);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease;
}

.kosmo-cookie__button:hover {
    transform: translateY(-1px);
    border-color: rgba(239, 73, 63, 0.75);
}

.kosmo-cookie__button:focus-visible,
.kosmo-cookie__close:focus-visible,
.kosmo-cookie__footer-button:focus-visible {
    outline: 3px solid rgba(239, 73, 63, 0.4);
    outline-offset: 3px;
}

.kosmo-cookie__button--primary {
    border-color: var(--cookie-accent);
    background: var(--cookie-accent);
    color: #ffffff;
}

.kosmo-cookie__button--primary:hover {
    border-color: var(--cookie-accent-hover);
    background: var(--cookie-accent-hover);
}

.kosmo-cookie__modal {
    position: fixed;
    z-index: 2147483100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 18px;
}

.kosmo-cookie__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 7, 16, 0.82);
    backdrop-filter: blur(8px);
}

.kosmo-cookie__dialog {
    position: relative;
    width: min(680px, 100%);
    max-height: min(760px, calc(100vh - 36px));
    overflow-y: auto;
    padding: clamp(24px, 4vw, 38px);
    border: 1px solid var(--cookie-border);
    border-radius: 26px;
    background: var(--cookie-panel);
    box-shadow: 0 32px 100px rgba(0, 0, 0, 0.65);
    color: var(--cookie-text);
}

.kosmo-cookie__dialog h2 {
    margin-bottom: 12px;
    padding-right: 42px;
    font-size: clamp(24px, 4vw, 34px);
    line-height: 1.12;
}

.kosmo-cookie__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border: 1px solid var(--cookie-border);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
}

.kosmo-cookie__category-list {
    display: grid;
    gap: 12px;
    margin: 24px 0;
}

.kosmo-cookie__category {
    padding: 18px;
    border: 1px solid var(--cookie-border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.025);
}

.kosmo-cookie__category-heading {
    display: flex;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.kosmo-cookie__category h3 {
    margin-bottom: 0;
    color: var(--cookie-text);
    font-size: 18px;
}

.kosmo-cookie__status {
    flex: 0 0 auto;
    padding: 6px 9px;
    border-radius: 999px;
    background: rgba(239, 73, 63, 0.14);
    color: #ff8b83;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.04em;
}

.kosmo-cookie__status--off {
    background: rgba(159, 176, 196, 0.1);
    color: var(--cookie-muted);
}

.kosmo-cookie__category p,
.kosmo-cookie__footnote {
    margin-bottom: 0;
    color: var(--cookie-muted);
    font-size: 14px;
    line-height: 1.55;
}

.kosmo-cookie__dialog-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.kosmo-cookie__footer-row {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    margin-top: 8px;
    text-align: left;
}

.kosmo-cookie__footer-button {
    padding: 0;
    border: 0;
    border-bottom: 1px dashed currentColor;
    background: transparent;
    color: #9fb0c4;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.kosmo-cookie__footer-button:hover {
    color: var(--cookie-accent);
}

body.kosmo-cookie-modal-open {
    overflow: hidden;
}

@media (max-width: 720px) {
    .kosmo-cookie__banner {
        grid-template-columns: 1fr;
        gap: 18px;
        padding: 20px;
        border-radius: 20px;
    }

    .kosmo-cookie__actions,
    .kosmo-cookie__button {
        width: 100%;
    }

    .kosmo-cookie__actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .kosmo-cookie__dialog {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .kosmo-cookie__category-heading {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (prefers-reduced-motion: reduce) {
    .kosmo-cookie__button {
        transition: none;
    }
}
