/* ==========================================================
   Проект: MOYAMOVA
   Файл: ui.setup.modal.css
   Назначение: Стили мастера начальной настройки
   Версия: 1.0
   Обновлено: 2025-11-17
   ========================================================== */

:root {
  --setup-accent: var(--accent-main, #22c7ff);
  --setup-accent-soft: rgba(34, 199, 255, 0.12);
  --setup-border-subtle: rgba(148, 163, 184, 0.45);
}

/* ---------------------------
 * Overlay
 * ------------------------ */

.setup-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.setup-overlay.is-open {
  display: flex;
}

.setup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
}

/* ---------------------------
 * Modal
 * ------------------------ */

.setup-modal {
  position: relative;
  z-index: 1;
  max-width: 500px; /* шире, как большие карточки в приложении */
  width: 100%;
}

.setup-modal__inner {
  background: var(--surface-1, #f8fafc);
  border: 1px solid var(--divider, #e5edf4);
  border-radius: var(--radius-xl, 16px);
  box-shadow: var(--shadow-1, 0 10px 30px rgba(15, 23, 42, 0.10));
  padding: 20px 20px 18px;
  text-align: center;
  color: var(--text, #0f172a);
}

/* ---------------------------
 * Header + intro
 * ------------------------ */

.setup-header {
  margin-bottom: 10px;
}

.setup-title {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.setup-subtitle {
  margin: 0;
  font-size: 13px;
  opacity: 0.8;
}

.setup-intro {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.55;
  opacity: 0.9;
}

/* ---------------------------
 * Sections
 * ------------------------ */

.setup-section {
  margin-top: 14px;
}

.setup-section__label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
  margin-bottom: 8px;
}

/* ---------------------------
 * Study language flags
 * ------------------------ */

.setup-flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
}

.setup-flag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 26px;
  font-size: 24px;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: var(--radius-xs, 4px);
  background: #fff;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    opacity 0.12s ease;
}

html[data-theme="dark"] .setup-flag-btn,
body[data-theme="dark"] .setup-flag-btn {
  background: transparent !important;
}

.setup-flag-btn__flag {
  font-size: 26px;
}

.setup-flag-btn:hover {
  transform: translateY(-1px);
}

.setup-flag-btn.is-active {
  border-color: var(--burger, var(--brand, #35b6ff));
  box-shadow: 0 0 0 3px
    color-mix(in srgb, var(--burger, var(--brand, #35b6ff)) 20%, transparent);
  background: #fff;
}

/* ---------------------------
 * Segmented controls
 * ------------------------ */

.setup-mode-toggle {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-2, #f3f4f6);
  border: 1px solid var(--divider, #e5edf4);
  margin: 0 auto;
}

html[data-theme="dark"] .setup-mode-toggle,
body[data-theme="dark"] .setup-mode-toggle {
  background: #020617;
  border-color: rgba(148, 163, 184, 0.7);
}

.setup-mode-btn {
  border: none;
  background: transparent;
  color: inherit;
  font-size: 13px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.78;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition:
    background 0.14s ease,
    opacity 0.14s ease,
    box-shadow 0.14s ease,
    transform 0.1s ease;
}

.setup-mode-btn span[aria-hidden="true"] {
  font-size: 16px;
}

.setup-mode-btn.is-active {
  background: var(--brand, #35b6ff);
  color: #fff;
  opacity: 1;
  box-shadow: 0 4px 12px rgba(53, 182, 255, 0.28);
}

html[data-theme="dark"] .setup-mode-btn.is-active,
body[data-theme="dark"] .setup-mode-btn.is-active {
  color: #020617;
}

.setup-mode-toggle--lang .setup-mode-btn {
  padding-inline: 18px;
}

/* ---------------------------
 * Consents (checkboxes)
 * ------------------------ */

.setup-consent {
  margin-top: 16px;
  margin-bottom: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
  text-align: left;
}

.setup-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.setup-checkbox input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.setup-checkbox__box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid var(--divider, #e5edf4);
  background: #ffffff;
  margin-top: 1px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #ffffff;
  transition:
    background 0.12s ease,
    border-color 0.12s ease,
    box-shadow 0.12s ease;
}

html[data-theme="dark"] .setup-checkbox__box,
body[data-theme="dark"] .setup-checkbox__box {
  background: #020617;
  border-color: rgba(148, 163, 184, 0.7);
}

.setup-checkbox__label {
  flex: 1;
}

.setup-checkbox__label small {
  opacity: 0.8;
}

/* чекбокс отмечен */
.setup-checkbox--checked .setup-checkbox__box {
  background: var(--brand, #35b6ff);
  border-color: var(--brand, #35b6ff);
  box-shadow: 0 2px 6px rgba(53, 182, 255, 0.32);
}

.setup-checkbox--checked .setup-checkbox__box::before {
  content: '✓';
}

/* ссылка внутри текста */
.setup-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: var(--brand, #35b6ff);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  cursor: pointer;
}

/* ---------------------------
 * Note & footer
 * ------------------------ */

.setup-note {
  margin: 10px 0 6px;
  font-size: 12px;
  line-height: 1.45;
  opacity: 0.8;
}

.setup-footer {
  margin-top: 6px;
  display: flex;
  justify-content: center;
}

/* ---------------------------
 * Primary button
 * ------------------------ */

.setup-start-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  padding: 14px 26px;
  border-radius: var(--radius-xl, 16px);
  border: 0;
  background: var(--brand, #35b6ff);
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.2px;
  box-shadow: 0 6px 18px rgba(53, 182, 255, 0.28);
  cursor: pointer;
  transition:
    transform 0.06s ease,
    filter 0.15s ease,
    box-shadow 0.15s ease,
    opacity 0.15s ease;
}

@media (hover:hover) and (pointer:fine) {
  .setup-start-btn:not(:disabled):hover {
    filter: brightness(1.05);
  }
}

.setup-start-btn:active:not(:disabled) {
  transform: translateY(1px);
  box-shadow: 0 3px 10px rgba(53, 182, 255, 0.32);
}

/* disabled */
.setup-start-btn:disabled {
  opacity: 0.45;
  box-shadow: none;
  cursor: default;
  transform: none;
}

/* ---------------------------
 * Small screens
 * ------------------------ */

@media (max-width: 360px) {
  .setup-modal {
    max-width: 100%;
  }

  .setup-modal__inner {
    padding: 14px 10px 10px;
    border-radius: var(--radius-lg, 12px);
  }

  .setup-title {
    font-size: 18px;
  }

  .setup-section__label {
    font-size: 11px;
  }

  .setup-start-btn {
    width: 100%;
    min-width: 0;
  }

  .setup-consent {
    font-size: 12px;
  }
}
/* ========================= Конец файла: ui.setup.modal.css ========================= */
