@use '../abstracts/cds-vars' as vars;
@use '../abstracts/cds-config' as config;
@use '../abstracts/cds-mixins' as mixins;

:root {
    interpolate-size: allow-keywords;
}

/*html {
    font-size: calc(100% * config.$config-size-factor);
}*/

*,
*::after,
*::before {
    box-sizing: border-box;
    caret-color: var(--cds-color-accent-primary-main);
    font-variant-numeric: tabular-nums;
    font-size: inherit;
    accent-color: var(--cds-color-accent-primary-main);
}

body {
    @include mixins.cds-paragraph-m;
    color: var(--cds-color-text-default);
    background-color: var(--cds-color-background-default);
    overflow-x: hidden;
    font-size: calc(100% * config.$config-size-factor);
}

strong,
b {
    font-family: config.$config-font-family-700;
    font-weight: 700;
}

code {
    @include mixins.cds-code-m;
    color: var(--cds-color-text-default);
}

a {
    cursor: pointer;
    text-decoration: none;
}

h1 { font-size: vars.$cds-size-300; }
h2 { font-size: vars.$cds-size-250; }
h3 { font-size: vars.$cds-size-200; }
h4 { font-size: vars.$cds-size-150; }
h5 { font-size: vars.$cds-size-125; }
h6 { font-size: vars.$cds-size-100; }

hr {
    width: 100%;
    border: 0;
    border-top: 1px solid var(--cds-color-border-default);
}

input[type=checkbox],
input[type=radio] {
    cursor: pointer;
    height: 1rem;
    width: 1rem;
    transform: translateY(0.125rem);
    margin-right: 0.25rem;
}

::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: grayscale(100%);
}

:focus-visible {
    outline: 3px solid var(--cds-color-focus-outline) !important;
    outline-offset: 1px !important;
}

:disabled, .is-disabled {
    outline: none !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
    user-select: none !important;
}

::selection {
    background-color: var(--cds-color-background-inverse);
    color: var(--cds-color-text-inverse);
}

::-webkit-scrollbar {
    width: 8px;
    height: 4px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--cds-color-border-default);
    border-radius: 999rem;

    &:hover {
        background-color: var(--cds-color-border-default--hover);
    }
}

::-webkit-scrollbar-track {
    background-color: transparent;
    border-radius: 10px;
}

.cds-ico-spinner-s, .cds-ph-spinner-s {
    &:before {
        animation: rotation 1s infinite ease-in-out;
    }
}

.cds-ico-spinner-s-double, .cds-ph-spinner-s,
.cds-ph-spinner-s-double {
    &:before {
        animation: rotation 1s infinite linear;
    }
}