/* Core theme file for BOS UI */

:root {
    --bosui-theme-box-shadow-1: var(--ita-shadows-1);
    --bosui-theme-border-radius-1: var(--ita-radii-1);
    --bosui-theme-border-radius-2: var(--ita-radii-2);
    --bosui-theme-border-radius-3: var(--ita-radii-3);
    --bosui-theme-border-radius-4: var(--ita-radii-4);
    --bosui-theme-border-radius-5: var(--ita-radii-5);
}
/* Reset */
/* <details> défaut style on iOS */
details > summary::-webkit-details-marker {
    display: none;
}
/* <button> and <select> default style on iOS */
select, button {
    color: black
}
/* Opacity disabled input on iOS */
input:disabled {
    opacity: 1;
}
/* input type search reset */
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button,
input[type="search"]::-webkit-search-results-button,
input[type="search"]::-webkit-search-results-decoration {
    -webkit-appearance:none;
}
*,
*::before,
*::after {
    box-sizing: border-box;
    accent-color: var(--ita-colors-primary-500);
}
/* SMOOTH PAGE TRANSITION (CHROME AND SAFARI ONLY) */
@view-transition {
    navigation: auto;
}
html {
    background-color: var(--ita-colors-neutral-400);
    scrollbar-color: var(--ita-colors-primary-500) transparent;
    scrollbar-width: 10px;
    overscroll-behavior: none;
}
body {
    font-optical-sizing: auto;
    margin: 0;
    min-height: 100vh;
    font-family: var(--bosui-core-font-family-lead, var(--bosui-core-font-family-lead-fallback));
    font-weight: var(--bosui-core-default-font-weight, 300);
    font-size: var(--ita-fontSizes-5);
    color: var(--ita-colors-neutral-800);
    background:
        fixed linear-gradient(-90deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 100%),
        fixed linear-gradient(90deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0) 20%, rgba(0,0,0,0) 100%),
        top 0 left 0 linear-gradient(rgba(0,0,0,0.1) 0vh, rgba(0,0,0,0) 20vh, rgba(0,0,0,0) 100%),
        bottom 0 left 0 linear-gradient(0deg, rgba(0,0,0,0.1) 0vh, rgba(0,0,0,0) 20vh, rgba(0,0,0,0) 100%),
        /* fixed radial-gradient(ellipse, rgba(0,0,0,0) 0%, rgba(0,0,0,0) 80%, rgba(0,0,0,0.0) 100%), */
        0px 0px / 20px 20px radial-gradient(var(--ita-colors-neutral-500) 0.5px,var(--ita-colors-neutral-400) 1px);
}
a {
    --bosui-a-default-color: var(--bosui-flash-color, var(--ita-colors-primary-500));
    --bosui-contrast-color: oklch(from var(--bosui-a-default-color) round(1.21 - L) 0 0);
    color: var(--bosui-a-default-color);
    font-weight: 600;
    text-underline-offset: 0.2em;
    text-decoration-color: color-mix(in srgb, var(--bosui-a-default-color) 30%, var(--bosui-contrast-color) 70%);
    transition: color 300ms, text-decoration-color 300ms;
}
a:hover {
    color: color-mix(in srgb, var(--bosui-a-default-color) 90%, var(--bosui-contrast-color) 10%);
    text-decoration-color: color-mix(in srgb, var(--bosui-a-default-color) 80%, var(--bosui-contrast-color) 20%);
}
em {
    font-style: normal;
    font-weight: 500;
}
strong {
    font-weight: 700;
}
input,
button {
    font-family: var(--bosui-core-font-family-lead, var(--bosui-core-font-family-lead-fallback));
    cursor: pointer;
}
textarea {
    font-family: var(--bosui-core-font-family-lead, var(--bosui-core-font-family-lead-fallback));
}
button:disabled {
    opacity: 0.5;
    cursor: default;
}
/* HEADINGS */
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2em;
    margin-top: 2em;
    padding-bottom: 0.2em;
    border-bottom: 1px solid var(--ita-colors-neutral-500);
    color: var(--ita-colors-neutral-900);
}
h1 {
    font-size: var(--ita-fontSizes-10);
    font-weight: 700;
    letter-spacing: -0.04em;
    line-height: 1.2em;
    color: var(--ita-colors-neutral-900);
}
h2 {
    font-size: var(--ita-fontSizes-9);
    font-weight: 700;
    letter-spacing: -0.02em;
}
h3 {
    font-size: var(--ita-fontSizes-8);
    font-weight: 700;
    letter-spacing: -0.02em;
}
h4 {
    font-size: var(--ita-fontSizes-8);
    font-weight: 600;
    letter-spacing: -0.03em;
}
h5 {
    font-size: var(--ita-fontSizes-7);
    font-weight: 700;
    letter-spacing: -0.01em;
}
h6 {
    font-size: var(--ita-fontSizes-7);
    font-weight: 600;
    letter-spacing: -0.03em;
}

/* LISTS */
ol {
    padding-left: 1.6em;
}
ul {
    line-height: 1.6em;
    list-style: none;
    padding-left: 0;
}
ul li > *:last-child,
ol li > *:last-child {
    margin-bottom: 0;
}
ol {
    counter-reset: listItem;
    list-style: none;
}
ol > li {
    counter-increment: listItem;
}
ol > li,
ol ol > li {
    padding-top: 0.8em;
}
ol > li::before {
    content: counters(listItem, '.') '.';
    position: absolute;
    transform: translateX(calc(-100% - 0.6em)) translateY(-0.01em);
    font-weight: 700;
    color: var(--bosui-color, var(--ita-colors-primary-500));
    font-size: 1em;
    letter-spacing: -0.05em;
}
ul > li,
ul ul > li {
    border-left-width: 1px;
    border-left-style: dotted;
    position: relative;
    padding-left: 1.7em;
    padding-top: 0.5em;
    border-left-color: var(--ita-colors-neutral-500);
}
ul > li::before,
ul ul > li::before {
    content: '';
    position: absolute;
    top: 1.3em;
    left: 0;
    width: var(--ita-spacings-5);
    border-bottom-width: 1px;
    border-bottom-style: dotted;
    border-bottom-color: var(--ita-colors-neutral-500);
}
ul > li::after,
ul ul > li::after {
    content: '';
    position: absolute;
    top: calc(1.33em - var(--ita-spacings-3) / 2);
    left: var(--ita-spacings-4);
    width: var(--ita-spacings-3);
    height: var(--ita-spacings-3);
    border-radius: 100%;
    background-color: var(--bosui-flash-color, var(--ita-colors-primary-500));
}
/* CODE */
code:not([class^="language"]) {
    --bosui-code-default-color: var(--bosui-flash-color, var(--bosui-table-color, var(--ita-colors-primary-200)));
    --bosui-contrast-color: oklch(from var(--bosui-color, var(--bosui-code-default-color)) round(1.21 - L) 0 0);
    font-size: 0.8em;
    color: var(--bosui-contrast-color);
    background-color: var(--bosui-color, var(--bosui-code-default-color));
    outline: 3px solid var(--bosui-color, var(--bosui-code-default-color));
    border-radius: 2px;
    margin-left: 0.2em;
    margin-right: 0.2em;
    padding-left: 0.2em;
    padding-right: 0.2em;
}
/* INLINE TAGS */
*::target-text {
    background-color: aqua;
}
*::selection {
    background-color: var(--ita-colors-primary-500);
    color: var(--ita-colors-primary-100);
}
del {
    --bosui-color: var(--ita-colors-danger-500);
}
ins {
    --bosui-color: var(--ita-colors-success-500);
}  
del,
ins {
    text-decoration: none;
    background-color: color-mix(in srgb, var(--bosui-color) 20%, transparent 80%);
    color: color-mix(in srgb, var(--bosui-color) 50%, black 50%);
    border-radius: 3px;
    padding-left: 0.5em;
    padding-right: 0.5em;
}
del::before,
ins::before {
    font-family: monospace;
    font-weight: 400;
    padding-right: 0.5em;
}
del::before {
    content: '- ';
}
ins::before {
    content: '+ ';
}
/* mark {
    background-color: var(--ita-colors-success-100);
    color: var(--ita-colors-success-900);
} */
s,
strike {
    text-decoration-color: var(--ita-colors-danger-500);
}
samp {
    color: var(--ita-colors-neutral-100);
    background: var(--ita-colors-neutral-800);
    font-size: 0.8em;
    padding-left: 0.3em;
    padding-right: 0.3em;
    border-radius: 3px;
}
q {
    --bosui-q-default-color: var(--ita-colors-primary-500);
    --bosui-contrast-color: oklch(from var(--bosui-color, var(--bosui-q-default-color)) round(1.21 - L) 0 0);
    background-color: color-mix(in srgb, var(--bosui-color, var(--bosui-q-default-color)) 5%, transparent 95%);
    color: color-mix(in srgb, var(--bosui-color, var(--bosui-q-default-color)) 90%, var(--bosui-contrast-color) 10%);
    font-style: italic;
    padding-left: 0.3em;
    padding-right: 0.3em;
    border-radius: 3px;
}
kbd {
    background-color: var(--ita-colors-neutral-400);
    font-size: 0.8em;
    letter-spacing: -0.02em;
    padding-left: 0.3em;
    padding-right: 0.3em;
    border-radius: 3px;
}
time {
    font-weight: 500;
}
/* TABLES */
table {
    --bosui-table-color: var(--ita-colors-neutral-600);
    display: table;
    width: 100%;
    border-collapse: collapse;
    font-size: 1em;
    color: color-mix(in srgb, var(--bosui-table-color) 50%, black 50%);
}
caption {
    padding: 0.4em 0;
    text-align: left;
    font-weight: 600;
    line-height: 1.3em;
    border-color: color-mix(in srgb, var(--bosui-table-color) 30%, transparent 70%);
}
table th {
    text-align: left;
    font-weight: 600;
    line-height: 1.3em;
    border-color: color-mix(in srgb, var(--bosui-table-color) 30%, transparent 70%);
}
table td {
    border-width: 1px 0;
    border-style: solid;
    line-height: 1.3em;
    border-color: color-mix(in srgb, var(--bosui-table-color) 30%, transparent 70%);
}
table td {
    padding: 0.6em 2em 0.6em 0;
}
table td:last-child {
    padding-right: 0;
}
table th {
    padding: 0.6em 2em 0.6em 0;
}
table th:last-child {
    padding-right: 0;
}
table[data-bosui-valign="top"] td {
    vertical-align: top;
}
table[data-bosui-theme="bordered"] th,
table[data-bosui-theme="bordered"] td,
table[data-bosui-theme="bordered"] caption,
table[data-bosui-theme="striped-bordered"] th,
table[data-bosui-theme="striped-bordered"] td,
table[data-bosui-theme="striped-bordered"] caption {
    border-width: 1px;
    border-style: solid;
}
table[data-bosui-theme="striped"] th,
table[data-bosui-theme="bordered"] th,
table[data-bosui-theme="striped"] td,
table[data-bosui-theme="striped"] caption,
table[data-bosui-theme="bordered"] td,
table[data-bosui-theme="bordered"] caption,
table[data-bosui-theme="striped-bordered"] th,
table[data-bosui-theme="striped-bordered"] td,
table[data-bosui-theme="striped-bordered"] caption {
    padding: 0.4em 1em;
}
table[data-bosui-theme="striped"] tr:nth-child(odd) td,
table[data-bosui-theme="striped-bordered"] tr:nth-child(odd) td {
    background-color: color-mix(in srgb, var(--bosui-table-color) 10%, transparent 90%);
}
table[data-bosui-theme] caption {
    border-bottom-width: 0;
}
/* Table markdown workaround */
table td *:first-child {
    margin-top: 0;
}
table td *:last-child {
    margin-bottom: 0;
}
table tr:not(:has(th)):hover {
    background-color: color-mix(in srgb, var(--bosui-table-color) 5%, transparent 95%);
}
table code {
    --bosui-table-color: var(--ita-colors-neutral-300);
}
/* QUOTES */
blockquote {
    --bosui-blockquote-default-color: var(--ita-colors-primary-500);
    --bosui-contrast-color: oklch(from var(--bosui-color, var(--bosui-blockquote-default-color)) round(1.21 - L) 0 0);

    position: relative;
    margin-left: 0;
    margin-right: 0;
    padding: 2em 4em;
    font-style: italic;
    background-color: color-mix(in srgb, var(--bosui-color, var(--bosui-blockquote-default-color)) 5%, transparent 95%);
    color: color-mix(in srgb, var(--bosui-color, var(--bosui-blockquote-default-color)) 95%, var(--bosui-contrast-color) 5%);
    border-radius: var(--bosui-theme-border-radius-2);
}
blockquote > *:first-child {
    margin-top: 0;
}
blockquote > *:last-child {
    margin-bottom: 0;
}
blockquote::before {
    content: "❝";
    position: absolute;
    left: var(--ita-spacings-4);
    font-size: 1em;
    line-height: 0;
    color: color-mix(in srgb, var(--bosui-color) 90%, transparent 10%);
    font-size: 3em;
}
/* DEFINITION LISTS */
dl dt {
    margin-bottom: 0.2em;
    letter-spacing: -0.04em;
    color: var(--bosui-color, var(--ita-colors-primary-500));
    font-weight: 500;
    letter-spacing: -0.01em;
}
dl dd {
    margin-left: var(--ita-spacings-2);
    margin-bottom: 1em;
    line-height: 1.6em;
    padding-left: var(--ita-spacings-5);
    border-left-width: 1px;
    border-left-style: dotted;
    border-left-color: var(--bosui-color, var(--ita-colors-primary-500));
}

/* HORIZONTAL RULE */
hr {
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom-width: 1px;
    border-bottom-style: solid;
    border-bottom-color: var(--bosui-color, var(--ita-colors-neutral-500));
    margin-top: 3em;
    margin-bottom: 3em;
}

/* IMAGES */
img {
    max-width: 100%;
    height: auto;
}
figure {
    font-size: 1em;
    line-height: 1.5em;
}
/* INLINE HTML */
rt {
    background: linear-gradient(transparent calc(100% - 0.5px), var(--ita-colors-neutral-500) 0.5px);
}
small {
    --bosui-contrast-color: oklch(from var(--bosui-color, currentColor) round(1.21 - L) 0 0);
    font-size: var(--ita-fontSizes-3);
    color: color-mix(in srgb, var(--bosui-color, var(--ita-colors-neutral-900)) 60%, var(--bosui-contrast-color) 40%);;
}
u {
    text-decoration-style: wavy;
    text-decoration-color: var(--ita-colors-danger-500);
    color: var(--ita-colors-danger-700);
}
u::before {
    content: '⊗ ';
}
var {
    font-weight: 500;
}
abbr[title] {
    /* cursor: pointer; */
    /* Safari hack */
    text-decoration-style: dotted;
    text-decoration: underline;
    text-decoration: underline dotted;
    text-decoration-thickness: 1.5px;
    offset-distance: 1em;
    text-underline-offset: 0.1em;
}
/* DETAILS */
details > summary {
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding-top: 0.5em;
    padding-bottom: 0.5em;
    font-weight: 500;
    cursor: pointer;
}
details > summary::before {
    content: '';
    width: 0.7em;
    height: 0.7em;
    background-color: var(--bosui-color, var(--ita-colors-primary-500));
    mask-position: center;
    mask-repeat: no-repeat;
    mask-size: 90% 90%;
    mask-image: url('/bundles/bosui/img/iconpark/system/chevron-right-stroke.svg');
    transition: rotate 300ms;
}
details[open] > summary::before {
    rotate: 90deg;
}
details > summary + * {
    margin-top: 0;
}
details[name] + details[name] > summary {
    border-top: 1px solid var(--ita-colors-primary-300);
}
/* DIALOG */
dialog {
    border: none;
    border-radius: var(--bosui-theme-border-radius-3);
    box-shadow: var(--bosui-theme-box-shadow-1);
    padding: 2em;
    max-width: 70ch;
    background-color: var(--ita-colors-neutral-200);
}
dialog > *:first-child {
    margin-top: 0;
}
dialog::backdrop {
    background-color: color-mix(in srgb, var(--bosui-color, currentColor) 70%, transparent 30%);
}
/* FIELDSET */
fieldset {
    border: 1px solid color-mix(in srgb, var(--bosui-color, var(--ita-colors-neutral-500)) 30%, transparent 70%);
    border-radius: var(--bosui-theme-border-radius-2);
    padding: 1.5em;
}
legend {
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0 0.5em;
    color: var(--bosui-color, var(--ita-colors-neutral-700))
}