@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  src: url('JetBrainsMono-Regular.ttf') format('truetype');
}


@font-face {
  font-family: 'GolosUI';
  font-style: normal;
  font-weight: 700;
  src: url('golos-ui_bold.ttf') format('truetype');
}

@font-face {
  font-family: 'GolosUI';
  font-style: normal;
  font-weight: 500;
  src: url('golos-ui_regular.ttf') format('truetype');
}


@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  src: url('JetBrainsMono-Medium.ttf') format('truetype');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  src: url('JetBrainsMono-Bold.ttf') format('truetype');
}


@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 300; /* Толщина для Light версии */
  src: url('JetBrainsMono-Light.ttf') format('truetype');
}


body, .btn-container, #toggle-buttons {
    display: flex;
    background-color: #f2f2ee;
  }

body {
    padding: 0;
    padding-left: 280px; /* Отступ для sidebar */
    flex-direction: column;
    align-items: flex-start; 
    height: 100vh; 
    font-family: 'JetBrains Mono', "Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
    font-weight: 300;
    background-color: rgba(242, 242, 238, 1);
    margin: 0;
    width: 100%;
    overflow-x: hidden; /* Запрещаем горизонтальный скролл */
    transition: padding-left 0.3s ease; /* Плавный переход при сворачивании */
}

body.sidebar-collapsed {
    padding-left: 0; /* Убираем отступ когда sidebar свернут */
}

/* Десктоп версия - отступы и ширина 95% */
@media (min-width: 601px) {
  body {
    margin-left: 2em;
    width: 95%;
  }
  
  .btn-container, #toggle-buttons {
    width: 95%;
  }
}

/* ===== Article pages ===== */
main {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px;
}

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 320px;
  gap: 24px;
}

.article-content { min-width: 0; }

.article-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 100px; /* опускаем ниже уровня заголовка */
  height: calc(100vh - 120px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  /* скрываем визуальный скролл */
  scrollbar-width: none;          /* Firefox */
  -ms-overflow-style: none;       /* IE/Edge */
}

.article-aside::-webkit-scrollbar { display: none; } /* Chrome/Safari */

.screenshot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.screenshot figcaption {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.article-cover {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 12px 0 18px;
  box-shadow: 3px -1px 10px #e5e5e5;
}

main h1, main h2, main h3 {
  font-family: GolosUI,"Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
}

main h1 {
  font-weight: 700;
}

main p, main li {
  font-family: 'JetBrains Mono', "Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  margin-bottom: 14px;
}

main .btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 6px;
  background: #ffffff;
}

/* CTA buttons */
.btn-cta {
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px; border-radius:6px;
  background:#000; color:#fff !important; text-decoration:none;
}
.btn-cta:hover { background: #111; }
.cta-group { display: flex; gap: 12px; flex-wrap: wrap; margin: 12px 0 18px; }

/* Notes under screenshots */
.screenshot-note { font-size: 12px; color: #444; margin-top: 4px; }

button, .btn {
    cursor: pointer;
    border: none;
    background-color: #ffffff;
    margin: 5px;
    padding: 10px 12px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 16px;
}

button, .btn:hover {

    background-color: #fafafa;
}

button:disabled span, .btn:disabled span {
    color: #b3b0ad; цвета */
}

button span, .btn span {
    color: black; 
}

button, .btn {
    color: #000000; /* Черный цвет текста */
    background-color: #ffffff; /* Белый цвет фона */
}

#menuDropdown {
  font-family: GolosUI,"Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
  
}
#title {
  font-weight: 700;
}

#toggle-buttons button:first-child {
    margin-left: 0;
}

#toggle-buttons {
margin-bottom: 10px;
  font-family: GolosUI,"Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
  font-weight: 500;
}

h3 {
    margin-top: 20px;
  font-family: GolosUI,"Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
  font-weight: 700;
}

#input-area::placeholder {
  color: #b3b3b3;
}


#input-area, #output-area {
    padding: 1.0em 1.5em;
    border-radius: 6px;
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 150%;
    overflow-wrap: break-word;
    word-wrap: break-word;
    font-family: inherit;
    width: 95%;
    overflow-y: visible; /* Позволяет содержимому выходить за пределы элемента */
  min-height: 90%;
  margin-bottom: 30px;
  }
}






#input-area {
    background: #FFF;
}

.btn-icon {
    font-size: 18px;
    /* margin-bottom: 5px;
    height: 30px; */
  margin-right: 8px;
}

.word {
    white-space: nowrap;
}

.word.transformable:hover {
    cursor: pointer;
    transition: color 0.3s;
    color: #ff0000;
    background-color: #e9e8e7;
    box-shadow: 0 0 0 2px #e9e8e7;
    border-radius: 2px;
    padding: 2px;
    margin: -2px;
}

.word.non-transformable {
    cursor: default;
}
.menu-dropdown {
    position: fixed;
    top: 0;
    right: 0;
    height: 100%;
    width: 350px; /* Adjust width as necessary */
    background-color: #ffffff;
    border: 1px solid #ccc;
  box-shadow: 13px 5px 0px 18px rgb(0 0 0 / 3%);
    z-index: 101;
    display: none; /* Controlled by JavaScript to show/hide */
  padding-bottom: 50px;
}

.option a {
    color: black;
    padding: 16px;
    text-decoration: none;
    text-align: left;
    margin: 0px 0px;
    padding: 10px;
    /* background: radial-gradient(#c8ffd6, #dff6f0); */
    border-radius: 8px;

  }



.menu-dropdown, {
    display: none;
}

.menu-dropdown > a {
    color: black;
    padding: 16px;
    text-decoration: none;
    display: flex;
    text-align: left;
}

.menu-dropdown a:hover {
  transition: color 0.3s;
  color: #ff0000;
}

.menu-dropdown a:last-child {
    border-bottom: none;
}

.option:hover {
    background-color: #f1f1f1;
  
}

.option:active {
  box-shadow: 0px 0px 2px #3e3e3e4d;
}


.option {
border-radius: 8px;
  background: #f8f8f8;
  color: #001b32;
  box-shadow: 0px 2px 2px #3e3e3e4d;
  padding: 0px 18px;
  
}

.option h4 {
  margin: 4px 0px;
  
}
.option p{
  margin: 10px 0px;
}

.option {

  margin: 5px 0px;
}

.payment-options {
  display: flex;
  justify-content: center;
  flex-direction: column;
  /* ... другие стили для опций оплаты */
}


/*.modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}
*/

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}


/*@media (min-width: 601px) {

  
    #toggle-buttons {
        box-sizing: border-box;
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        z-index: 90;
        background-color: #f2f2ee;
        margin-bottom: 10px;
    }

    .topmenu {
        justify-content: space-between;
        align-items: center;
        position: relative;
    }
}
  */
#exampleListContainer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100%;
    background-color: #fff;
    overflow-y: auto;
   border: 1px solid #ccc;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);

  z-index: 120;
}
/* Класс для активного состояния */
#exampleListContainer.active {
    right: 0;
    bottom: 0;
}

@media (max-width: 600px) {
  .article-layout { grid-template-columns: 1fr; }
  .article-aside { order: 2; }
  .article-content { order: 1; }
    body {
        font-size: 18px;
        margin: 0;
      height: auto;
    }

  .btn {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 71px; /* или ваша фиксированная высота */
  }

  #toggle-buttons .btn span:not(.btn-icon) {
    display: none;
  }

  body, .btn-container, #toggle-buttons {
    width: 100%;
    box-sizing: border-box;
  }
  
  .btn-container {
    display: flex;
    width: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  .buttons {
      background-color: rgba(242, 242, 238, 1);
      border-radius: 0px;
      position: fixed;
      width: 100%;
      bottom: 0px;
      margin-right: 0px;
      padding-bottom: 0px;
      margin-bottom: 0px;
      z-index: 2;
  }
  
  .menu-dropdown, #toggle-buttons, #input-area, #output-area, .btn {
      width: 100%;
      padding: 0;
      margin: 0;
  }
  
 .menu-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
    }

  .menu-dropdown {
    max-height: 80%;
  }

  h3 {
    display: none;
  }
  #exampleListContainer.active {
height:auto;
  }

  .language-selector {
    position: relative !important;

  }
  
    #exampleListContainer {
        top: auto;
        bottom: -100%; /* изначально шторка полностью скрыта снизу */
        right: 0;
        width: 100%; /* шириной на весь экран */
        height: 80vh; /* высота равна 80% от высоты экрана, но вы можете установить другое значение по желанию */
        transition: bottom 0.1s ease;
    }
  
    #toggle-buttons {
      background-color: rgba(242, 242, 238, 1);
        border-radius: 0px;
        position: fixed;
        width: 100%;
        bottom: 0px;
        left: 0;
        right: 0;
        margin: 0;
        padding: 0;
        z-index: 2;
        border-top: 1px #e5e5e5 solid;
        box-sizing: border-box;
    }

    #input-area, #output-area {
        width: 100%;
        box-sizing: border-box;
        padding: 0.9em 0.9em;
        border-radius: 0;
      padding-bottom: 70px;
    }

    .btn, #toggle-buttons .btn {
        border-radius: 0;
        font-size: 14px;
        padding: 4px;
        margin: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        flex: 1;
        min-width: 0;
        box-sizing: border-box;
    }

    .btn-icon {
        font-size: 24px;
        margin-bottom: 5px;
    }

    .menu-dropdown {
        display: block;
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
    z-index:1000;
      width: auto;
      box-shadow: 0px 5px 0px 10px rgb(0 0 0 / 3%);
    }

 

    .topmenu {
        flex-direction: column;
        width: -webkit-fill-available;
    }

    button:disabled, .btn:disabled {
        cursor: default;
        background-color: #ffffff;
    }
  

  #input-area {
    height: calc(100vh - 73px); /* 100vh - высота видимой части экрана, 50px - высота toggle-buttons */
  }

  
}

/* Tablets / small laptops */
@media (min-width: 601px) and (max-width: 980px) {
  .article-layout { grid-template-columns: 1fr 280px; }
}

.overlay {
  display: none; /* Скрыто по умолчанию */
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.1); /* Полупрозрачный фон */
  z-index: 100; /* Должен быть выше, чем у модального окна */
  
  
}
.language-selector {
  display: flex;
  justify-content: space-between;
  background-color: #ffffff; /* или другой подходящий фон */
  border-top: 1px solid #e1e1e1;
  border-bottom: 1px solid #e1e1e1;
  position: inherit;
  bottom: 0;
  width: inherit;
}

.language-btn {
  flex: 1;  /* каждая кнопка будет занимать равное пространство */
  border: none;
  background-color: transparent;
  cursor: pointer;
  padding: 10px 0;
  font-size: 16px;
  border-right: 1px solid #ccc;  /* вертикальные разделители между кнопками */
  border-radius:0;
  margin: 0;
}

.language-btn:last-child {
  border-right: none;  /* у последней кнопки убираем разделитель справа */
}



.language-btn:hover {
  background-color: #f7f7f7;  /* цвет фона при наведении */
}

.dropdown-toggle::after {
    content: "▼"; /* Символ шеврона */
    font-size: 0.8em;
    position: absolute;
    right: 16px; /* Отступ справа, настройте по вашему усмотрению */
    top: 50%;
    transform: translateY(-50%);
}

.dropdown-toggle.open::after {
    content: "▲"; /* Символ шеврона вверх */
}


.dropdown-toggle {
    position: relative; /* Для позиционирования псевдоэлемента относительно ссылки */
    padding-right: 32px; /* Добавьте дополнительный отступ справа, чтобы шеврон не перекрывал текст */
}


.dropdown-content {
  display: none;
  /* Остальные стили для дропдаунов */
}

#howToUseContent, #supportModal, #exampleList, #historyList, #favoritesList {
  margin: 0px 18px 12px;
  line-height: 22px;
  font-size: 14px;
}

#supportModal p{

margin-top: 4px;
  
}
.menu-dropdown {
    overflow-y: auto;  /* Автоматически показывать скролл, если содержимое превышает max-height */
}

*, *::before, *::after {
    box-sizing: border-box;
}


#exampleList, #historyList, #favoritesList {
  list-style-type: none; /* убираем маркеры списка */
  padding-left: 0px;
}


/* Стили для элементов списка */
#exampleList li, #historyList li, #favoritesList li {
    padding: 6px 10px; /* отступы внутри каждого элемента списка */
color: #3d1c00;
  cursor:default;
  margin: 2px;
  /* display: inline-block; */

  
}

/* Стили для элементов списка при наведении */
#exampleList li:hover, #historyList li:hover, #favoritesList li:hover {
  transition: color 0.3s;
  color: #ff0000;
  background-color: #f5f5f5;
  border-radius: 6px;
}

@media screen and (min-width: 768px) {
    .fixed-menu {
        position: fixed;
        top: 0;
        width: 100%;
        z-index: 100;
        /* Остальные стили для фиксированного меню */
    }
}


#saveSessionDropdown {
    display: none;
}


/* L O G I N
 */
/* #loginDropdown {
    padding: 10px;
    border: 1px solid #ccc;
    background-color: white;
    position: absolute;
    right: 0;
}

#emailLoginInput, #sendLinkButton {
    width: 100%;
    margin-bottom: 10px;
}
 */

#historyList {
    display: block; /* или другое подходящее значение */
    visibility: visible;
}

.history-text {
  /* Стили для текста */
}

.history-date, .favorites-date {
  color: gray;
  margin-top: 2px; /* небольшой отступ сверху */
  font-size: 12px;
}

.history-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.text-date-container {
    /* display: flex; */
    justify-content: space-between; /* Распределяет пространство между элементами */
    align-items: center; /* Центрирует элементы по вертикали */
    width: 100%; /* Задает полную ширину контейнера */
}

.history-text, .history-date {
    margin-right: 10px; /* Добавляет отступ справа для текста и даты */
}

.favorite-checkbox {
  margin-left: auto; /* Это свойство выровняет чекбокс по правому краю */
}

/* Скрываем оригинальный чекбокс */
.favorite-checkbox {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  /* width: 12px; /* Размер вашего кастомного чекбокса */
  /* height: 24px; */ */
  cursor: pointer;
  border: 0;
  background-color: transparent;
  /* padding: 6px; */
  margin: auto;
}

/* Создаем звездочку, когда чекбокс не отмечен */
.favorite-checkbox::before {
  content: url('/checked.svg');
  /* position: absolute; */
  width: 15px;
  top: 0;
  left: 0;
  font-size: 28px; /* Размер вашего кастомного чекбокса */
  color: #171717; /* Цвет звездочки */
  background-size: contain;
    background-repeat: no-repeat;
}

/* Меняем звездочку, когда чекбокс отмечен */
.favorite-checkbox:checked::before {
  content: url('/unchecked.svg');
  color: #353431; /* Цвет закрашенной звездочки */
}

.favorite-popup, .notification-popup {
  display: none;
  position: absolute;
  /* Подстройте эти значения, чтобы сообщение отображалось рядом с кнопкой */
  top: 90px;
  background-color: #f4f8ef;
  padding: 5px;
  /* border-radius: 5px; */
  /* Для корректного отображения на мобильных устройствах */
  z-index: 100;
  width: 100%;
  /* Добавлено для центрирования текста */
  display: flex; /* Используем flexbox */
  justify-content: center; /* Центрирование по горизонтали */
  align-items: center; /* Центрирование по вертикали */
  height: 50px; /* Задаем высоту блока */
}

.actions {
  display: flex;
  justify-content: space-between;
}

.actions > * {
  flex-grow: 1;
  text-align: center;
}

#clear-textarea {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  /* другие стили для иконки крестика */
}


.btn2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  background-color: #f0f0f0; /* Пример цвета фона кнопки */
  border-radius: 5px; /* Скругление углов кнопки */
}

.btn-icon2 {
  /* font-size: 24px; /* Размер иконки */ */
  margin-bottom: 5px; /* Отступ снизу от иконки */
}

.btn-icon-menu {
  margin-right: 8px;
  align-items: center;
  display: flex;
}

#Newtext, #addtofavorites, #share {
  font-size: 14px; /* Размер текста под иконкой */
  padding-top: 6px;
}

#share {
padding-top: 0px;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    max-height: 100px; /* Максимальная высота должна быть достаточной для пункта меню */
  }
  to {
    opacity: 0;
    max-height: 0;
  }
}

@keyframes fadeOutFadeIn {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.fade-animation {
    animation: fadeOutFadeIn 1s ease-in-out;
}



.favorite-item {
  display: flex; /* Используем flexbox для выравнивания элементов */
  align-items: center; /* Выравниваем элементы по центру по вертикали */
  justify-content: space-between; /* Распределяем пространство между контейнером текста/даты и иконкой */


  transition: opacity 1s, transform 1s, margin-bottom 1s; /* Увеличиваем время анимации до 1 секунды */
  opacity: 1;
}

.favorite-item.hide {
  animation: fadeOut 1s forwards; /* forwards гарантирует, что элемент останется в конечном состоянии анимации */
}

.empty-message {
  display: none;
}

#historyList:empty + .empty-message,
#favoritesList:empty + .empty-message {
  display: block;
  color: gray;
  font-size: 14px;
  margin: -8px 18px 13px;
}


.actions {
  position: sticky; /* Фиксируем блок в верхней части */
  top: 0; /* Прикрепляем к верху контейнера */
  background: white; /* Фон, чтобы содержимое под блоком не просвечивало через него */
  z-index: 100; /* Устанавливаем z-index, чтобы блок был поверх остального содержимого */
}

.menu-dropdown > :not(.actions) {
  margin-top: 2px; /* Задаем отступ для остального содержимого */
}



.btn2 {
  transition: background-color 0.5s; /* Плавное изменение фона */
}

.btn2-green {
  background-color: #dfecd0; /* Цвет фона при активации */
}



/* Компактный блок App Store */
.appstore-compact {
    background: transparent;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    min-height: 120px;
}

.appstore-compact:hover {
    opacity: 0.8;
}

.appstore-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    height: 100%;
}

.appstore-left {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 50%;
    flex-shrink: 0;
}

.store-badge {
    height: 60px;
    width: auto;
    align-self: flex-start;
    margin-top: 8px;
}

.promo-right {
    width: 50%;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.promo-banner {
    width: auto;
    height: auto;
    max-height: 160px;
    object-fit: cover;
}

@media (max-width: 600px) {
    .appstore-compact {
        padding: 12px 16px;
        min-height: 100px;
    }
    
    .appstore-content {
        gap: 12px;
    }
    
    .appstore-left {
        gap: 8px;
        width: 50%;
    }
    
    .store-badge {
        height: 44px;
    }
    
    .promo-right {
        width: 50%;
    }
    .promo-banner {
        width: auto;
        height: auto;
        object-fit: cover;
    }
    
    .appstore-text {
        font-size: 13px;
        line-height: 1.3;
    }
}

.appstore-icon {
    height: 48px;
    width: auto;
    flex-shrink: 0;
    order: 1; /* На десктопе кнопка первая */
}

.appstore-text {
    color: black;
    font-family: 'GolosUI', "Roboto Mono", monospace, "PT Mono", "Courier New", "Courier", "Helvetica Neue", Arial, sans-serif;
    font-weight: 500;
    font-size: 16px;
    line-height: 1.3;
    order: 2; /* На десктопе текст второй */
}

@media (max-width: 600px) {
    .appstore-compact {
        border-radius: 0;
        padding: 0px 20px;
        margin-bottom: 12px;
        width: 100%;
    }
    
    .appstore-icon {
        height: 52px;
        order: 2; /* На мобиле кнопка вторая (справа) */
    }
    
    .appstore-text {
        font-size: 15px;
        order: 1; /* На мобиле текст первый (слева) */
    }
    
    .appstore-content {
        gap: 14px;
    }
}



