/* The component reserves its measured height below the footer; there is no modal backdrop. */
.guest-shell { padding-bottom: var(--s2c-cookie-space, 0px); }
html { scroll-padding-bottom: var(--s2c-cookie-space, 0px); }

.cookie-notice {
    display: block;
    position: fixed;
    z-index: 1200;
    inset: auto 16px max(16px, env(safe-area-inset-bottom)) 16px;
    color: var(--s2c-graphite, #404b5a);
    font-family: Inter, "Segoe UI", sans-serif;
}

.cookie-notice-inner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 24px 36px;
    width: min(1240px, 100%);
    max-height: 60vh;
    max-height: 60dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0 auto;
    padding: 24px 28px;
    border: 1px solid var(--s2c-border, #dce3ec);
    border-top: 3px solid var(--s2c-blue, #1677ff);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 40px rgb(13 27 42 / 16%);
}

.cookie-notice-copy {
    min-width: 0;
    overflow-wrap: anywhere;
}

.cookie-notice-copy h2 {
    margin: 0 0 8px;
    color: var(--s2c-navy, #0d1b2a);
    font-family: "Space Grotesk", Inter, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -.35px;
}

.cookie-notice-copy p {
    max-width: 90ch;
    margin: 0;
    font-size: 13px;
    line-height: 1.75;
}

.cookie-notice-details {
    margin-top: 8px;
    font-size: 13px;
}

.cookie-notice-copy .cookie-notice-memory {
    margin-top: 4px;
    color: var(--s2c-muted, #64748b);
    font-size: 11px;
}

.cookie-notice-details summary {
    width: fit-content;
    min-height: 44px;
    padding: 10px 0;
    color: var(--s2c-action, #0968ee);
    font-weight: 600;
    line-height: 24px;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
}

.cookie-notice-details summary::marker {
    color: var(--s2c-action, #0968ee);
}

.cookie-notice-details[open] > p {
    padding: 12px 16px;
    border-left: 3px solid var(--s2c-teal, #00b3b3);
    border-radius: 0 6px 6px 0;
    background: var(--s2c-tint, #eef5ff);
}

.cookie-notice-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    align-self: center;
    justify-self: end;
    gap: 4px;
    width: 200px;
    max-width: 100%;
    min-width: 0;
}

.cookie-notice-dismiss {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    min-height: 44px;
    padding: 10px 20px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #fff;
    background: var(--s2c-action, #0968ee);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
    text-align: center;
    cursor: pointer;
}

.cookie-notice-dismiss:hover {
    background: #0758cb;
}

.cookie-notice-dismiss:active {
    background: #064cae;
}

.cookie-notice-actions a,
.cookie-notice-reopen {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    color: var(--s2c-action, #0968ee);
    background: transparent;
    font: inherit;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.7;
    text-align: left;
    text-decoration: underline;
    text-underline-offset: 4px;
    text-decoration-thickness: 1px;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.cookie-notice-reopen {
    font-size: inherit;
}

.cookie-notice-actions a {
    justify-content: center;
    text-align: center;
}

.cookie-notice-actions a:hover,
.cookie-notice-details summary:hover,
.cookie-notice-reopen:hover {
    color: var(--s2c-navy, #0d1b2a);
}

.cookie-notice a:focus-visible,
.cookie-notice button:focus-visible,
.cookie-notice summary:focus-visible,
.cookie-notice-reopen:focus-visible {
    outline: 3px solid var(--s2c-blue, #1677ff);
    outline-offset: 4px;
}

.cookie-notice[hidden],
.cookie-notice [hidden],
.cookie-notice-reopen[hidden] {
    display: none !important;
}

@media (max-width: 800px) {
    .cookie-notice-inner { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 22px; }
    .cookie-notice-actions { justify-self: center; width: 100%; }
}

@media (max-width: 600px) {
    .cookie-notice { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); }
    .cookie-notice-inner { padding: 20px 18px; }
    .cookie-notice-dismiss { width: 100%; max-width: 320px; }
}

@media (max-width: 370px) {
    .cookie-notice-inner { padding-inline: 16px; }
}

@media (forced-colors: active) {
    .cookie-notice-inner { border-color: CanvasText; box-shadow: none; }
    .cookie-notice-dismiss { border-color: ButtonText; }
    .cookie-notice-details[open] > p { border-color: CanvasText; }
}
