/*
Theme Name: Doc Theme
Template: oceanwp
*/

/* Основные стили для документации */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: #fff8e0; /* Фон страницы */
}

.landing-page-template h1 {
    font-size: 2em; /* Увеличение для главного заголовка */
    font-weight: bold;
    line-height: 1.5;
}

.landing-page-template h2 {
    font-size: 1.6em; /* Второй по важности заголовок */
    font-weight: bold;
    line-height: 1.2;
}

@media (max-width: 767px) {

    .landing-page-template h1 {
        line-height: 1;
    }

    .landing-page-template h2 {
        line-height: 1;
    }
}

.landing-page-template h3 {
    font-size: 1.4em;
    font-weight: bold;
    line-height: 1;
}

.landing-page-template h4 {
    font-size: 1.2em;
    font-weight: bold;
    line-height: 1;
}

.landing-page-template h5 {
    font-size: 1.1em;
    font-weight: bold;
    line-height: 1;
}

.landing-page-template h6 {
    font-size: 1.05em;
    font-weight: bold;
    line-height: 1;
}

.landing-page-template strong, 
.landing-page-template b {
    font-weight: 8000; /* Увеличение толщины жирного шрифта */
}

.landing-page-template img {
    max-width: 70%;
    height: auto;
}

@media (max-width: 767px) {
	.landing-page-template img {
		max-width: 100%;
	}
}

#page-wrapper.landing-page-template a {
    color: #f79100; /* Задаёт цвет для ссылок */
    font-weight: bold;
}

#page-wrapper.landing-page-template a:hover {
    color: #02b7ff; /* Цвет при наведении курсора */
    font-weight: bold;
}

#page-wrapper {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

/* Стили для бокового меню документации */
#docs-sidebar {
    /* background-color: #ffedc1; */
	background: linear-gradient(90deg, rgba(255,223,174,1) 0%, rgba(255,251,245,1) 100%);
    /* border-right: 1px solid #ccc; */
    padding: 20px;
    width: 25%;
    position: fixed; /* Фиксируем боковое меню */
    top: 0px;
    bottom: 0; /* Растягиваем до низа экрана */
    overflow-y: auto; /* Позволяем прокрутку только внутри бокового меню */
    line-height: 1;
    /* box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); */
}

#docs-sidebar {
    scrollbar-width: thin; /* Для Firefox */
    scrollbar-color: #555 #ccc; /* Цветы для Firefox */
}

#docs-sidebar::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

#docs-sidebar::-webkit-scrollbar-track {
    background: #ffdfae; /* Цвет фона трека полосы прокрутки */
}

#docs-sidebar::-webkit-scrollbar-thumb {
    background: #ff9829; /* Цвет полосы прокрутки */
}

/* Перемещаем полосу прокрутки налево */
#docs-sidebar {
    direction: rtl; /* Включаем прав-to-left режим */
}

#docs-sidebar > * {
    direction: ltr; /* Восстанавливаем нормальное направление для содержимого */
    /*overflow-x: hidden;  /* чтобы не было горизонтальной полосы */
}

/* Настройки меню документации */
.docs-menu {
    list-style: none; /* Убираем маркеры списка */
    padding: 0;
    margin: 0;
    font-family: 'Nunito', sans-serif;
}

.docs-menu li {
    margin-bottom: 15px;
}

.docs-menu a {
    text-decoration: none;
    font-size: 16px;
    color: #16191a !important;
    display: flex;
    align-items: center;
    gap: 10px; /* Пробел между иконкой и текстом */
    transition: background-color 0.3s, border-radius 0.3s;
    font-family: 'Nunito', sans-serif;
}

@media (min-width: 767px) {
    .docs-menu a:hover {
        background-color: #fffbf5; /* Выделение при наведении */
        border-radius: 10px; /* Закругленные края при наведении */
        transform: scaleY(1.2) scaleX(1.1) translateX(5%); /* Увеличение элемента */
        transition: transform 0.1s; /* Плавный эффект */
    }
}

/* Ограничение размера иконок */
.docs-menu i {
    font-size: 20px; /* Размер иконок */
    display: inline-block;
}

/* Убираем маркеры (пункты) списка */
.docs-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

/* Стили для основного контента */
#main-content {
    flex-grow: 1;
    padding: 20px;
    margin-left: 25%; /* Отступ для бокового меню */
    border: none;
	background-color: #fffbf5;
}

/* Стиль для контейнера с контентом */
.page-content {
    text-align: left;
    background-color: white;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 80%;
    margin-right: 20%;
    border: none;
}

@media (max-width: 1500px) {
    .page-content {
        max-width: 100%;
        margin-right: 0;
    }
}

@media (max-width: 767px) {
    .page-content {
        border-radius: 0; /* Отменяет закругление */
        box-shadow: none; /* Убирает тень */
        max-width: 100%; /* Увеличивает ширину до 100% */
		padding: 10px;
        margin-right: 0;
    }
}

a {
    color: #0073e6;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px 0;
}

/* Меню сверху на мобильных устройствах */
@media (max-width: 767px) {
    #page-wrapper {
        flex-direction: column;
    }

    #docs-sidebar {
        width: 100%;
        height: auto;
        position: relative;
        border-right: none;
        border-bottom: 1px solid #ccc;
        max-height: 20em; /* Ограничиваем высоту, чтобы влезло около 20 строк */
        overflow-y: auto; /* Добавляем прокрутку при необходимости */
		/* top: 0px; Лечим баг */
    }

    #main-content {
        margin-left: 0;
        padding: 20px;
    }

    .docs-menu {
        display: flex;
        flex-direction: row;
        justify-content: space-around;
    }

    .docs-menu li {
        margin-bottom: 0;
    }

    .docs-menu a {
        font-size: 14px;
    }
}

/* Десктопные стили */
@media (min-width: 768px) {
    #docs-sidebar {
        padding-right: 20px;
    }
}


/* Ограничение масштаба для изображений и иконок */
.custom-icon {
    width: 20px; /* Устанавливаем желаемый размер иконки */
    height: auto;
    margin-right: 4px; /* Пробел между иконкой и текстом */
	margin-left: 7px; /* Отступ слева */
    vertical-align: middle; /* Вертикальное выравнивание по центру */
}

.icon-doc {
    font-size: 20px; /* Задаем размер для иконки через <i> */
    margin-right: 4px; /* Пробел между иконкой и текстом */
	margin-left: 7px; /* Отступ слева */
}

body, #main-content, .page-content {
    font-family: 'Nunito', sans-serif;
    font-size: 18px;
    line-height: 1.6;
    color: #212e35;
}

/* Стили для пользовательского градиентного фона и значка */
.docs-note {
    background: linear-gradient(90deg, rgba(255,223,174,1) 0%, rgba(255,251,245,1) 100%);
    padding: 17px;
    border-radius: 3px;
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.docs-note .note-icon {
    font-size: 24px;
    margin-right: 10px;
    flex-shrink: 0; /* Предотвращаем сжатие иконки */
}

/* Стили для моноширного текста */
code, pre, .highlight-code {
    background-color: #f4f2ec;
    font-family: 'Courier New', Courier, monospace; /* Моноширный шрифт */
    border-radius: 5px; /* Скруглённые края */
	font-size: 0.9em !important;
}

/* Кнопка копирования C# скрипта */
.code-block {
    position: relative;
    margin-bottom: 15px; /* Отступ снизу для разделения блоков */
}

.copy-button {
    position: absolute;
    right: 10px;
    top: 10px;
    background-color: #ffdfae;
    color: black;
    border: none;
    border-radius: 15px;
    padding: 1px 10px;
    cursor: pointer;
    font-size: 0.9em; /* Размер шрифта */
}


/* Кнопка наверх */
.scroll-to-top-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #ff9829;
    color: white;
    border: none;
    width: 50px; /* Устанавливаем ширину */
    height: 50px; /* Устанавливаем высоту */
    border-radius: 50%; /* Делаем кнопку круглой */
    font-size: 20px; /* Увеличиваем размер шрифта для иконки */
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: opacity 0.3s, visibility 0.3s ease;
    display: none;
    align-items: center;
    justify-content: center;
}


.youtube-row {
  display: flex;
  gap: 16px;
  flex-wrap: nowrap; /* видео всегда в строку */
}

.youtube-row .video {
  position: relative;
  width: 50%;
  padding-top: 28.125%; /* 16:9 от 50% ширины */
  overflow: hidden;
  margin: 0 !important;
}

.youtube-row .video > * {
  position: absolute !important;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
}

/* Только на мобильных: в столбик */
@media (max-width: 768px) {
  .youtube-row {
    flex-direction: column;
  }

  .youtube-row .video {
    width: 100%;
    padding-top: 56.25%; /* 16:9 от полной ширины */
  }
}



/* Иконки в одну строку, как обычные ссылки, но без текста */
.icon-button-group {
    display: flex;
    flex-wrap: wrap; /* позволяет иконкам переноситься */
    /* gap: 10px; */
    align-items: center;
    margin-bottom: 15px;
    max-width: 100%; /* не даёт блоку быть шире контейнера */
    overflow-x: hidden; /* убирает прокрутку */
    /* Разрешаем подсказкам выходить за пределы блока */
    position: relative;
    overflow: visible !important;  /* важно — не обрезать всплывашки */
}

/* Ссылки без текста — стилизуем как обычные */
.icon-button-group a.icon-only {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    padding: 0;
    background: none;
    border: none;
    transition: transform 0.2s ease;
}

/* Иконки как у обычных пунктов меню */
.icon-button-group a.icon-only img {
    width: 20px;
    height: auto;
    margin: 0 7px;
    vertical-align: middle;
}

/* Поведение при наведении — то же, что и в .docs-menu a */
@media (min-width: 767px) {
    .icon-button-group a.icon-only:hover {
        transform: scale(1.5);
    }
}

/* Обёртка для иконки с подсказкой */
.tooltip-fly{
  position:fixed; background:rgba(0,0,0,.85); color:#fff;
  padding:6px 10px; border-radius:5px; font-size:16px;
  font-family:'Nunito',sans-serif; line-height:1.4; white-space:nowrap;
  z-index:9999; pointer-events:none; opacity:0; transform:scale(.9);
  transition:opacity .15s ease .1s, transform .15s ease .1s;
}
.tooltip-fly.show{ opacity:1; transform:scale(1); }

/* Ряд действий в меню */
.docs-menu .menu-actions{ display:flex; gap:10px; align-items:center; margin-bottom:12px; }

/* Базовая кнопка (как старая menu-button) */
.btn-doc{
  background:#fff; color:#333; border:none; border-radius:50px;
  height:40px; padding:0 14px; cursor:pointer;
  box-shadow:0 2px 5px rgba(0,0,0,.1);
  transition:background-color .3s ease; font-family:'Nunito',sans-serif; font-size:16px;
}
.btn-doc:hover{ background:#f1f1f1; }
.btn-doc:focus-visible{ outline:2px solid #7aa7ff; outline-offset:2px; }

/* Поиск с иконкой слева */
.btn-doc--search{ display:inline-flex; align-items:center; gap:8px; padding:0 12px; min-width:100px; }
.btn-doc--search .btn-ico{ display:inline-flex; }

/* Кнопка языка: две иконки, правая под левой и полупрозрачная */
.btn-doc--lang{
  position:relative; width:64px; padding:0 8px;
}
.btn-doc--lang .flag{
  position:absolute; top:50%; transform:translateY(-50%);
  width:22px; height:22px; object-fit:cover; border-radius:3px; pointer-events:none;
}
.btn-doc--lang .flag-left{ left:14px; z-index:2; }   /* было 10px */
.btn-doc--lang .flag-right{ left:28px; z-index:1; opacity:.5; } /* было 24/30px */








/* Настраиваемая ширина панели платформ (можно менять где угодно) */
:root{
  --platforms-panel-width: 100%;
  --platforms-speed: 28s; /* меньше = быстрее */
  --platforms-gap: 4px;   /* расстояние между платформами (и на стыке тоже) */
}

/* Панель как "поиск": белая, скруглённая */
.platforms-panel{
  background:#fff;
  border-radius:50px;
  box-shadow:0 2px 5px rgba(0,0,0,.1);

  width:100%;
  max-width:280px;   /* ← максимальная ширина */
  
  padding:10px 12px 12px;
  margin-bottom:12px;
}

/* Заголовок по центру, кликабельный */
.platforms-title{
  display:flex;
  justify-content:center;
  align-items:center;

  text-align:center;
  font-family:'Nunito',sans-serif;
  font-size:16px;
  color:#333 !important;
  text-decoration:none;

  padding:6px 0 8px;
  width:100%;
}

/* Область бегущей строки */
.platforms-marquee{
  position:relative;
  overflow:hidden;            /* иконки не “вылезают” */
  border-radius:40px;
  padding: 2px 12px 6px;
  /* “Белый градиент” по краям: иконки заходят под него */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent);
}

/* Трек двигается бесконечно */
.platforms-track{
  display:flex;
  gap: var(--platforms-gap);
  width:max-content;
  will-change: transform;
  animation: platforms-marquee var(--platforms-speed) linear infinite;
}

/* Две “половины” одинакового контента */
.platforms-row{
  display:flex;
  align-items:center;
  gap: var(--platforms-gap);
  padding: 0;
}

/* Иконки-ссылки */
.platforms-icon{
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  padding:0;
  background:none;
  border:none;
}

/* Сами картинки — без лишних отступов */
.platforms-icon img.custom-icon{
  width:32px;
  height:auto;
  margin:0; /* важно: убираем старые отступы от .custom-icon */
}

/* Движение: влево (классический marquee). 
   Если нужно “вправо” — поменяйте знак на плюс (см. ниже). */
@keyframes platforms-marquee{
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Если хотите движение вправо вместо влево — используйте это (и удалите keyframes выше)
@keyframes platforms-marquee{
  from { transform: translateX(-50%); }
  to   { transform: translateX(0); }
}
*/

/* Уважение к системной настройке "уменьшить анимацию" */
@media (prefers-reduced-motion: reduce){
  .platforms-track{ animation:none; }
}


/* 1) ПК: уменьшить расстояние между кнопкой языка/поиска и панелью платформ */
@media (min-width: 768px) {
  .docs-menu .menu-actions{
    margin-bottom: 0px; /* было 12px */
  }
}

/* 2) Мобилка: увеличить расстояние между панелью платформ и пунктами меню ниже */
@media (max-width: 767px) {
  .docs-menu li.platforms-panel{
    margin-bottom: 14px !important; /* важно: перебить .docs-menu li { margin-bottom:0 } */
  }
}



/* Убираем "менюшный" hover у ссылки "Доступные платформы" и делаем как у иконок */
@media (min-width: 767px) {
  .docs-menu .platforms-panel .platforms-title:hover{
    background: transparent !important;   /* убираем плашку */
    border-radius: 0 !important;
    transform: scale(1.12) !important;    /* только увеличение текста */
    transition: transform 0.2s ease;
  }
}

/* На всякий случай — убираем underline от глобального a:hover */
.docs-menu .platforms-panel .platforms-title:hover{
  text-decoration: none !important;
}

/* И на обычном состоянии тоже убираем фон/анимации меню, чтобы ничего не "наследовалось" */
.docs-menu .platforms-panel .platforms-title{
  background: transparent !important;
  border-radius: 0 !important;
  transform: none !important;
  transition: transform 0.2s ease;
}


/* активный пункт меню */
.docs-menu a.is-active{
  position: relative;
  font-weight: 600;
  z-index: 1; /* текст всегда поверх */
  background: none !important;
}

/* фон выделения */
.docs-menu a.is-active::before{
  content: "";
  position: absolute;
  z-index: -1; /* <<< ВАЖНО: фон уходит ПОД текст */

  top: -8px;
  bottom: -8px;
  left: -10px;
  right: -10px;

  border-radius: 12px;

  background: linear-gradient(
    90deg,
    rgba(255,255,255,0.95),
    rgba(255,255,255,0)
  );

  pointer-events: none;
}


/* ===== Mobile tweaks ===== */
@media (max-width: 767px){

  :root{
    --platforms-gap: 12px;
  }
  
  /* 1) Платформы: иконки меньше */
  .platforms-icon img.custom-icon{
    width: 24px;   /* было 32px, подстрой при желании: 22–26px */
  }

  /* 2) Активный пункт: выделение по высоте уже */
  .docs-menu a.is-active::before{
    top: -4px;      /* было -8px */
    bottom: -4px;   /* было -8px */
    left: -8px;     /* можно чуть меньше, чтобы аккуратнее смотрелось */
    right: -8px;
    border-radius: 10px;
  }

  /* 3) Больше воздуха между разделами меню */
  .docs-menu li{
    margin-bottom: 12px; /* на мобилке у тебя было 0 — делаем больше */
  }
}
