
#root, .g-root, .yfm {
    --yfm-font-family-sans: 'YS Text', 'Helvetica Neue', Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol" !important;
    font-family: 'YS Text', 'Helvetica Neue', Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}

.yfm strong, .yfm-tab, .yfm .yfm-note .yfm-note-title {
    font-weight: 600;
}

.copyrights-note {
    font-size: 12px;
    color: var(--g-color-text-secondary);
    margin: 1em 0 !important;
}

.availability-caption {
    color: var(--g-color-text-secondary);
    font-size: 0.8em;
    margin: 0 0 0.5em !important;
}

.availability-caption + p {
    margin-bottom: 2em;
}

.machine-translation-note {
    font-size: 10px;
    color: rgba(0, 0, 0, 0.3);
    margin: 1em 0 !important;
}

/* .dc-doc-page__page-contributors {
    margin: auto;
} */

/* фикс Аккордеонов */
.yfm-tabs-accordion {
    max-width: 100% !important;
}

.yfm-tabs-accordion .yfm-tab {
    padding-right: 35px !important;
    white-space: normal !important;
}
/* фикс Аккордеонов */


.open-app-button {
    margin: 0 0 15px 0 !important;
}

.open-app-button + .yfm-cut,
dfn details.yfm-cut {
    font-size: 0.8em;
    line-height: 1em;
    color: #808080;
}

/* style is not being used */
.instruction-with-inline-imgs li > p > svg,
.instruction-with-inline-imgs li > p > img,
.instruction-with-inline-imgs li > svg,
.instruction-with-inline-imgs li > img {
    height: 20px;
    width: auto;
}

.buttons-functions-table table tr td svg,
.buttons-functions-table table tr td img {
    max-width: max-content;
}

.buttons-functions-table table td:nth-child(2) svg,
.buttons-functions-table table td:nth-child(2) img {
    height: auto;
    width: 40px;
    min-width: 40px;
}

.yfm .colors-table table tr td img {
    max-width: 88px;
    width: 88px;
}

/* Прозрачный фон для SVG-изображений с inline=false */
.yfm img[src$=".svg"] {
    background-color: transparent !important;
}

@media screen and (max-width:768px) {
    .yfm .mobile-column-2-50_50 table tr {
        display: grid;
        grid-template-columns: 50% 50%;
    }
}

.dc-doc-page .yfm .striped-none table tr:nth-child(2n) {
    background: var(--g-color-base-background);
}

@media screen and (max-width:768px) {
    .yfm .mobile-column-1 table tr {
      display: grid;
      grid-template-columns: 100%;
    }
  }

  .yfm .border-none table, .yfm .border-none table tr td {
    border: none;
}

.dc-doc-page .yfm table tr:nth-child(2n) {
    background: var(--g-color-base-background);
}

.yfm .va-top table tr td {
    vertical-align: top;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-light.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-light-italic.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-light-italic.woff2') format('woff2');
    font-weight: 300;
    font-style: italic;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-regular.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-regular-italic.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-regular-italic.woff2') format('woff2');
    font-weight: 400;
    font-style: italic;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-medium.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-medium-italic.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-medium-italic.woff2') format('woff2');
    font-weight: 500;
    font-style: italic;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-bold.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-bold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Text';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/text-bold-italic.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/text-bold-italic.woff2') format('woff2');
    font-weight: 600;
    font-style: italic;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Display';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/display-thin.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/display-thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Display';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/display-light.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/display-light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Display';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/display-regular.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/display-regular.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Display';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/display-medium.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/display-medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Display';
    src: url('https://yastatic.net/s3/home/fonts/ys/4/display-bold.woff') format('woff'), url('https://yastatic.net/s3/home/fonts/ys/4/display-bold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-stretch: normal;
}

@font-face {
    font-family: 'YS Display';
    src: url('https://yastatic.net/s3/home/fonts/ys/1/display-heavy.woff') format('woff');
    font-weight: 900;
    font-style: normal;
    font-stretch: normal;
}

/* Скрытие кнопок */

/* Скрытие кнопки "Язык" (на пк) */

body:not(:has(.language-support)) .g-button[aria-label="Язык"] {
    display: none !important;
}

/* Скрытие кнопки переключения темы (на моб) */

.dc-mobile-control:has(button[disabled]) {
    display: none !important;
}

/* Скрытие кнопок (на моб) */

html[lang="ru"] body:not(:has(.language-support)) .dc-mobile-controls {
    display: none !important;
}

/* Кастомные кнопки */

.custom-button {
    border: none;
    border-radius: 50px !important;
    padding: 16px 24px;
    color: #fff !important;
    font-family: var(--yfm-font-family-sans), sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 100%;
    cursor: pointer;
    user-select: none;
}

.custom-button--classic {
    border: none;
    background-color: #7137FF !important;
    transition: opacity 0.2s linear, transform 0.2s linear;
}

.custom-button--telegram {
    border: none;
    background-color: #0088cc !important;
    transition: opacity 0.2s linear, transform 0.2s linear;
}

.custom-button--messenger {
    border: none;
    background-color: #1fdeef !important;
    transition: opacity 0.2s linear, transform 0.2s linear;
}

.custom-button:hover,
.custom-button-feedback:hover {
    opacity: 0.9;
    transform: scaleX(1.05) scaleY(1.05);
}

.custom-button:active,
.custom-button-feedback:active {
    transform: scaleX(0.95) scaleY(0.95);
}

.custom-button--with-icon {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    padding: 11.5px 24px !important;
    outline: 2px solid #7137FF !important;
    color: #7137FF !important;
    transition: opacity 0.2s linear, transform 0.2s linear;
}

img.custom-button--with-icon {
    background-color: unset !important;
}

.custom-button--with-icon:hover {
    opacity: 0.9;
    transform: scaleX(1.05) scaleY(1.05);
}

.custom-button--with-icon:active {
    transform: scaleX(0.95) scaleY(0.95);
}

.custom-button__icon {
  object-fit: cover !important;
  object-position: center;
  block-size: 25px;
  inline-size: 25px;
  max-height: initial !important;
  background-color: unset !important;
}

.yfm li ul+div, .yfm li ol+div {
    margin: 15px 0 15px 0 !important;
}

.yfm li p + div.open-app-button {
    margin: 15px 0 15px 0 !important;
}


/* Для Нового года */

/* Кастомное лого */
/* html[lang="ru"] .pc-logo__icon {
    max-height: 50px !important;
} */

/* Кастомные иконки якорей */
/* .yfm .yfm-anchor {
    padding-right: 0px !important;
    width: 0px !important;
    margin-left: -21px !important;
}

.yfm .yfm-anchor:before {
    content: "☃️" !important;
}*/



/* Грид для добавления устройств */

.device-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: start;
    gap: 20px;
    width: 100%;
    padding: 10px 10px 20px 10px;
    box-sizing: border-box;
}

/* Карточка устройства */
.device-card {
    flex: 0 1 170px;
    max-width: 170px; /* Максимальная ширина */
    aspect-ratio: 170 / 200; /* Пропорция карточки */
    background: var(--g-color-base-background, #fff);
    border: 1px solid rgba(97, 56, 244, 0.2);
    border-radius: 15px;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    position: relative; /* Для позиционирования текста */
    transition: transform 0.3s ease-out;
}

.device-card:hover {
    transform: scale(1.04);
    }

/* Делаем ссылку полностью кликабельной */
.card-link {
    display: block;
    text-decoration: none;
    color: var(--g-color-text-primary, #000);
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    mix-blend-mode: multiply;
    z-index: 11; /* Ссылка должна быть выше всех остальных элементов */
}

/* Стили для изображения внутри ссылки */
.card-link img {
    height: 65%;
    object-fit: contain;
    margin: 5% auto 0; /* Центрируем изображение */
    display: block;
}

/* Стили для текста */
.card-text {
    position: absolute;
    bottom: 0;
    width: 100%;
    line-height: 14px;
    text-align: center;
    color: var(--g-color-text-primary, #000);
    padding: 0 10px 20px 10px;
    box-sizing: border-box;
    /* Динамический размер шрифта в зависимости от ширины viewport'а */
    font-size: clamp(12px, calc(12px + (15 - 12) * (100vw - 300px) / (768 - 300)), 15px);
    z-index: 10;
    font-weight: 400;
}

/* Адаптивность для планшетов (≤ 768px) */
@media (max-width: 768px) {
    .device-grid {
        gap: 15px;
        justify-content: start;
    }

    .device-card {
        flex: 0 1 170px; /* Начальная ширина 170px */
        max-width: min(calc(33.33% - 10px), 170px); /* Максимальная ширина — треть контейнера, но не больше 170px */
        min-width: 140px;
    }
}

/* Адаптивность для телефонов (≤ 480px) */
@media (max-width: 480px) {
    .device-grid {
        gap: 10px;
    }

    .device-card {
        flex: 0 1 170px; /* Начальная ширина 170px */
        max-width: min(calc(50% - 10px), 170px); /* Максимальная ширина — половина контейнера, но не больше 170px */
        min-width: 140px;
    }
}

/* Для очень узких экранов (≤ 300px) */
@media (max-width: 300px) {
    .device-card {
        flex: 0 1 170px; /* Начальная ширина 170px */
        max-width: 170px; /* Максимальная ширина 170px */
        margin: 0 auto;
        min-width: 140px;
    }
}

/* Floating Buttons START */
.yasmina-whatsapp-btn, .telegram-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    inset-inline-end: 25px;
    z-index: 99;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: message-btn-pulse 2s infinite;
}

/* Специфичные стили для WhatsApp */
.yasmina-whatsapp-btn {
    background: #25D366;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

/* Специфичные стили для Telegram */
.telegram-btn {
    background: #0088cc;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

/* Общие hover-эффекты */
.yasmina-whatsapp-btn:hover, .telegram-btn:hover {
    transform: scale(1.1);
}

/* Специфичные тени при hover */
.yasmina-whatsapp-btn:hover {
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.telegram-btn:hover {
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.4);
}

/* Общие стили для изображений */
.yasmina-whatsapp-btn img, .telegram-btn img {
    width: 40px;
    height: 40px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
    background-color: unset !important; /* Иначе получается белый квадратный фон */
}

/* Анимация */
@keyframes message-btn-pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* RTL поддержка */
[dir="rtl"] .yasmina-whatsapp-btn, [dir="rtl"] .telegram-btn {
    left: 25px;
    right: initial;
}
/* Floating Buttons END */


/* НЭ */
.container.fixed {
  position: relative;
  width: max-content;
}
/* основное окно виджета (iframe) */
.container.fixed iframe[title="neuroexpert-widget"] {
  border-radius: 16px;
  box-shadow: none !important;
  border: 1px solid rgba(97, 56, 244, 0.2) !important;
  background-clip: padding-box;
}
/* шапка поверх хедера Яндекса */
.container.fixed::before {
  content: "Задать вопрос";
  position: absolute;
  top: 16px;
  left: 16px;   /* ПК */
  right: 16px;
  height: 56px;
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3Csvg%20width='21'%20height='20'%20viewBox='0%200%2021%2020'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3E%3Cpath%20d='M9.8809%2013.1407C10.0145%2012.6487%2010.7121%2012.6487%2010.8457%2013.1407L11.2813%2014.7422C11.3743%2015.0847%2011.642%2015.3524%2011.9844%2015.4453L13.586%2015.8809C14.0779%2016.0145%2014.0779%2016.7121%2013.586%2016.8457L11.9844%2017.2813C11.642%2017.3743%2011.3743%2017.642%2011.2813%2017.9844L10.8457%2019.586C10.7121%2020.0779%2010.0145%2020.0779%209.8809%2019.586L9.44535%2017.9844C9.35235%2017.642%209.08468%2017.3743%208.74222%2017.2813L7.14066%2016.8457C6.64871%2016.7121%206.64871%2016.0145%207.14066%2015.8809L8.74222%2015.4453C9.08468%2015.3524%209.35235%2015.0847%209.44535%2014.7422L9.8809%2013.1407ZM15.875%206.1348C16.0086%205.64285%2016.7063%205.64285%2016.8399%206.1348L17.3389%207.97074C17.5249%208.65533%2018.0596%209.18992%2018.7442%209.37601L20.5811%209.87504C21.0725%2010.0089%2021.0725%2010.706%2020.5811%2010.8399L18.7442%2011.3389C18.0596%2011.525%2017.525%2012.0596%2017.3389%2012.7442L16.8399%2014.5811C16.706%2015.0725%2016.0089%2015.0725%2015.875%2014.5811L15.376%2012.7442C15.1899%2012.0596%2014.6553%2011.5249%2013.9707%2011.3389L12.1348%2010.8399C11.6428%2010.7063%2011.6428%2010.0086%2012.1348%209.87504L13.9707%209.37601C14.6554%209.18996%2015.19%208.65536%2015.376%207.97074L15.875%206.1348ZM5.65433%200.513708C5.88173%20-0.171178%206.85089%20-0.171294%207.07816%200.513708L7.88383%202.94437C8.18202%203.84413%208.8874%204.55044%209.78715%204.84867L12.2178%205.65433C12.9031%205.88154%2012.9032%206.85101%2012.2178%207.07816L9.78715%207.88383C8.88758%208.18205%208.18205%208.88758%207.88383%209.78715L7.07816%2012.2178C6.85101%2012.9032%205.88153%2012.9031%205.65433%2012.2178L4.84867%209.78715C4.55044%208.8874%203.84413%208.18202%202.94437%207.88383L0.513708%207.07816C-0.171293%206.85089%20-0.171179%205.88173%200.513708%205.65433L2.94437%204.84867C3.84417%204.55046%204.55046%203.84417%204.84867%202.94437L5.65433%200.513708Z'%20fill='%237A55FF'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: 21px 20px;
  background-position: 16px center;
  padding-left: 52px;
  padding-right: 16px;
  border-top: 1px solid rgba(97, 56, 244, 0.2);
  border-left: 1px solid rgba(97, 56, 244, 0.2);
  border-right: 1px solid rgba(97, 56, 244, 0.2);
  border-radius: 16px 16px 0 0;
  display: flex;
  align-items: center;
  font-size: 22px;
  font-weight: 500;
  line-height: 1;
  color: #111;
  pointer-events: none;
  opacity: 0;
  z-index: 1001;
}
/* показываем шапку только когда виджет открыт */
.container.fixed:has(iframe.visible)::before {
  opacity: 1;
}
/* 📱 мобильная коррекция */
@media (max-width: 768px) {
  .container.fixed::before {
    left: 14px;
  }
}
