﻿/* Основные стили для компонентов */
body {
  font-family: 'Inter', sans-serif;
  line-height: 1.6;
  background-color: #f9fafb;
  color: #111827;
  margin: 0;
  padding: 0;
}
footer {
  text-align: left;
  padding: 20px;
  background-color: none;
  color: white;
  position: relative;
  margin-left: 220px;
}
@media (max-width: 959px) {
  footer {
    margin-left: 0 !important;
  }
}
/* Стили для заголовков */
h1 {
  font-size: 2.5rem; /* Размер шрифта */
  font-weight: bold; /* Жирность */
  margin-bottom: 20px; /* Отступ снизу */
  color: #333; /* Цвет текста */
}

h2 {
  font-size: 2rem;
  font-weight: bold;
  margin-bottom: 15px;
  color: #555;
}

h3 {
  font-size: 1.25rem; /* Размер шрифта */
  font-weight: 600; /* Полужирный текст */
  margin-bottom: 10px; /* Отступ снизу */
  color: #444; /* Цвет текста */
}

p {
  font-size: 1rem;
  line-height: 1.5; /* Межстрочный интервал */
  color: #666;
}

small {
  font-size: 0.875rem;
  color: #999;
}

strong {
  font-weight: bold;
  color: #000;
}

header, nav {
  background-color: #fff;
  padding: 10px;
}

input, textarea {
  box-sizing: border-box; /* Учитывать границы и отступы в ширине */
}
/* Фиксированная шапка (main-header) */
.main-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 40px;
  background-color: #fff;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
}

/* Основной стиль для main-header */
.main-header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Пространство между элементами */
  padding: 0 20px;
  height: 60px;
  background-color: #fff;
  border-bottom: 1px solid #ddd;
}

/* Навигация в шапке */
  .main-nav {
    display: none; /* по умолчанию скрыта на мобильных */
    /*position: absolute;*/
    background-color: #fff;
    /*flex-direction: column;*/
    padding: 10px 0;
    z-index: 1000;
	color: white;
  }

  .main-nav.active {
    display: flex; /* появляется при активации */
  }

.main-nav .nav-link {
  color: #333;  /* Темно-серый текст */
  text-decoration: none;
  font-weight: 500;
  padding: 5px 10px;
}

.main-nav .nav-link:hover {
  text-decoration: underline;  /* Подчеркивание при наведении */
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  
}
.main-nav .nav-link.active {
  font-weight: 600;
  color: #007bff; /* Синий цвет для активной ссылки */
  bottom: 2px solid #007bff; /* Синяя линия под активной ссылкой */
  background-color: rgba(0, 123, 255, 0.1); /* Светлый синий фон */
  border-radius: 4px; /* Скругленные углы */
  padding: 5px 10px; /* Отступы вокруг текста*/ 
}

/* Дополнительное меню справа */
.extra-menu {
  display: flex;
  gap: 15px;
}
.extra-menu .menu-link {
  text-decoration: none;
  color: #007bff;
  font-weight: 500;
}

.extra-menu .menu-link:hover {
  text-decoration: underline;
}

/* Скрыть extra-menu в мобильной версии */
@media (max-width: 768px) {
  .extra-menu {
    display: none; /* Скрыть меню */
  }
}

.sub-nav {
  background-color: #fff;
  padding: 10px;
  width: 200px;
  position: fixed;
  top: 60px; /* под фиксированным header */
  bottom: 0;
  left: -220px; /* прячем за левым краем */
  transition: left 0.3s ease; /* добавляем анимацию */
  z-index: 999; /* поверх overlay */
  overflow-y: hidden; /* по умолчанию скрываем скролл */
}

/* Активное состояние sub-nav */
.sub-nav.active {
  left: 0; /* выехать на экран */
  overflow-y: auto; /* показываем скролл при наведении */
}

/* При наведении на sub-nav появляется прокрутка */
.sub-nav:hover {
  overflow-y: auto; /* показываем скролл при наведении */
}

.sub-nav ul {
  list-style: none;
  padding: 0;
}

.sub-nav li {
  /*margin-bottom: 10px;*/
  /*margin-left: 20px;*/
  padding: 0 15px 0;
}

.sub-nav a {
  color: #333;
  text-decoration: none;
}

.sub-nav a:hover {
  color: #007bff;
}

.sub-nav .nav-link {
  color: #666666; /* спокойный тёмно-серый */
  text-decoration: none;
  padding: 8px 12px;
  display: block;
  transition: color 0.3s, background-color 0.3s, border-left-color 0.3s;
}

.sub-nav .nav-link.active {
  color: #222; /*черный */
  font-weight: 500;
  border-left: 2px solid #b8b8b8; /* серый акцент слева */
  background-color: rgba(176, 176, 176, 0.1); /* светлый серый фон */
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

.component-section {
  /*margin-left: 220px;*/
  padding: 20px;
  margin-top: 20px;
}
/* Добавляем отступ сверху для якорных ссылок */
.component-section::before {
  content: '';
  display: block;
  height: 60px; /* Высота отступа */
  margin-top: 0px; /* Смещение вверх на ту же высоту */
  visibility: hidden;
}

h2 {
  font-size: 1.5rem;
}

.component-example {
  margin-top: 10px;
}

/* Основной стиль для списка компонентов */
.components-list {
  padding: 0px 20px 20px;
  margin-top: 60px; /* Отступ от хедера */
}

/* Для десктопной версии: сдвигаем components-list вправо */
@media (min-width: 769px) {
  .components-list {
    margin-left: 220px; /* Сдвигаем вправо, чтобы не было наложения с меню */
  }
}

/* Для мобильной версии сохраняем текущие стили */
@media (max-width: 768px) {
  .components-list {
    margin-left: 0; /* Нет отступа слева для мобильной версии */
    padding: 40px 20px 20px; /* Добавим отступы как в текущей версии */
  }
}

/* Media Queries */
@media (min-width: 769px) {
  .main-nav {
    display: flex; /* Меню всегда открыто на больших экранах */
	margin-left: 10px;
  }

  .sub-nav {
    left: 0; /* Подменю всегда открыто на больших экранах */
  }

  .burger {
    display: none; /* Скрываем бургер на больших экранах */
  }

  .overlay {
    display: none; /* Скрываем overlay на больших экранах */
  }
}

@media (max-width: 768px) {
  .burger {
    display: block; /* Показываем бургер только на маленьких экранах */
  }

  .sub-nav {
    position: fixed;
    top: 60px;
    left: 0; /* скрыто слева */
    height: calc(100% - 60px);
    background-color: #fff;
    width: 200px;
    padding: 10px;
    transition: left 0.3s ease;
    z-index: 999;
    overflow-y: hidden; /* по умолчанию скрываем скролл */
  }
  
  .sub-nav.active {
    left: 0; /* показать панель */
    overflow-y: auto; /* показываем скролл при наведении */
  }
  
  .sub-nav:hover {
    overflow-y: auto; /* показываем скролл при наведении */
  }
  
  .components-list {
    margin-left: 0;
    padding: 40px 20px 20px;
  }
}


/* Стили для кнопок */

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem; /* 20px, можно изменить по вкусу */
  align-items: center;
}
.btn-primary {
  background-color: #007bff;
  color: #fff;
  border: none;
  text-align: center;
  text-decoration: none; /* Убираем подчёркивание */
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px; /* Расстояние между текстом и иконкой */
  justify-content: center; /* Выравнивание по горизонтали */
  display: inline-block;
  margin-bottom: 10px;
}

.btn-primary .icon {
  display: inline-block;
  vertical-align: middle;
}
.btn-primary:hover {
  background-color: #0056b3;
}

.btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Secondary Button */
.btn-secondary-test {
  background-color: #f4f4f4;
  color: #333;
  border: 1px solid #bdbdbd;
  text-align: center;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 500;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  margin-bottom: 10px;
}

.btn-secondary-test:hover,
.btn-secondary-test:focus {
  background-color: #e9ecef;
  color: #222;
  border-color: #a0a0a0;
}

/* Success Button */
.btn-success {
  background-color: #28a745;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-success:hover {
  background-color: #218838;
}

/* Warning Button */
.btn-warning {
  background-color: #ffc107;
  color: #333;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-warning:hover {
  background-color: #e0a800;
}

/* Error Button */
.btn-error {
  background-color: #dc3545;
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.btn-error:hover {
  background-color: #c82333;
}

/* Card */
.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 40px;
}

.card {
  flex: 1 1 300px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  transition: box-shadow 0.3s ease;
  background-color: #ffffff;
}

.card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.card-img {
  width: 100%;
  height: auto;
  border-radius: 5px;
}

.card-body {
  padding: 10px;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card-text {
  font-size: 1rem;
  color: #555555;
}

.card button {
  background-color: #007bff;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
}

/* Tooltip */
.btn-primary[title] {
  position: relative;
}

.btn-primary[title]:hover::after {
  content: attr(title);
  position: absolute;
  top: -35px; /* Увеличиваем отступ, чтобы плашка была выше */
  left: 50%;
  transform: translateX(-50%);
  background-color: rgb(23, 23, 23);
  color: white;
  padding: 8px 10px;
  border-radius: 3px;
  font-size: 0.8rem;
  white-space: nowrap;
}

.alerts {
  margin-top: 40px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.alert {
  padding: 15px 20px;
  border-radius: 6px;
  font-size: 1rem;
  color: #ffffff;
}

.alert.success {
  background-color: #4caf50;
}

.alert.error {
  background-color: #f44336;
}

.alert.info {
  background-color: #2196f3;
}

.switch-section {
  margin-top: 40px;
}

.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0;
  right: 0; bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}


.switch input:checked + .slider {
  background-color: #b83333;
}

.switch input:checked + .slider:before {
  transform: translateX(26px);
}

.modal-section {
  margin-top: 40px;
}

.open-modal-btn {
  background-color: #4caf50;
  color: white;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  font-size: 16px;
}

/* Стили для модального окна */
.modal {
  display: none; /* Скрыто по умолчанию */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Полупрозрачный фон */
  z-index: 1000;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  width: 80%;
  max-width: 500px;
}

.modal .close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 1.5rem;
  cursor: pointer;
}

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

.close:hover {
  color: black;
}

.tabs-section {
  margin-top: 40px;
}

.tabs {
  display: flex;
  gap: 10px;
}

.tab-link {
  padding: 10px 20px;
  background-color: #eee;
  border: none;
  cursor: pointer;
  font-size: 16px;
  border-radius: 6px 6px 0 0;
}

.tab-link.active {
  background-color: #4caf50;
  color: white;
}

.tab-content {
  display: none;
  padding: 20px;
  border: 1px solid #ddd;
  border-top: none;
  background-color: #f9f9f9;
}

.accordion-section {
  margin-top: 40px;
}

.accordion {
  background-color: #eee;
  color: #444;
  cursor: pointer;
  padding: 14px 20px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  font-size: 16px;
  transition: background-color 0.2s ease;
  border-radius: 6px;
  margin-bottom: 5px;
}

.accordion.active, .accordion:hover {
  background-color: #ccc;
}

.panel {
  padding: 0 20px;
  background-color: white;
  display: none;
  overflow: hidden;
  border: 1px solid #ddd;
  border-radius: 0 0 6px 6px;
  margin-bottom: 10px;
}

/* Стили для логотипа */
.logo {
  display: flex;
  align-items: center;
  gap: 10px; /* Расстояние между логотипом и текстом */
  height: 100%; /* Растянуть по высоте заголовка */
}

.logo-img {
  height: 40px; /* Высота SVG или изображения */
  width: auto; /* Автоматическая ширина */
}

.logo-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1; /* Убираем лишние отступы */
}

.logo-title {
  font-size: 1.2rem; /* Размер текста заголовка */
  font-weight: bold;
  color: #333;
}

.logo-subtitle {
  font-size: 0.8rem; /* Размер текста подписи */
  color: #666;
}


/* Кнопка бургер */
.burger {
  display: none; /* по умолчанию скрыта */
  background: none;
  border: none;
  font-size: 18px;
  color: #333;
 
  cursor: pointer;
  z-index: 1001; /* поверх хедера */
}

/* Скрыть логотип, если активен класс .burger-active */
@media (max-width: 768px) {
  .main-header.burger-active .logo {
    display: none; /* Скрыть логотип */
  }
  
  .main-header .burger {
    position: relative;
    z-index: 1000; /* Убедиться, что бургер всегда виден */
  }
}

/* Уменьшение отступов в меню на мобильных устройствах */
@media (max-width: 768px) {
  .main-header {
    padding: 0 10px; /* Уменьшаем отступы по краям */
  }

  .main-nav .nav-link {
    padding: 5px 8px; /* Уменьшаем внутренние отступы ссылок */
    font-size: 0.9rem; /* Уменьшаем размер текста, если нужно */
  }

  .extra-menu {
    padding: 0 10px; /* Уменьшаем отступы для дополнительного меню */
  }
}

/* Мобильная версия */
@media (max-width: 768px) {
  .burger {
    display: block;
  }
  
  .sub-nav {
    position: fixed;
    top: 60px;
    left: -220px; /* скрыто слева */
    height: calc(100% - 60px);
    background-color: #fff;
    width: 200px;
    padding: 0px 10px;
    transition: left 0.3s ease;
    z-index: 999;
  }
  
  .sub-nav.active {
    left: 0; /* показать панель */
  }
  
  .components-list {
    margin-left: 0;
    padding: 0px 20px 20px;
  }
}

/* Оверлей */
.overlay {
  position: fixed;
  top: 60px; /* ниже фиксированного header */
  left: 0;
  width: 100%;
  height: calc(100% - 60px);
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 998;
}

.overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Стили для Spinner */
.spinner {
  width: 40px; /* Ширина спиннера */
  height: 40px; /* Высота спиннера */
  border: 4px solid rgba(0, 0, 0, 0.1); /* Лёгкая граница */
  border-top: 4px solid #007bff; /* Цвет активной части */
  border-radius: 50%; /* Круглая форма */
  animation: spin 1s linear infinite; /* Анимация вращения */
}

/* Анимация вращения */
@keyframes spin {
  0% {
    transform: rotate(0deg); /* Начальное положение */
  }
  100% {
    transform: rotate(360deg); /* Полный оборот */
  }
}

/* Стили для статусных Badge */
.badge {
  display: inline-block;
  padding: 5px 10px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  border-radius: 12px;
}

.badge-success {
  background-color: #30a46c;
}

.badge-warning {
  background-color: #ffc53d;
  color:#21201c;
}
.badge-error {
  background-color: #e5484d;
}
.badge-info {
  background-color: #1890ff;
}
.badge-secondary {
  background-color: #6c757d;
}
.badge-light {
  background-color: #f8f9fa;
  color: #212529;
}
.badge-dark {
  background-color: #343a40;
  color: #fff;
}
.badge-primary {
  background-color: #007bff;
  color: #fff;
}
.badge-outline {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
}
.badge-outline-success {
  background-color: transparent;
  border: 1px solid #30a46c;
  color: #30a46c;
}
.badge-outline-warning {
  background-color: transparent;
  border: 1px solid #edce7d;
  color: #ab6400;
}
.badge-outline-error {
  background-color: transparent;
  border: 1px solid #e5484d;
  color: #e5484d;
}
.badge-outline-info {
  background-color: transparent;
  border: 1px solid #1890ff;
  color: #1890ff;
}
.badge-outline-secondary {
  background-color: transparent;
  border: 1px solid #6c757d;
  color: #6c757d;
}
.badge-outline-light {
  background-color: transparent;
  border: 1px solid #f8f9fa;
  color: #f8f9fa;
}
.badge-outline-dark {
  background-color: transparent;
  border: 1px solid #343a40;
  color: #343a40;
}
.badge-outline-primary {
  background-color: transparent;
  border: 1px solid #007bff;
  color: #007bff;
}
/* Стили для формы */
.form-group {
  margin-bottom: 20px;
}
.form-label {
  font-weight: bold;
  margin-bottom: 5px;
} 

.form-control {
  width: 100%;
  padding: 10px;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.form-control:focus {
  border-color: #007bff;
  outline: none;
  box-shadow: 0 0 4px rgba(0, 123, 255, 0.5);
}

.icon-set {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.icon-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  font-size: 0.875rem;
  color: #333;
}

.icon {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
  fill: currentColor;
}

.small-icon {
  width: 20px;
  height: 20px;
  margin-bottom: 0px;
}

/* Стили для h4 */
h4 {
  font-size: 1.125rem; /* Размер шрифта */
  font-weight: 600; /* Полужирный текст */
  margin-bottom: 8px; /* Отступ снизу */
  color: #555; /* Цвет текста */
}

/* Стили для h5 */
h5 {
  font-size: 1rem; /* Размер шрифта */
  font-weight: 500; /* Средний вес текста */
  margin-bottom: 6px; /* Отступ снизу */
  color: #666; /* Цвет текста */
}

/* Стили для h6 */
h6 {
  font-size: 0.875rem; /* Размер шрифта */
  font-weight: 500; /* Средний вес текста */
  margin-bottom: 4px; /* Отступ снизу */
  color: #777; /* Цвет текста */
}
/* Стили для типографики */
h1, h2, h3, h4, h5, h6 {
  margin-bottom: 10px;
}

p {
  margin-bottom: 15px;
}

blockquote {
  margin: 20px 0;
  padding: 10px 20px;
  background-color: #f9f9f9;
  border-left: 5px solid #ccc;
  font-style: italic;
}

ul, ol {
  margin: 15px 0;
  padding-left: 20px;
}

code {
  background-color: #f4f4f4;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: monospace;
}

pre {
  background-color: #f4f4f4;
  padding: 10px;
  border-radius: 4px;
  overflow-x: auto;
}
/* Стили для цветовой палитры */
.color-palette {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.color-swatch {
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.875rem;
  font-weight: bold;
  text-align: center;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Градиентная подложка для секций */
#Trigger, #form, #HR {
  background: linear-gradient(135deg, #f3e7e9, #e3eeff); /* Мягкий градиент */
  padding: 2rem; /* Внутренние отступы */
  border-radius: 12px; /* Скруглённые углы */
  /*box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Лёгкая тень */
  margin-bottom: 2rem; /* Отступ снизу */
  padding-bottom: 8rem;
}

.btn-secondary {
  background-color: #6c757d;
  color: #fff;
  border: none;
  text-align: center;
  text-decoration: none;
  display: inline-block;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  border-radius: 4px;
  transition: background-color 0.3s;
}

.btn-secondary:hover {
  background-color: #5a6268;
}
