/*
 * Dirty magic here
 * Don't mess with Voodoo
 */

/* stylelint-disable */
@font-face {
    font-family: 'Styrene UI';
    src: url('https://alfabank.gcdn.co/media/fonts/styrene-ui/styrene-ui_regular.woff2')
            format('woff2'),
        url('https://alfabank.gcdn.co/media/fonts/styrene-ui/styrene-ui_regular.woff')
            format('woff');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Styrene UI';
    src: url('https://alfabank.gcdn.co/media/fonts/styrene-ui/styrene-ui_medium.woff2')
            format('woff2'),
        url('https://alfabank.gcdn.co/media/fonts/styrene-ui/styrene-ui_medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Styrene UI';
    src: url('https://alfabank.gcdn.co/media/fonts/styrene-ui/styrene-ui_bold.woff2')
            format('woff2'),
        url('https://alfabank.gcdn.co/media/fonts/styrene-ui/styrene-ui_bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

html {
    height: 100%;
}

body {
    font-family: var(--font-family);
    height: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.sb-show-main {
    margin: 0;
    padding: var(--gap-xs);
    overflow-x: hidden;
}

#docs-root > .sbdocs-wrapper {
    padding: var(--gap-5xl) var(--gap-m);
}

/* plugins */

.tool {
    margin-top: auto;
    margin-bottom: auto;
}

.label {
    display: inline-block;
    margin-right: var(--gap-xs);
    font-size: 13px;
}

/* Скрываем Story из Docs */

div[id*='story--'] {
    display: none;
}

/* Manager */

div.sidebar-header {
    display: flex;
    align-items: center;
    margin: -6px -10px 0 !important;
}

div.sidebar-header > div:first-child a {
    padding: 0;
    margin: 0;
    border: 0;
}

div.sidebar-header img {
    max-height: 32px;
}

.search-field {
    margin-left: var(--gap-l-neg);
    margin-right: -10px;
}

.search-field svg:first-child {
    top: 7px;
}

.search-field input {
    font-family: var(--font-family);
    border: 0;
    border-radius: 0;
    padding-top: 0;
    padding-bottom: var(--gap-2xs);
    padding-left: var(--gap-2xl);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 400;
}

.search-field code {
    /* иконка слэша */
    display: none;
}

.search-result-item--label mark {
    color: var(--color-light-text-accent) !important;
}

.search-result-item svg {
    color: var(--color-light-graphic-secondary);
}

.sidebar-header button:after {
    /* пипка у кнопки с тремя точками */
    display: none;
}

.sidebar-container .sidebar-subheading-action {
    /* кнопка раскрытия подпунктов */
    display: none;
}

.sidebar-container .sidebar-item svg {
    /* иконки страниц */
    display: none;
}

div.sidebar-subheading {
    padding: var(--gap-xs) var(--gap-m) 0 var(--gap-l);
    margin-bottom: var(--gap-xs);
    border-top: 1px solid rgba(0, 0, 0, 0.07);
    color: var(--color-light-text-tertiary-transparent);
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    letter-spacing: 1.25px;
}

.sidebar-container .sidebar-item {
    padding-top: 6px;
    padding-bottom: 6px;
    color: rgba(11, 31, 53, 0.9);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 400;
    background: transparent !important;
}

.sidebar-container .sidebar-item:hover,
.sidebar-container .sidebar-item:focus,
.sidebar-container .sidebar-item[data-selected='true'] {
    font-weight: normal;
    color: var(--color-light-text-primary) !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

.sidebar-container .sidebar-item[data-selected='true'] {
    background-color: rgba(11, 31, 53, 0.1) !important;
}

button.sidebar-item[aria-expanded='true'],
button.sidebar-item[aria-expanded='true']:focus {
    background: transparent !important;
}

/* a.sidebar-item[class*='inlineGlow'] span.sidebar-expander,
button.sidebar-item[class*='inlineGlow'] span.sidebar-expander {
    width: 14px;
}

a.sidebar-item[class*='inlineGlow'] > svg + span,
button.sidebar-item[class*='inlineGlow'] > svg + span {
    border-radius: 99px;
    background-color: var(--color-light-bg-tertiary);
} */

button[data-action='collapse-root']:focus {
    box-shadow: none;
    color: inherit;
}

button[data-action='collapse-root']:focus span:first-of-type {
    color: inherit;
}

select.select {
    position: relative;
    padding-left: var(--gap-xs);
    padding-right: var(--gap-xl);
    -webkit-appearance: none;
    appearance: none;
    background-image: url(https://alfabank.gcdn.co/icons/glyph_chevron-down-compact_m.svg);
    background-repeat: no-repeat;
    background-position: right center;
}

/* Preview */

div.github-doc {
    display: none;
}

div.benefits {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-content: stretch;
    align-items: stretch;
    margin: -1px 0 var(--gap-2xl);
    counter-reset: item;

    border: solid var(--color-light-border-secondary);
    border-width: 1px 1px 0;
    border-radius: 0 44px 0 0;
}

div.benefits-item {
    @mixin paragraph_primary_medium;
    position: relative;
    flex: 0 0 33.3333%;
    min-height: 96px;
    margin: 0;
    padding: var(--gap-m) var(--gap-2xl) var(--gap-xl) var(--gap-m);
    color: var(--color-light-text-primary);
    box-sizing: border-box;
    overflow: hidden;

    border-left: 1px solid var(--color-light-border-secondary);
    border-bottom: 1px solid var(--color-light-border-secondary);
}

@media (min-width: 1000px) {
    div.benefits-item:nth-child(-n + 3) {
        padding-top: 42px;
    }

    div.benefits-item:nth-child(3n + 1) {
        border-left: 0;
    }
}

@media (max-width: 999px) and (min-width: 768px) {
    div.benefits-item {
        flex: 0 0 50%;
    }

    div.benefits-item:nth-child(-n + 2) {
        padding-top: 42px;
    }

    div.benefits-item:nth-child(2n + 1) {
        border-left: 0;
    }
}

@media (max-width: 767px) {
    div.benefits-item {
        flex: 0 0 100%;
        min-height: 0;
        border-left: 0;
    }

    div.benefits-item:first-child {
        padding-top: 42px;
    }
}

div.benefits-item:before {
    display: none;
    position: absolute;
    left: 0;
    top: 4px;
    width: 32px;
    color: rgba(11, 31, 53, 0.1);
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    text-align: center;
    counter-increment: item;
    content: counter(item);
}

div.benefits-item img {
    display: block;
    width: 32px;
    height: 32px;
    margin: 0 0 var(--gap-l);
    border: 0;
}

div.benefits-item span {
    display: block;
    font-family: 'Styrene UI';
}

h1.sbdocs-h1 {
    margin: 0 0 var(--gap-2xl);
    color: var(--color-light-text-accent);
    font-size: 48px;
    line-height: 1;
    font-weight: 900;
    font-family: var(--font-family);
}

p.sbdocs-p.lead {
    display: block;
    margin: var(--gap-xl-neg) 0 var(--gap-3xl);
    color: rgba(11, 31, 53, 0.6);
    font-size: 16px;
    line-height: 1.2;
    font-weight: normal;
    font-style: normal;
    font-family: var(--font-family);
}

h1.sbdocs-title {
    margin: 0;
    color: var(--color-light-text-primary);
    font-size: 48px;
    line-height: 1;
    font-weight: 900;
    font-family: var(--font-family);
}

h2.sbdocs-h2,
h2.sbdocs-h2:first-of-type {
    position: relative !important;
    margin: var(--gap-4xl) var(--gap-m-neg) var(--gap-m);
    padding: var(--gap-s) var(--gap-m);
    color: var(--color-light-text-primary);

    /* font-size: 24px; */
    font-size: 24px;
    line-height: 1.2;
    font-weight: 500;
    font-family: 'Styrene UI';
    box-shadow: inset 0 0 0 1px var(--color-light-border-secondary);
    border: 0;
}

h2.sbdocs-h2:after {
    display: block;
    position: absolute;
    right: 32px;
    top: 50%;
    margin-top: var(--gap-xs-neg);
    width: 16px;
    height: 16px;
    background-color: var(--color-light-graphic-accent);
    border-radius: var(--border-radius-m);
    content: '';
}

h3.sbdocs-h3,
h3.sbdocs-h3:first-of-type {
    margin: var(--gap-2xl) 0 var(--gap-m);
    color: var(--color-light-text-primary);
    font-size: 20px;
    line-height: 1.2;
    font-weight: 700;
    font-family: var(--font-family);
}

h4.sbdocs-h4 {
    margin: 0 0 var(--gap-m);
    color: var(--color-light-text-primary);
    font-size: 16px;
    line-height: 1.4;
    font-weight: 700;
    font-family: var(--font-family);
}

p.sbdocs-p {
    margin: 0 0 var(--gap-m);
    color: var(--color-light-text-primary);
    font-size: 16px;
    line-height: 1.5;
    font-family: var(--font-family);
}

li.sbdocs-li {
    margin: 0 0 var(--gap-xs);
    color: var(--color-light-text-primary);
    font-size: 16px;
    line-height: 1.5;
    font-family: var(--font-family);
}

a.sbdocs-a {
    color: #0f62fe;
    font-size: 16px;
    line-height: 1.5;
    border-bottom: 1px solid #b7d0ff;
}

li.sbdocs-li code.sbdocs-code,
li.sbdocs-li > code,
p.sbdocs-p code.sbdocs-code,
p.sbdocs-p > code {
    display: inline-block;
    margin: 0;
    padding: 0 var(--gap-2xs);
    color: var(--color-light-text-primary);
    font-size: 14px;
    line-height: 1.5;
    font-family: Consolas, Liberation Mono, Menlo, monospace;
    background-color: rgba(11, 31, 53, 0.05);
    border-radius: var(--border-radius-s);
    white-space: pre-wrap;
}

pre.sbdocs-pre code.sbdocs-code:only-child,
pre.sbdocs-pre > code:only-child {
    display: inline-block;
    margin: 0 0 var(--gap-xs);
    padding: var(--gap-xs) var(--gap-s);
    color: var(--color-light-text-primary);
    font-size: 14px;
    line-height: 1.5;
    font-family: Consolas, Liberation Mono, Menlo, monospace;
    background-color: rgba(11, 31, 53, 0.05);
    border-radius: var(--border-radius-s);
    white-space: pre-wrap;
}

/* Иначе дропдауны перекрываются следующим блоком */

div.sbdocs-content > *:not([class*='component']) {
    position: static;
}

/* Иначе дропдауны скрываются за границами блока */

div.sbdocs-preview {
    overflow: visible;
}
div.sbdocs-preview > div > div {
    overflow: visible;
}
div.sbdocs-preview > div > div > div {
    transform: none;
}

div.docblock-source {
    margin: var(--gap-xl) 0;
}

div.docblock-source,
div.sbdocs-preview {
    /* box-shadow: 0 0 4px rgba(11, 31, 53, 0.02), 0 2px 4px rgba(11, 31, 53, 0.04); */
    box-shadow: none;
}

div.docblock-source span.token {
    color: var(--color-light-text-primary);
    font-family: Consolas, Liberation Mono, Menlo, monospace;
}

div.docblock-source span.token.keyword,
div.docblock-source span.token.punctuation {
    color: rgba(11, 31, 53, 0.6);
}

div.docblock-source span.token.string {
    color: var(--color-light-text-primary);
}

button.tabbutton-active {
    color: var(--color-light-text-accent);
    border-bottom-color: #ef3124;
}

div.sbdocs table.docblock-propstable {
    margin: var(--gap-3xl) 0;
}

table.docblock-propstable thead.docblock-propstable-head th {
    padding: 0 0 var(--gap-xs);
    color: var(--color-light-text-tertiary-transparent);
    font-size: 12px;
    line-height: 1.2;
    font-weight: normal;
    border-bottom: 2px solid rgba(11, 31, 53, 0.1);
}

table.docblock-propstable thead.docblock-propstable-head th:first-child {
    padding: 0;
}

table.docblock-propstable tbody.docblock-propstable-body {
    box-shadow: none;
}

table.docblock-propstable tbody.docblock-propstable-body tr {
    border: 0;
}

table.docblock-propstable tbody.docblock-propstable-body td {
    padding: var(--gap-xs) 0;
    border-bottom: 1px solid rgba(11, 31, 53, 0.1);
}

table.docblock-propstable tbody.docblock-propstable-body td:first-child {
    padding: var(--gap-xs) 0;
}

table.docblock-propstable tbody.docblock-propstable-body span[class] {
    color: rgba(11, 31, 53, 0.6);
    font-size: 14px;
    font-family: Consolas, Liberation Mono, Menlo, monospace;
}

table.docblock-propstable tbody.docblock-propstable-body td:first-child span[class] {
    /* color: var(--color-light-text-primary); */
    color: var(--color-light-text-positive);
    font-weight: normal;
}

table.docblock-propstable tbody.docblock-propstable-body a {
    color: #0f62fe;
    font-size: 16px;
    line-height: 1.5;
    border-bottom: 1px solid #b7d0ff;
    text-decoration: none;
}

table.sbdocs-table {
    margin: var(--gap-xl) 0;
}

table.sbdocs-table th,
table.sbdocs-table td {
    padding: var(--gap-xs) var(--gap-s);
}

table.sbdocs-table th,
table.sbdocs-table td,
table.sbdocs-table a.sbdocs-a {
    font-size: 14px;
    line-height: 20px;
}

blockquote.sbdocs-blockquote {
    border-left-color: rgba(11, 31, 53, 0.1);
}

blockquote.sbdocs-blockquote p.sbdocs-p {
    color: rgba(11, 31, 53, 0.6);
}

img.sbdocs-img {
    margin: 0 0 var(--gap-m);
    max-width: 100%;
    height: auto;
    border: 1px solid rgba(11, 31, 53, 0.1);
    border-radius: var(--border-radius-s);
}

div.github {
    margin: var(--gap-l-neg) 0 var(--gap-2xl);
}

body[data-theme$='-inverted'] iframe,
body[data-theme$='-inverted'] .sbdocs-preview {
    background: var(--color-light-bg-primary-inverted);
}

div.lib {
    position: relative;
    margin: var(--gap-6xl-neg) var(--gap-m-neg) 0;
}

.lib-header {
    position: relative;
}

.lib-header:before,
.lib-header:after {
    display: block;
    position: absolute;
    left: -50vw;
    right: -50vw;
    height: 1px;
    background-color: var(--color-light-border-secondary);
    content: '';
}

.lib-header:before {
    bottom: 0;
}

.lib-header:after {
    bottom: 86px;
}

@media (max-width: 599px) {
    .lib-header:after {
        bottom: 56px;
    }
}

h1.lib-title {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-content: flex-start;
    align-items: flex-start;
    margin: 0;
}

h1.lib-title:before,
h1.lib-title:after {
    display: block;
    position: absolute;
    width: 1px;
    background-color: var(--color-light-border-secondary);
    content: '';
}

h1.lib-title:before {
    left: 0;
    top: 50%;
    bottom: 0;
}

h1.lib-title:after {
    right: 0;
    top: 0;
    bottom: 0;
}

span.lib-title__line {
    position: relative;
    flex: 0 1 auto;
    padding: 0 54px 0 var(--gap-s);
    color: var(--color-light-text-primary);
    font-size: 64px;
    line-height: 86px;
    font-weight: bold;
    font-family: 'Styrene UI';
}

@media (max-width: 599px) {
    span.lib-title__line {
        font-size: 40px;
        line-height: 56px;
    }
}

span.lib-title__line:last-child {
    padding-right: var(--gap-5xl);
}

span.lib-title__line:before {
    display: block;
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background-color: var(--color-light-border-secondary);
    content: '';
}

@media (max-width: 599px) {
    span.lib-title__line:before {
        display: none;
    }
}

.blinking-cursor:after {
    position: absolute;
    right: 50px;
    top: 50%;
    width: 3px;
    height: 64px;
    margin: var(--gap-2xl-neg) 0 0;
    background-color: #d91d0b;
    animation: 1s blink step-end infinite;
    content: '';
}

@media (max-width: 599px) {
    .blinking-cursor:after {
        height: 40px;
        margin-top: var(--gap-l-neg);
    }
}

@keyframes blink {
    from,
    to {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

.lib-desc {
    position: relative;
    padding: var(--gap-s) 86px 14px var(--gap-m);
    border: solid var(--color-light-border-secondary);
    border-width: 0 1px 1px;
    border-radius: 0 0 44px;
}

span.lib-desc__about {
    color: rgba(11, 31, 53, 0.6);
    font-size: 14px;
    line-height: 1.2;
    font-family: 'Styrene UI';
}

span.lib-desc__version {
    position: absolute;
    right: 0;
    top: 14px;
    width: 86px;
    color: rgba(11, 31, 53, 0.6);
    font-size: 14px;
    line-height: 1.2;
    font-family: 'Styrene UI';
    text-align: center;
}

div.lib-welcome {
    position: absolute;
    z-index: 2;
    left: 67%;
    top: 18px;
    margin-left: -68px;
}

@media (max-width: 767px) {
    div.lib-welcome {
        display: none;
    }
}

.lib-welcome:before,
.lib-welcome:after {
    display: block;
    position: absolute;
    content: '';
}

.lib-welcome:before {
    left: 0;
    top: 0;
    width: 136px;
    height: 136px;
    background: url(./images/welcome.svg) no-repeat 0 0;
    animation: rotating-cw 48s linear infinite;
}

.lib-welcome:after {
    left: 30px;
    top: 30px;
    width: 76px;
    height: 76px;
    background: url(./images/asterisk.svg) no-repeat 0 0;
    animation: rotating-ccw 72s linear infinite;
}

@keyframes rotating-cw {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(359deg);
    }
}

@keyframes rotating-ccw {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-359deg);
    }
}

.alfa-logo {
    position: absolute;
    right: 0;
    top: 0;
    width: 86px;
    height: 86px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: solid var(--color-light-border-secondary);
    border-width: 0 1px 1px;
    box-sizing: border-box;
}

@media (max-width: 599px) {
    .alfa-logo {
        height: 56px;
    }
}

.alfa-logo img {
    margin: 0;
    border: 0;
}

.docblock-propstable .docblock-propstable-body code {
    white-space: normal;
}

#компоненты--screenshots,
#компоненты--screenshots-sprite {
    display: none;
}

table.docblock-argstable thead.docblock-argstable-head th {
    color: var(--color-light-text-secondary);
}

table.docblock-argstable tbody.docblock-argstable-body {
    box-shadow: 0 0 1px var(--color-light-border-tertiary-inverted);
}

table.docblock-argstable tbody.docblock-argstable-body tr:not(:first-child) {
    border-top-color: var(--color-light-border-secondary);
}

table.docblock-argstable tbody.docblock-argstable-body td {
    background: var(--color-light-bg-primary);
}

table.docblock-argstable.docblock-argstable {
    color: var(--color-light-text-primary);
}

/* баджи типов пропсов */
table.docblock-argstable tbody.docblock-argstable-body td div:nth-child(2) span,
table.docblock-argstable tbody.docblock-argstable-body td div:only-child span {
    color: var(--color-light-text-secondary);
    border-color: var(--color-light-border-secondary);
    background: var(--color-light-bg-secondary);
}
