/* webapp/shared/styles/components/mode-switcher.css */
/* Стили для переключателя режимов Participant/Creator */

/* Индикатор активной кнопки (альтернативный стиль для будущего) */
.mode-switcher-indicator {
  position: absolute;
  background: var(--color-primary);
  border-radius: 999px;
  height: calc(100% - 4px);
  transition: transform var(--transition-normal);
}

/* Вариант с индикатором */
.mode-switcher--indicator {
  position: relative;
  background: var(--color-bg-tertiary);
}

.mode-switcher--indicator .mode-btn {
  position: relative;
  z-index: 1;
}


/* ====== СТИЛИ ДЛЯ СВЕТЛОЙ ТЕМЫ ====== */
:root.theme-light .mode-switcher {
  /* Внешний контейнер - УВЕЛИЧИВАЕМ ВЫСОТУ */
  width: 200px;
  height: 36px; /* Увеличиваем с 32px до 36px */
  display: flex;
  gap: 4px;
  background-color: #E6E5EB;
  border-radius: 20px;
  overflow: hidden;
  padding: 0;
}

:root.theme-light .mode-btn {
  /* Неактивная кнопка - УВЕЛИЧИВАЕМ РАЗМЕРЫ */
  flex: 1;
  margin: 4px 0; /* Вертикальный отступ сохраняем */
  width: 88px;   /* Увеличиваем с 74px до 88px */
  height: 28px;  /* Увеличиваем с 24px до 28px */
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  background-color: transparent;
  color: var(--top-dark); /* #000000 */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
  padding: 0;
  transition: all var(--transition-normal);
}

:root.theme-light .mode-btn.active {
  /* Активная кнопка - УВЕЛИЧИВАЕМ РАЗМЕРЫ */
  background-color: var(--background-light); /* #ffffff */
  color: var(--top-dark); /* #000000 */
  font-weight: 700;
  font-size: 14px;
  margin: 4px; /* Отступ со всех сторон 4px */
  width: 88px;   /* Увеличиваем с 74px до 88px */
  height: 28px;  /* Увеличиваем с 24px до 28px */
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Состояния hover для десктопа в светлой теме */
@media (hover: hover) {
  :root.theme-light .mode-btn:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.05);
  }
}


/* ====== СТИЛИ ДЛЯ ТЁМНОЙ ТЕМЫ ====== */
:root.theme-dark .mode-switcher {
  /* ТАКИЕ ЖЕ РАЗМЕРЫ, КАК В СВЕТЛОЙ ТЕМЕ */
  width: 200px;
  height: 36px;
  display: flex;
  gap: 4px;
  background: #2c2c2e; /* var(--color-bg-tertiary) - оригинальный цвет тёмной темы */
  border-radius: 20px;
  overflow: hidden;
  padding: 0; /* Убираем старый padding: 2px 4px */
}

:root.theme-dark .mode-btn {
  /* ТАКИЕ ЖЕ РАЗМЕРЫ, КАК В СВЕТЛОЙ ТЕМЕ */
  flex: 1;
  margin: 4px 0;
  width: 88px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  overflow: hidden;
  background: transparent;
  color: #a0a0a0; /* var(--color-text-secondary) - оригинальный цвет */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-weight: 500;
  font-size: 14px; /* Такой же размер, как в светлой */
  line-height: 1;
  white-space: nowrap;
  padding: 0;
  transition: all var(--transition-normal);
  border: none;
  cursor: pointer;
}

:root.theme-dark .mode-btn.active {
  /* ТАКИЕ ЖЕ РАЗМЕРЫ, КАК В СВЕТЛОЙ ТЕМЕ, НО ОРИГИНАЛЬНЫЕ ЦВЕТА */
  background: #737375; /* Оригинальный цвет активной кнопки */
  color: #FAFAFA; /* Оригинальный цвет текста */
  font-weight: 700; /* Такая же жирность, как в светлой */
  font-size: 14px; /* Такой же размер, как в светлой */
  margin: 4px;
  width: 88px;
  height: 28px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); /* Немного темнее тень для тёмной темы */
}

/* Состояния hover для десктопа в тёмной теме */
@media (hover: hover) {
  :root.theme-dark .mode-btn:not(.active):hover {
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff; /* var(--color-text) */
  }
}
