/* === Бургер: компактный серый, с белыми полосками === */

/* === Заголовок по центру === */
.page-title {
  font-size: 1.2rem;       /* адаптируется под базовый размер шрифта */
  margin-top: 6vh;         /* отступ сверху в % от высоты экрана */
  margin-bottom: 2vh;
  text-align: center;      /* центрирование текста */
  font-weight: 600;
  color: #111;
}

/* === Верхняя панель на мобильной версии === */
#topbar-mobile {
  position: fixed;
  top: 0;
  width: 95%;
  height: 60px;
  background: rgba(255, 255, 255, 0.5); /* полупрозрачный серый */
  display: flex;
  justify-content: space-between; /* 👈 равное расстояние между кнопками */
  align-items: center;
  box-sizing: border-box;
  z-index: 4000;
  backdrop-filter: blur(4px);
  padding: 0 5px;
}

/* Кнопки в панели */
#topbar-mobile button {
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(to bottom, #f9f9f9, #e3e3e3); /* объёмный эффект */
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.6),
    0 3px 6px rgba(0,0,0,0.2); /* внешняя мягкая тень */  
display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #fff;
  transition: background 0.2s ease, transform 0.1s ease;
}

#topbar-mobile button:hover {
  background: rgba(255,255,255,0.25);
  transform: scale(1.05);
}

/* SVG — белые иконки */
#topbar-mobile svg {
  width: 22px;
  height: 22px;
  stroke: #000;
  pointer-events: none;
}



 
/* Полупрозрачный фон */
#overlay {
  position: fixed !important;
  inset: 0 !important;
  background: rgba(0,0,0,0.4);
  z-index: 2500 !important;
  display: none;
}
#overlay.active { display: block; }

/* === Боковая панель (исправленная и аккуратная) === */
#sidebar, .sidebar {
  position: fixed !important;
  top: 0;
  left: -100% !important;         /* скрыта за пределами экрана */
  width: 300px;
  max-width: 85vw;
  height: 100vh;
  background: rgba(255, 255, 255, 0.8); /* полупрозрачный светлый фон */
  backdrop-filter: blur(10px);          /* лёгкое размытие стекла */
  box-shadow: 4px 0 20px rgba(0, 0, 0, 0.25);
  transition: left 0.35s ease;          /* плавное открытие */
  z-index: 2600 !important;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 18px;
  box-sizing: border-box;
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
}

/* Активное состояние — выезжает */
#sidebar.active, .sidebar.active {
  left: 0 !important;
}

/* Заголовок */
#sidebar h2 {
  font-size: 1.2rem;
  font-weight: 600;
  color: #111;
  margin-bottom: 12px;
  text-align: center;
}

/* Ссылки и кнопки внутри панели */
#sidebar button,
#sidebar a {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  background: linear-gradient(to bottom, #f9f9f9, #e3e3e3);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  color: #111;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 10px;
}

#sidebar button:hover,
#sidebar a:hover {
  background: #fff;
  transform: translateX(4px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
}

/* Иконки */
#sidebar svg {
  width: 20px;
  height: 20px;
  stroke: #111;
  margin-right: 8px;
  vertical-align: middle;
}




/* === Вводные данные: название слева, поле справа === */
.grid {
  display: flex !important;
  flex-direction: column !important;   /* параметры идут сверху вниз */
  gap: 10px !important;
  padding: 0 16px !important;
  margin: 16px 0 !important;
  width: 100% !important;
  box-sizing: border-box;
  margin-bottom: 0 !important;
}

/* каждая строка параметра — flex с выравниванием по краям */
.grid label {
  display: flex;
  justify-content: space-between;      /* название слева, поле справа */
  align-items: center;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  width: 100%;
}

/* поле ввода справа */
.grid input,
.grid select {
  width: 100px;                        /* можно подогнать под нужную ширину */
  padding: 6px 8px;
  font-size: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  box-sizing: border-box;
  text-align: right;                   /* выравниваем числа справа */
}

/* кнопка схемы — внизу по центру */
.scheme-button-cell {
  order: 99;                           /* гарантированно внизу */
  display: flex;
  justify-content: center;
  align-items: center;
}

.scheme-button-cell button {
  padding: 0;
  font-size: 15px;
  border-radius: 3px;
 cursor: pointer;
}




/* === Кнопка выбора схемы: объёмная без резких границ === */
#schemeButton {
  background: linear-gradient(to bottom, #f0f0f0, #d9d9d9);
  border: none;
  border-radius: 12px;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 3px 6px rgba(0,0,0,0.2);
  padding: 3px 3px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.25s ease;
  background: rgba(255, 255, 255, 0.4);
  backdrop-filter: blur(3px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Эффект наведения */
#schemeButton:hover {
  background: linear-gradient(to bottom, #ffffff, #dcdcdc);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 5px 10px rgba(0,0,0,0.25);
}

/* Эффект нажатия */
#schemeButton:active {
  transform: translateY(1px);
  background: linear-gradient(to bottom, #e0e0e0, #cfcfcf);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
}

/* === SVG внутри кнопки === */
#schemeButton svg {
width: 120%;


  background: transparent; /* 👈 на всякий случай */
  pointer-events: none;
  transition: stroke 0.2s ease, transform 0.2s ease;
}

/* Ховер: подсвечиваем контур и немного увеличиваем */
#schemeButton:hover svg {
  stroke: #000;
  transform: scale(1.05);
}







.page-title {
  font-size: 1.2rem;      /* адаптируется под базовый размер шрифта */
  margin-top: 8vh;       /* 10% высоты экрана сверху */
  margin-bottom: 2vh; 
}



/* === Заголовок + кнопка "Скачать" === */
.section-header {
 position: relative;  
  display: flex;
  justify-content: center;
  align-items: center;
  width: 95%;
  max-width: 95%;
  margin: 20px auto 10px auto;
  padding: 0 4px;
  box-sizing: border-box;
  text-align: center;
}

/* сам заголовок */
.section-header .section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  margin: 0;

}

/* кнопка скачать */
#downloadBtn {
 position: absolute; 
  right: 0;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(to bottom, #f9f9f9, #e3e3e3);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.8),
    0 3px 6px rgba(0,0,0,0.25);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover / active */
#downloadBtn:hover {
  background: linear-gradient(to bottom, #ffffff, #dcdcdc);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.9),
    0 5px 10px rgba(0,0,0,0.3);
}

#downloadBtn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.25);
}

/* SVG внутри кнопки */
#downloadBtn svg {
  width: 22px;
  height: 22px;
  stroke: #333;
  pointer-events: none;
}



/* === Центрирование схемы === */
#canvas {
  display: block;
  margin: 0 auto 0 auto;   /* центрирование + меньше отступ сверху */
  width: 95% !important;      /* немного отступов от краёв */
  height: auto !important;
  max-width: 480px;           /* чтобы не расползался на больших экранах */

}


#canvas svg {
  width: 100% !important;     /* адаптируется по ширине контейнера */
  height: auto !important;    /* пропорционально */
  display: block;
}


/* === Контейнер, если он есть === */
#canvas-container,
#schemeContainer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  margin-top: 0;            /* уменьшили отступ сверху */
  margin-bottom: 1hv;
  width: 100%;

}


/* === Заголовок между схемой и таблицей === */
.section-title {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: #222;
  margin-top: 16px;
  margin-bottom: 8px;
}

/* === Таблица с общими данными (summary) === */
#summary {
  width: 95%;
  margin: 0 auto 16px auto;
  border-collapse: collapse;
  font-size: 14px;
  text-align: center;
  border: 1px solid #ccc;
  border-radius: 6px;
  overflow: hidden;
}

/* если внутри summary таблица */
#summary table {
  width: 100%;
  border-collapse: collapse;
}

#summary th,
#summary td {
  border: 1px solid #bbb;
  padding: 6px 8px;
}

#summary th {
  background: #f1f5f9;
  font-weight: 600;
}

#summary tr:nth-child(even) {
  background: #fafafa;
}



/* === Спецификацию в мобильной версии скрываем полностью === */
#specification{
  display: none !important;
}

/* А для обычных таблиц оставляем прежние стили */
#summary input,
#summary select {
  width: auto;
}


/* ВАЖНО: не блокируем вертикальный скролл у страницы глобально */
html, body {
  overflow-x: hidden;    /* только по оси X */
  overflow-y: auto;      /* по Y скролл разрешён */
}


@media (max-width: 480px) {
  #canvas {
    width: 100% !important;
    margin-top: 0 !important;
  }
}

/* --- Скрыть печатный макет в мобильной версии --- */
.print-layout {
  display: none !important;
  visibility: hidden !important;
}

/* --- При печати показываем макет --- */
@media print {
  .print-layout {
    display: flex !important;
    visibility: visible !important;
    flex-direction: column;
  }

/* --- Скрыть бургер и прочие элементы при печати --- */

  #burger,
  #overlay,
  #printBtn,
#topbar-mobile{
    display: none !important;
    visibility: hidden !important;
  }
}

/* === Примечание + кнопка заявки (под summary) === */
.invoice-note{
  width: 95%;
  margin: 6px auto 10px auto;
  font-size: 11px;          /* мельче */
  line-height: 1.35;
  color: #555;
  text-align: center;       /* строго по центру */
  white-space: normal;
  word-break: break-word;
}

.invoice-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 14px 0 16px 0;
}

/* Стиль кнопки — яркий, привлекательный */
.invoice-btn-wrap button {
background: linear-gradient(145deg, #ffb347, #ff7b00) !important; /* градиент от золотистого к насыщенно-оранжевому */
  color: #fff !important;
  font-size: 1.05rem;
  font-weight: 600;
  padding: 14px 36px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: all 0.25s ease;
  text-shadow: 0 1px 2px rgba(0,0,0,0.2);
  letter-spacing: 0.3px;
  animation: pulseButton 3s infinite ease-in-out;
}

/* Ховер и актив */
.invoice-btn-wrap button:hover {
  background: linear-gradient(145deg, #ffd37a, #ff8f1f) !important;
  transform: translateY(-2px);
  box-shadow:
    0 6px 14px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.invoice-btn-wrap button:active {
  transform: translateY(1px);
  background: linear-gradient(145deg, #ff8f1f, #e56a00) !important;
  box-shadow: inset 0 3px 6px rgba(0, 0, 0, 0.25);
}

/* Мягкая пульсация */
@keyframes pulseButton {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 10px rgba(0,0,0,0.25); }
  50% { transform: scale(1.05); box-shadow: 0 6px 14px rgba(59,130,246,0.4); }
}



.messenger-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 6000;
}

.messenger-modal.active {
  display: flex;
}

.modal-content {
  background: white;
  border-radius: 16px;
  padding: 24px;
  width: 90%;
  max-width: 360px;
  text-align: center;
  position: relative;
  box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.close-btn {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
}

.messenger-icons {
  display: flex;
  justify-content: space-around;
  margin: 20px 0;
}

/* Квадратная кнопка-мессенджер */
.messenger-icon {
  width: 70px;
  height: 70px;
  border: none;
  border-radius: 16px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(0,0,0,.15);
  transition: transform .2s ease, box-shadow .2s ease;
  /* фон зададим ниже для каждого сервиса */
}

/* Скрываем сам <img>, используем его только как источник файла */
.messenger-icon > img { display: none; }

/* Рисуем белый знак поверх цветного фона через mask */
.messenger-icon::before {
  content: "";
  width: 40px;
  height: 40px;
  background: #fff;                      /* сам «цвет логотипа» = белый */
  -webkit-mask: var(--icon) center/contain no-repeat;
          mask: var(--icon) center/contain no-repeat;
}

/* Фирменные фоны + путь к svg через CSS-переменную */
.messenger-icon[data-type="whatsapp"] {
  --icon: url("svg/whatsapp.svg");
  background-color: #25D366;
}
.messenger-icon[data-type="telegram"] {
  --icon: url("svg/telegram.svg");
  background-color: #0088cc;
}
.messenger-icon[data-type="viber"] {
  --icon: url("svg/viber.svg");
  background-color: #7360F2;
}
.messenger-icon[data-type="email"] {
  --icon: url("svg/gmail.svg");
  background-color: #EA4335; /* Gmail-красный */
}

/* Ховер-эффект */
.messenger-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 12px rgba(0,0,0,.25);
}

/* === Авторский знак внизу страницы === */
.site-footer {
  width: 100%;
  text-align: center;
  font-size: 13px;
  color: #555;
  margin-top: 24px;
  padding: 16px 0;
  background: rgba(0,0,0,0.02);
  border-top: 1px solid rgba(0,0,0,0.05);
}

.site-footer a {
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
}

.site-footer a:hover {
  text-decoration: underline;
}


/* === Левая панель навигации (desktop версия) === */
.left-conteiner {
  position: relative;
  width: 260px;                   /* ширина левой колонки */
  flex-shrink: 0;
}

.sidebar {
  position: sticky;               /* фиксируется при скролле */
  top: 30px;
  left: 0;
  height: calc(100vh - 40px);     /* занимает почти всю высоту окна */
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  padding: 20px 18px;
  box-sizing: border-box;
  overflow-y: auto;
}

/* --- Заголовки разделов --- */
.sidebar h3 {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* --- Список ссылок --- */
.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
}

.sidebar ul li {
  margin-bottom: 6px;
}

/* --- Ссылки верхнего уровня --- */
.sidebar ul li a {
  display: block;
  padding: 10px 12px;
  background: rgba(255,255,255,0.6);
  border-radius: 8px;
  text-decoration: none;
  color: #111;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.2s ease;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.05);
}

.sidebar ul li a:hover {
  background: linear-gradient(to bottom, #f9f9f9, #e6e6e6);
  transform: translateX(3px);
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* --- Подменю (Калькуляторы) --- */
.sidebar .has-submenu > a {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar .submenu {
  display: none;
  margin-top: 6px;
  margin-left: 8px;
  padding-left: 8px;
  border-left: 2px solid rgba(0,0,0,0.1);
}

.sidebar .submenu li a {
  background: rgba(255,255,255,0.5);
  font-size: 14px;
  padding: 8px 10px;
}

.sidebar .submenu li a:hover {
  background: #f0f0f0;
}

/* Активное подменю */
.sidebar .has-submenu.open > .submenu {
  display: block;
}

/* --- Нижний блок (Нормативные документы) --- */
.sidebar-bottom {
  margin-top: 24px;
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 14px;
}

.sidebar-bottom ul li a {
  background: transparent;
  color: #0A58CA;
  font-weight: 500;
  box-shadow: none;
}

.sidebar-bottom ul li a:hover {
  text-decoration: underline;
  background: transparent;
  transform: none;
}


#schemeModal .modal-content {
  width: 100%;
  max-width: 92vw;
  background: #fff;
  border-radius: 10px;
  padding: 16px 14px;
  box-sizing: border-box;
  margin: 0 auto;
  overflow-x: hidden;
}

#schemeModal .scheme-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
}

#comboLinks {
  min-height: 140px; /* восстановим высоту среднего ряда */
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

/* === Крестик в мобильной модалке — всегда видим === */
#schemeModal .close-btn {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 20;
}

#schemeModal .close-btn svg {
  width: 22px;
  height: 22px;
  stroke: #222;               /* 👈 чёрный контур, контрастный */
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

#schemeModal .close-btn:hover {
  background: rgba(0,0,0,0.05);
  border-radius: 6px;
  transform: scale(1.05);
}

#schemeModal .close-btn:active {
  transform: scale(0.95);
  opacity: 0.7;
}

/* Проверка подключения стилей
body::before {
  content: "MOBILE CSS OK1";
  position: fixed;
  bottom: 10px;
  right: 10px;
  background: #2563eb;
  color: white;
  font-size: 10px;
  padding: 2px 4px;
  border-radius: 4px;
  z-index: 9999;
}
 */


#printBtn{
  display: none !important;
}
