/* Custom cookie banner (Figma 11.1 Miscellaneous / Cookie Alert). Consent itself stays with Cookiebot. */

/* Our banner takes over once its script has started; Cookiebot's own dialog stays as a fallback. */
.nijushi-cb-ready #CybotCookiebotDialog,
.nijushi-cb-ready #CybotCookiebotDialogBodyUnderlay {
    display: none !important;
}

.ncb {
    position: fixed;
    right: 64px;
    bottom: 88px;
    z-index: 100000;
    display: flex;
    flex-direction: column;
    width: 676px;
    max-height: min(668px, calc(100dvh - 176px));
    overflow: hidden;
    /* Figma strokes take no layout space, so the 1px frame is drawn as an outline. */
    outline: 1px solid #303030;
    outline-offset: -1px;
    background: #0a0a0a;
    box-shadow: -12px -24px 120px 0 rgba(255, 255, 255, 0.1), -36px -72px 72px 0 rgba(0, 0, 0, 0.1), 84px 168px 240px 0 rgba(255, 255, 255, 0.1), -36px 72px 72px 0 rgba(10, 10, 10, 0.2);
    font-family: 'Funnel Sans', sans-serif;
    text-align: left;
}

.ncb[hidden] {
    display: none;
}

.ncb *,
.ncb *::before,
.ncb *::after {
    box-sizing: border-box;
}

.ncb-container {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 32px;
    min-height: 0;
    padding: 32px 24px;
    overflow-x: clip;
    overflow-y: auto;
    background: #0a0a0a;
    scrollbar-width: thin;
    scrollbar-color: #303030 transparent;
}

.ncb-intro {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ncb .ncb-title {
    margin: 0;
    font-family: 'Funnel Display', sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 24px;
    letter-spacing: -0.54px;
    text-transform: none;
    color: #fff;
}

.ncb .ncb-text {
    margin: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 16px;
    letter-spacing: -0.24px;
    color: #f1f1f1;
    word-break: break-word;
}

.ncb-options {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.ncb-options[hidden] {
    display: none;
}

.ncb-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ncb-option {
    display: flex;
    align-items: center;
    gap: 16px;
}

.ncb .ncb-label {
    flex: 1 1 0;
    min-width: 1px;
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    line-height: 20px;
    letter-spacing: -0.28px;
    color: #fff;
    cursor: pointer;
}

.ncb-sep {
    display: block;
    width: 100%;
    height: 1px;
    max-width: none;
}

/* Toggle (Form Elements/Toggle, size S): on = brand track with dark handle right, off = outlined track with small grey handle left. */
.ncb .ncb-toggle {
    position: relative;
    flex: 0 0 auto;
    width: 46px;
    height: 24px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.ncb-track {
    position: absolute;
    inset: 0;
    border: 1px solid #303030;
    background: #1b1b1b;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.ncb-handle {
    position: absolute;
    top: 6px;
    left: 6px;
    width: 12px;
    height: 12px;
    background: #ababab;
    box-shadow: 0 0 1px 0 rgba(10, 10, 10, 0.08), 0 0.5px 2px 0 rgba(10, 10, 10, 0.16);
    transition: all 0.15s ease;
}

.ncb-handle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    border-radius: 100px;
    background: transparent;
    transform: translate(-50%, -50%);
    transition: background-color 0.15s ease;
}

.ncb-toggle:hover .ncb-handle::before,
.ncb-toggle:focus-visible .ncb-handle::before {
    background: rgba(255, 255, 255, 0.05);
}

.ncb-toggle:focus-visible {
    outline: none;
}

.ncb-toggle[aria-checked="true"] .ncb-track {
    border-color: #e29c11;
    background: #e29c11;
}

.ncb-toggle[aria-checked="true"] .ncb-handle {
    top: 2px;
    left: 24px;
    width: 20px;
    height: 20px;
    background: #0a0a0a;
}

.ncb-toggle[aria-disabled="true"] {
    cursor: default;
}

.ncb-toggle[aria-disabled="true"] .ncb-handle::before {
    background: transparent;
}

.ncb .ncb-chevron {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}

.ncb-chevron img {
    display: block;
    transition: transform 0.15s ease;
}

.ncb-chevron[aria-expanded="false"] img {
    transform: rotate(180deg);
}

.ncb-chevron:focus-visible,
.ncb-btn:focus-visible,
.ncb-link:focus-visible {
    outline: 2px solid #e29c11;
    outline-offset: 2px;
}

.ncb-desc[hidden] {
    display: none;
}

.ncb-footer {
    display: flex;
    flex: 0 0 auto;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: space-between;
    gap: 16px 0;
    padding: 24px;
    background: #0a0a0a;
}

.ncb .ncb-link,
.ncb .ncb-btn {
    font-family: 'Funnel Sans', sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    letter-spacing: -0.24px;
    text-align: center;
    text-transform: uppercase;
    white-space: nowrap;
}

.ncb .ncb-link {
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    color: #f1f1f1;
    cursor: pointer;
}

.ncb-buttons {
    display: flex;
    flex: 1 0 0;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    min-width: 304px;
}

.ncb .ncb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    min-height: 0;
    margin: 0;
    padding: 10px 20px;
    border-radius: 0;
    box-shadow: none;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.ncb .ncb-btn-secondary {
    padding: 10px 19px;
    border: 1px solid #f8f8f8;
    background: #000;
    color: #fff;
}

.ncb .ncb-btn-secondary:hover {
    background: #1b1b1b;
    color: #fff;
}

.ncb .ncb-btn-primary {
    padding: 8px 18px;
    border: 2px solid transparent;
    background: #f8f8f8;
    color: #0a0a0a;
}

.ncb .ncb-btn-primary:hover {
    background: #e2e2e2;
    color: #0a0a0a;
}

/* Tablet frame (834): full-width panel, 16px padding, smaller title. */
@media (max-width: 1024px) {
    .ncb {
        right: 32px;
        bottom: 80px;
        left: 32px;
        width: auto;
        max-height: min(668px, calc(100dvh - 160px));
    }
    .ncb-container {
        padding: 32px 16px;
    }
    .ncb .ncb-title {
        font-size: 16px;
        letter-spacing: -0.32px;
    }
    .ncb-footer {
        padding: 16px;
    }
}

/* Mobile frame (393): 12px padding, buttons share the row. */
@media (max-width: 768px) {
    .ncb {
        right: 24px;
        bottom: 72px;
        left: 24px;
        max-height: min(668px, calc(100dvh - 144px));
    }
    .ncb-container {
        padding: 32px 12px;
    }
    .ncb-footer {
        padding: 12px;
    }
    .ncb-buttons {
        min-width: 100%;
    }
    .ncb-buttons .ncb-btn {
        flex: 1 0 0;
        min-width: 1px;
    }
}

@media (max-width: 360px) {
    .ncb {
        right: 12px;
        left: 12px;
    }
    .ncb-buttons {
        min-width: 0;
    }
}
