/*
 * umysel-framework.css
 * Замена Webflow CSS. Replaces all w-* component styles.
 * Breakpoints: 991px (tablet), 767px (mobile landscape), 479px (mobile portrait)
 */

/* ============================================================
   1. СЕТКА (Container + Grid)
   Было: w-container, w-row, w-col-*
   Стало: container, row, col-*
   ============================================================ */

.container {
  max-width: 940px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}
.container::after {
  content: "";
  display: table;
  clear: both;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}
.row::after {
  content: "";
  display: table;
  clear: both;
}

[class*="col-"] {
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}

.col-1  { flex: 0 0 8.33333%;  max-width: 8.33333%; }
.col-2  { flex: 0 0 16.66667%; max-width: 16.66667%; }
.col-3  { flex: 0 0 25%;       max-width: 25%; }
.col-4  { flex: 0 0 33.33333%; max-width: 33.33333%; }
.col-5  { flex: 0 0 41.66667%; max-width: 41.66667%; }
.col-6  { flex: 0 0 50%;       max-width: 50%; }
.col-7  { flex: 0 0 58.33333%; max-width: 58.33333%; }
.col-8  { flex: 0 0 66.66667%; max-width: 66.66667%; }
.col-9  { flex: 0 0 75%;       max-width: 75%; }
.col-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
.col-11 { flex: 0 0 91.66667%; max-width: 91.66667%; }
.col-12 { flex: 0 0 100%;      max-width: 100%; }

/* Tablet */
@media (max-width: 991px) {
  .col-md-1  { flex: 0 0 8.33333%;  max-width: 8.33333%; }
  .col-md-2  { flex: 0 0 16.66667%; max-width: 16.66667%; }
  .col-md-3  { flex: 0 0 25%;       max-width: 25%; }
  .col-md-4  { flex: 0 0 33.33333%; max-width: 33.33333%; }
  .col-md-5  { flex: 0 0 41.66667%; max-width: 41.66667%; }
  .col-md-6  { flex: 0 0 50%;       max-width: 50%; }
  .col-md-8  { flex: 0 0 66.66667%; max-width: 66.66667%; }
  .col-md-10 { flex: 0 0 83.33333%; max-width: 83.33333%; }
  .col-md-12 { flex: 0 0 100%;      max-width: 100%; }
  .col-stack { flex: 0 0 100%; max-width: 100%; }
}

/* Mobile landscape */
@media (max-width: 767px) {
  .col-sm-6  { flex: 0 0 50%; max-width: 50%; }
  .col-sm-12 { flex: 0 0 100%; max-width: 100%; }
}

/* Mobile portrait */
@media (max-width: 479px) {
  .col-xs-12 { flex: 0 0 100%; max-width: 100%; }
}

/* ============================================================
   2. УТИЛИТЫ
   Было: w-inline-block, w-block, w-clearfix, w-hidden-*
   ============================================================ */

/* .u-inline-block { display: inline-block; }*/
.u-block        { display: block; }
.u-clearfix::after { content: ""; display: table; clear: both; }

.u-hidden        { display: none !important; }

@media (max-width: 991px) { .u-hidden-md { display: none !important; } }
@media (max-width: 767px) { .u-hidden-sm { display: none !important; } }
@media (max-width: 479px) { .u-hidden-xs { display: none !important; } }
@media (min-width: 992px) { .u-visible-sm-only { display: none !important; } }

/* ============================================================
   3. НАВИГАЦИЯ
   Было: w-nav, w-nav-brand, w-nav-link, w--current
   ============================================================ */

.site-nav {
  position: relative;
  z-index: 1000;
}

.nav-brand {
  /*display: inline-block;*/
  text-decoration: none;
}

.nav-link.is-current,
.nav-link.w--current {
  /* Сохраняем оба класса в переходный период */
  color: inherit;
  font-weight: 600;
}

/* ============================================================
   4. ВЫПАДАЮЩЕЕ МЕНЮ (Dropdown)
   Было: w-dropdown, w-dropdown-toggle, w-dropdown-list, w--open
   ============================================================ */

.dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  user-select: none;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 900;
  display: none;
  min-width: 200px;
}

.dropdown.is-open > .dropdown-menu,
.dropdown.w--open > .dropdown-menu {
  display: block;
}

.dropdown-link {
  display: block;
  text-decoration: none;
  white-space: nowrap;
}

/* ============================================================
   5. ТАБЫ
   Было: w-tabs, w-tab-menu, w-tab-link, w-tab-content,
         w-tab-pane, w--tab-active, w--current
   Стало: tabs, tab-menu, tab-link, tabs-content, tab-pane, is-active
   ============================================================ */

.tabs {
  position: relative;
}

.tab-menu {
  display: flex;
  flex-wrap: wrap;
}

.tab-link {
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.tab-link.is-active,
.tab-link.w--current {
  /* Визуальный стиль активного таба — переопределяется в main.css */
}

.tabs-content {
  position: relative;
}

.tab-pane {
  display: none;
}

.tab-pane.is-active,
.tab-pane.w--tab-active {
  display: block;
}

/* ============================================================
   6. СЛАЙДЕР (мобильный, единственное использование — product page)
   Было: w-slider, w-slider-mask, w-slide, w-slider-arrow-*, w-slider-nav
   Стало: slider, slider-mask, slide, slider-arrow, slider-nav
   ============================================================ */

.slider {
  position: relative;
  overflow: hidden;
  width: 100%;
}

.slider-mask {
  display: flex;
  transition: transform 0.4s ease;
  will-change: transform;
}

.slide {
  flex: 0 0 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.8);
  border-radius: 50%;
  user-select: none;
}

.slider-arrow--left  { left: 8px; }
.slider-arrow--right { right: 8px; }

.icon-arrow-left::before  { content: "←"; }
.icon-arrow-right::before { content: "→"; }

.slider-nav {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  cursor: pointer;
  transition: background 0.2s;
}

.slider-dot.is-active {
  background: rgba(0,0,0,0.8);
}

/* ============================================================
   7. ФОРМЫ
   Было: w-form, w-input, w-button, w-radio, w-form-label,
         w-form-formradioinput--inputType-custom (кастомное радио),
         w--redirected-checked, w-form-done, w-form-fail
   ============================================================ */

/* Обёртка формы */
.form-wrap {
  position: relative;
}

/* Поле ввода */
.form-input {
  display: block;
  width: 100%;
  box-sizing: border-box;
}

/* Кнопка */
.btn {
  display: inline-block;
  cursor: pointer;
  text-decoration: none;
  border: none;
  background: none;
}

/* Radio label */
.radio-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  position: relative;
}

/* Кастомное оформление radio */
.custom-radio-input {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  margin-right: 8px;
  flex-shrink: 0;
  transition: background 0.15s;
}

.custom-radio-input.is-checked,
.custom-radio-input.w--redirected-checked {
  background: currentColor;
}

/* Метка поля */
.form-label {
  display: block;
  margin-bottom: 4px;
}

/* Сообщения формы */
.form-success { display: none; }
.form-error   { display: none; }

.form-success.is-visible { display: block; }
.form-error.is-visible   { display: block; }

/* ============================================================
   8. Загрузчик файлов (file upload)
   Было: w-file-upload-*, w-icon-file-upload-*
   ============================================================ */

.file-upload-wrap    { position: relative; }
.file-upload-label   { cursor: pointer; display: inline-block; }
.file-upload-input   { position: absolute; opacity: 0; width: 0; height: 0; }
.file-upload-success { display: none; }
.file-upload-error   { display: none; }
.file-upload-info    { display: inline-block; }

/* ============================================================
   9. Rich Text (контент из редактора)
   Было: w-richtext
   ============================================================ */

.rich-text img    { max-width: 100%; }
.rich-text figure { margin: 1em 0; }
.rich-text figcaption { font-size: 0.875em; text-align: center; }

/* ============================================================
   10. Embed-блоки (инлайн-скрипты)
   Было: w-embed
   Стало: embed-block (просто нет визуального стиля)
   ============================================================ */

.embed-block { display: contents; }

/* ============================================================
   11. Состояния (State classes)
   Полный список классов состояния без «w--» префикса
   ============================================================ */

/* .is-current   — текущая страница в nav */
/* .is-open      — открытый dropdown */
/* .is-active    — активный таб */
/* .is-checked   — выбранный radio/checkbox */
/* .is-visible   — показан (успех/ошибка формы) */

/* ============================================================
   12. Spinner (lightbox loading)
   Было: w-lightbox-spinner + @keyframes spin
   ============================================================ */

@keyframes spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner {
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ============================================================
   13. Shake-анимация (ошибки форм)
   Было: @keyframes mco-pvz-shake
   ============================================================ */

@keyframes shake {
  0%   { transform: translateX(0); }
  20%  { transform: translateX(-4px); }
  40%  { transform: translateX(4px); }
  60%  { transform: translateX(-4px); }
  80%  { transform: translateX(4px); }
  100% { transform: translateX(0); }
}

.shake { animation: shake 0.4s ease; }

/* ============================================================
   14. Модуль детектирования touch / JS
   Было: добавлялось JS через w-mod-js, w-mod-touch
   Стало: добавляется своим JS через umysel-nav.js
   ============================================================ */

/* Опциональные стили при наличии touch */
.has-touch .dropdown:hover > .dropdown-menu { display: none; }
.has-js    .tab-pane:not(.is-active) { display: none; }
