/*
 * Public Cross Checker radius system
 *
 * Surfaces: 10px
 * Controls: 8px
 * Nested elements: 6px
 */

body:is(.shell-guest, .shell-guest-nav) {
    --public-radius-surface: 10px;
    --public-radius-control: 8px;
    --public-radius-inner: 6px;
    --public-canvas-clean: #f7f8fc;
    --public-scroll-track: rgba(226, 232, 240, 0.78);
    --public-scroll-thumb: rgba(100, 116, 139, 0.34);

    --radius: var(--public-radius-surface);
    --radius-2xs: var(--public-radius-inner);
    --radius-xs: var(--public-radius-inner);
    --radius-sm: var(--public-radius-control);
    --radius-md: var(--public-radius-control);
    --radius-lg: var(--public-radius-surface);
    --radius-xl: var(--public-radius-surface);
    --clean-radius-xl: var(--public-radius-surface);
    --clean-radius-lg: var(--public-radius-surface);
    --clean-radius-md: var(--public-radius-control);
    --clean-radius-sm: var(--public-radius-inner);
    --ui-radius-xs: var(--public-radius-inner);
    --ui-radius-sm: var(--public-radius-control);
    --ui-radius-md: var(--public-radius-control);
    --ui-radius-lg: var(--public-radius-surface);
    --ui-radius-xl: var(--public-radius-surface);
}

/* Public/auth pages share the same neutral page chrome as the app. */
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) {
    background: var(--public-canvas-clean) !important;
    scrollbar-color: var(--public-scroll-thumb) var(--public-scroll-track) !important;
}

html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .ambient-bg {
    display: none !important;
}

html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav),
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) * {
    scrollbar-color: var(--public-scroll-thumb) var(--public-scroll-track) !important;
}

html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav)::-webkit-scrollbar-track,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) *::-webkit-scrollbar-track {
    background: var(--public-scroll-track) !important;
}

html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav)::-webkit-scrollbar-thumb,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) *::-webkit-scrollbar-thumb {
    border-color: var(--public-scroll-track) !important;
    background: var(--public-scroll-thumb) !important;
}

html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav)::-webkit-scrollbar-thumb:hover,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) *::-webkit-scrollbar-thumb:hover {
    background: rgba(83, 92, 226, 0.42) !important;
}

/* Main public surfaces. */
html body:is(.shell-guest, .shell-guest-nav) :is(
    .topbar,
    .panel,
    .auth-panel,
    .legal-page,
    .page-loader-box,
    .cc-hero,
    .cc-dashboard-shell,
    .cc-number-band,
    .cc-section,
    .cc-opportunity,
    .cc-trust-card,
    .cc-support-card,
    .cc-final-cta,
    .cc-action-console,
    .cc-hero-photo-frame
) {
    border-radius: var(--public-radius-surface) !important;
}

html body:is(.shell-guest, .shell-guest-nav) .cc-home-v3 > .cc-hero {
    border-radius: 0 !important;
}

html body:is(.shell-guest, .shell-guest-nav) :is(
    [class$="-panel"],
    [class*="-panel "],
    [class$="-shell"],
    [class*="-shell "]
) {
    border-radius: var(--public-radius-surface) !important;
}

/* Navigation, form fields and interactive controls. */
html body:is(.shell-guest, .shell-guest-nav) :is(
    button,
    .btn,
    .brand,
    .landing-primary-nav a,
    .top-nav-guest a,
    .topbar-cta,
    .back-link,
    .legal-back,
    details > summary
) {
    border-radius: var(--public-radius-control) !important;
}

html body:is(.shell-guest, .shell-guest-nav) :is(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
    select,
    textarea
) {
    border-radius: var(--public-radius-control) !important;
}

/* Cards and supporting blocks inside a surface. */
html body:is(.shell-guest, .shell-guest-nav) :is(
    [class$="-card"],
    [class*="-card "],
    .alert,
    .captcha-box,
    .auth-challenge,
    .auth-demo-card,
    .password-policy-box,
    .auth-legal-consent,
    .passkey-login-block,
    .compact-disclosure,
    .app-error-card,
    .cc-product-window,
    .cc-product-kpis article,
    .cc-product-row,
    .cc-floating-row,
    .cc-action-row,
    .cc-step,
    .cc-faq-item,
    .cc-icon
) {
    border-radius: var(--public-radius-inner) !important;
}

html body:is(.shell-guest, .shell-guest-nav) input[type="checkbox"] {
    border-radius: 4px !important;
}

/* Circular elements and semantic status pills retain their meaning. */
html body:is(.shell-guest, .shell-guest-nav) :is(
    input[type="radio"],
    .orb,
    .page-loader-spinner,
    .cc-step-number,
    .cc-proof-mark,
    .status-dot,
    .app-error-card__icon
) {
    border-radius: 50% !important;
}

html body:is(.shell-guest, .shell-guest-nav) :is(
    .badge,
    .status-chip,
    .tag,
    .pill
) {
    border-radius: 999px !important;
}

html:not([data-theme="dark"]) body.shell-guest-nav .cc-home-v2 .cc-dashboard-shell,
html[data-theme="dark"] body.shell-guest-nav .cc-home-v2 .cc-dashboard-shell {
    border-radius: var(--public-radius-surface) !important;
}

html:not([data-theme="dark"]) body.shell-guest-nav .cc-home-v2 :is(
    .cc-step,
    .cc-step-index,
    .telegram-link-icon,
    .cc-faq-mark
),
html[data-theme="dark"] body.shell-guest-nav .cc-home-v2 :is(
    .cc-step,
    .cc-step-index,
    .telegram-link-icon,
    .cc-faq-mark
) {
    border-radius: var(--public-radius-inner) !important;
}

@media (max-width: 640px) {
    html body:is(.shell-guest, .shell-guest-nav) :is(
        .topbar,
        .panel,
        .auth-panel,
        .legal-page,
        .cc-hero,
        .cc-section,
        .cc-opportunity,
        .cc-trust-card,
        .cc-support-card,
        .cc-final-cta,
        .cc-number-band
    ) {
        border-radius: var(--public-radius-surface) !important;
    }
}

/* v1.475.6 - keep public canvas perfectly white */
html:not([data-theme="dark"]):has(body.shell-guest),
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav),
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .app-shell,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .app-content,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .page,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .cc-home,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .cc-home-v2,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .cc-home-v3 {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
}

html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav)::before,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav)::after,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .app-shell::before,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .app-shell::after,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .app-content::before,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .app-content::after,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .page::before,
html:not([data-theme="dark"]) body:is(.shell-guest, .shell-guest-nav) .page::after {
    content: none !important;
    display: none !important;
    background: none !important;
    background-image: none !important;
}
