/* Стили страницы заказа (order.html) — выглядят как в демо. */

.container { max-width: 960px; margin: 0 auto; padding: 40px 20px; }

/* === Шапка === */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 0 20px; border-bottom: 1px solid rgba(148,163,184,.18);
  margin-bottom: 28px;
}
.topbar .logo {
  font-weight: 800; font-size: 20px; letter-spacing: -0.3px;
  color: #f1f5f9; text-decoration: none;
}
.topbar .logo span {
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.topbar .nav { display: flex; gap: 16px; align-items: center; font-size: 14px; color: #94a3b8; }
.topbar .nav a { color: #38bdf8; text-decoration: none; }
.topbar .nav a:hover { text-decoration: underline; }

h1.title {
  font-size: 2rem; margin-bottom: 8px;
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subtitle { color: #94a3b8; margin-bottom: 32px; }

/* === Шаги === */
.steps { display: flex; gap: 8px; margin-bottom: 32px; flex-wrap: wrap; }
.step {
  flex: 1; min-width: 140px;
  padding: 12px 16px;
  background: #1e293b; border: 1px solid #334155;
  border-radius: 12px;
  font-size: .85rem; text-align: center;
  transition: all .3s; opacity: .5;
}
.step.active { opacity: 1; border-color: #38bdf8; background: rgba(12,74,110,.2); }
.step.done   { opacity: 1; border-color: #22c55e; background: rgba(20,83,45,.2); }
.step .num {
  display: inline-block; width: 24px; height: 24px; line-height: 24px;
  border-radius: 50%; background: #334155;
  font-weight: bold; margin-bottom: 6px;
}
.step.active .num { background: #38bdf8; color: #0f172a; }
.step.done .num   { background: #22c55e; color: #0f172a; }

/* === Карточки === */
.card {
  background: #1e293b; border: 1px solid #334155;
  border-radius: 16px; padding: 24px; margin-bottom: 24px;
}
.card h2 { font-size: 1.15rem; margin-bottom: 16px; color: #f1f5f9; }
.card.hidden { display: none; }

/* === Загрузка === */
.dropzone {
  border: 2px dashed #475569; border-radius: 12px;
  padding: 40px 20px; text-align: center; cursor: pointer;
  transition: all .3s; background: rgba(15,23,42,.35);
}
.dropzone:hover, .dropzone.drag { border-color: #38bdf8; background: rgba(12,74,110,.2); }
.dropzone .icon { font-size: 48px; margin-bottom: 12px; }
.dropzone p { color: #94a3b8; }
.dropzone .hint { font-size: .8rem; margin-top: 6px; }

.preview { margin-top: 16px; text-align: center; }
.preview img {
  max-width: 200px; border-radius: 12px; border: 2px solid #334155;
}

/* === Кнопки === */
button, .btn-link {
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  color: #0f172a; border: none;
  padding: 12px 28px; border-radius: 10px;
  font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: transform .2s, opacity .2s;
  margin-top: 16px; font-family: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
}
button:hover:not(:disabled), .btn-link:hover { transform: translateY(-2px); }
button:disabled { opacity: .75; cursor: progress; }

button .spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(15, 23, 42, 0.25);
  border-top-color: #0f172a;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 0;
  display: inline-block;
  flex-shrink: 0;
}

.btn-ghost {
  background: transparent; color: #e2e8f0;
  border: 1px solid #334155;
}
.btn-ghost:hover { border-color: #38bdf8; color: #38bdf8; }

.btn-sm { padding: 8px 16px; font-size: .85rem; min-height: 36px; margin-top: 0; }

/* === Сетка ракурсов === */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}
.grid-item {
  aspect-ratio: 1; background: #0f172a;
  border: 1px solid #334155; border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  color: #64748b; font-size: .85rem;
  overflow: hidden; position: relative;
}
.grid-item img { width: 100%; height: 100%; object-fit: cover; }
.grid-item .label {
  position: absolute; bottom: 6px; left: 6px;
  background: rgba(15,23,42,.85); padding: 2px 8px;
  border-radius: 6px; font-size: .75rem; color: #cbd5e1;
}

/* === Спиннер === */
.spinner {
  width: 24px; height: 24px;
  border: 3px solid #334155; border-top-color: #38bdf8;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  margin: 8px auto;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* === Прогресс === */
.progress {
  height: 6px; background: #334155; border-radius: 3px;
  overflow: hidden; margin-top: 16px;
}
.progress-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  transition: width .3s;
}

/* === Viewer (заглушка 3D) === */
.viewer {
  aspect-ratio: 16/9; background: #0f172a;
  border: 1px solid #334155; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: #475569; position: relative; overflow: hidden;
}
.viewer .model-icon {
  font-size: 4rem;
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* === Форма === */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; margin-bottom: 6px; color: #94a3b8; font-size: .9rem; }
.form-row input, .form-row textarea, .form-row select {
  width: 100%; padding: 10px 14px;
  background: #0f172a; border: 1px solid #334155;
  border-radius: 8px; color: #e2e8f0;
  font-size: .95rem; font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus, .form-row select:focus {
  outline: none; border-color: #38bdf8;
}

/* === Успех === */
.success { text-align: center; padding: 20px; }
.success .check {
  width: 64px; height: 64px; border-radius: 50%;
  background: #22c55e; display: flex;
  align-items: center; justify-content: center;
  margin: 0 auto 16px; font-size: 2rem; color: #0f172a;
}
.success h2 { color: #22c55e; margin-bottom: 8px; }
.success p { color: #94a3b8; }

/* === Лог === */
.log {
  background: #0f172a; border: 1px solid #334155;
  border-radius: 8px; padding: 12px;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: .8rem; color: #64748b;
  max-height: 150px; overflow-y: auto;
  margin-top: 16px;
}
.log .ok { color: #22c55e; }
.log .info { color: #38bdf8; }
.log div { margin: 2px 0; }

.notice {
  padding: 12px 16px; border-radius: 10px;
  background: rgba(56,189,248,.08);
  border: 1px solid rgba(56,189,248,.25);
  color: #cbd5e1; font-size: 14px; margin-bottom: 20px;
}

/* === Выбор стиля (шаг 1) === */
.field-label {
  color: #94a3b8; font-size: .9rem; margin: 0 0 12px;
}

/* === Карусель стилей === */
.styles-carousel-container { position: relative; }
.styles-carousel-viewport { overflow: hidden; border-radius: 14px; }
.styles-carousel-track {
  display: flex;
  gap: 12px;
  transition: transform 0.4s ease;
  will-change: transform;
}
.style-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.carousel-controls {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  flex-wrap: wrap;
}
.carousel-arrows { display: flex; gap: 8px; }
.carousel-arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e2e8f0;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  font-family: inherit;
  transition: all .15s;
  margin-top: 0;
  padding: 0;
  min-height: 40px;
}
.carousel-arrow:hover:not(:disabled) {
  border-color: #38bdf8;
  color: #38bdf8;
  transform: translateY(-1px);
}
.carousel-arrow:disabled { opacity: .35; cursor: not-allowed; }

/* === Режим генерации === */
.generation-mode { margin-bottom: 24px; }
.mode-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 480px) {
  .mode-options { grid-template-columns: 1fr; }
}
.mode-option {
  display: block;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  padding: 16px;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.mode-option:hover { border-color: #64748b; }
.mode-option.selected {
  border-color: #38bdf8;
  background: rgba(12, 74, 110, 0.25);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
}
.mode-option input { display: none; }
.mode-name {
  display: block;
  font-weight: 700;
  color: #f1f5f9;
  font-size: 1rem;
  margin-bottom: 4px;
}
.mode-price {
  display: block;
  color: #86efac;
  font-weight: 600;
  font-size: 0.9rem;
}
.mode-option[data-paid="1"] .mode-price { color: #fcd34d; }

/* === Мультивыбор стилей (для режима 3 картинки) === */
.multi-style-block {
  margin-top: 20px;
  padding: 16px;
  background: rgba(15, 23, 42, 0.5);
  border: 1px dashed #334155;
  border-radius: 12px;
}
.multi-style-block.hidden { display: none; }
.multi-style-hint {
  color: #94a3b8;
  font-size: .85rem;
  margin-bottom: 12px;
  line-height: 1.5;
}
.multi-style-hint b { color: #fcd34d; }

.selected-styles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  min-height: 36px;
}
.selected-style-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  border-radius: 999px;
  font-size: 13px;
  color: #7dd3fc;
  font-weight: 600;
}
.selected-style-chip .chip-remove {
  background: transparent;
  border: none;
  color: #7dd3fc;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  margin: 0;
  min-height: auto;
  line-height: 1;
  opacity: 0.7;
  transition: opacity .15s;
}
.selected-style-chip .chip-remove:hover { opacity: 1; }

.selected-styles-empty {
  color: #64748b;
  font-size: 13px;
  font-style: italic;
  padding: 6px 0;
}

.multi-style-help {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 8px;
}

/* === Кнопки навигации по шагам === */
.step-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  flex-wrap: wrap;
  align-items: center;
}
.step-actions button {
  flex: 1;
  min-width: 160px;
}
.step-actions .btn-ghost {
  flex: 0 0 auto;
  min-width: auto;
}

/* === Сетка вариантов бюстов === */
.views-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.view-item {
  position: relative;
  aspect-ratio: 1;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  overflow: hidden;
}
.view-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.view-label {
  position: absolute;
  bottom: 6px; left: 6px;
  background: rgba(15, 23, 42, 0.85);
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 0.75rem;
  color: #cbd5e1;
}

/* === Одна картинка === */
.view-single {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  aspect-ratio: 1;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  overflow: hidden;
}
.view-single img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

/* === Лайтбокс === */
.style-preview { cursor: zoom-in; }

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.82);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  animation: lbFade .15s ease;
}
.lightbox[hidden] { display: none; }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }

.lightbox-img {
  max-width: min(90vw, 720px);
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  background: #0f172a;
  display: block;
}
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(30, 41, 59, 0.85);
  color: #e2e8f0;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, transform .15s;
  margin-top: 0;
  padding: 0;
  min-height: auto;
}
.lightbox-close:hover {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  transform: scale(1.05);
}

/* ============================================================
   ФИКС: картинка на шаге 3 не должна вылезать за блок
   ============================================================ */
#model-input-img {
  max-width: 100%;
  max-height: 380px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
  border: 1px solid #334155;
  background: #0f172a;
}

.input-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}
.input-preview img { display: block; }
.input-preview .meta {
  color: #94a3b8;
  font-size: .85rem;
  line-height: 1.5;
  text-align: center;
}
.input-preview .meta b { color: #e2e8f0; }

/* ============================================================
   Галерея выбора картинки для 3D
   ============================================================ */
.choose-view-hint {
  color: #94a3b8;
  font-size: .9rem;
  margin: 8px 0 14px;
  line-height: 1.5;
}
.choose-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.choose-view-card {
  position: relative;
  aspect-ratio: 1;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  transition: all .15s;
}
.choose-view-card:hover { border-color: #64748b; }
.choose-view-card.selected {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}
.choose-view-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.choose-view-card .cv-label {
  position: absolute;
  bottom: 6px; left: 6px;
  background: rgba(15, 23, 42, 0.85);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #cbd5e1;
  font-weight: 600;
}
.choose-view-card .cv-check {
  position: absolute;
  top: 6px; right: 6px;
  width: 24px; height: 24px;
  border-radius: 50%;
  background: #38bdf8;
  color: #0f172a;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}
.choose-view-card.selected .cv-check { display: flex; }

/* === Кнопка "Догенерировать" === */
.add-more-block {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 12px;
}
.add-more-block p {
  color: #94a3b8;
  font-size: .85rem;
  margin: 0 0 10px;
}

/* ============================================================
   КАРТОЧКИ СТИЛЕЙ — единый компонент для карусели, полной сетки
   и модалки мультивыбора.

   НОВОЕ:
   • Превью — фиксированной высоты (aspect-ratio: 1/1), не зависит
     от длины названия.
   • Название — под превью, в отдельной строке, с переносом
     (white-space: normal), min-height под 2 строки.
   • Кнопка-лупа — отдельная, в правом верхнем углу превью.
     Клик по ней открывает лайтбокс. Клик по остальной части
     карточки — выбор стиля.
   ============================================================ */
.style-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #0f172a;
  border: 2px solid #334155;
  border-radius: 14px;
  padding: 10px;
  cursor: pointer;
  transition: all .15s;
  text-align: center;
  box-sizing: border-box;
  user-select: none;
  min-width: 0;
}
.style-card:hover { border-color: #64748b; }
.style-card.selected {
  border-color: #38bdf8;
  background: rgba(12,74,110,.25);
  box-shadow: 0 0 0 3px rgba(56,189,248,.15);
}

/* Обёртка превью: фиксированная квадратная, чтобы название
   всегда было под ней и ничего не наезжало. */
.style-card .style-preview-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  overflow: hidden;
  background: #0b1220;
  flex: 0 0 auto;
}

.style-card .style-preview-wrap img,
.style-card .style-preview-wrap .style-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Фолбэк-иконка, если нет превью */
.style-card .style-preview-wrap .style-preview {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  background: linear-gradient(135deg, #334155, #1e293b);
  color: #cbd5e1;
}

/* Кнопка-лупа: только она открывает лайтбокс */
.style-card .style-zoom-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.75);
  color: #e2e8f0;
  font-size: 15px;
  line-height: 1;
  cursor: zoom-in;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  min-height: auto;
  transition: background .15s, border-color .15s, transform .15s;
  backdrop-filter: blur(4px);
  z-index: 2;
}
.style-card .style-zoom-btn:hover {
  background: rgba(56, 189, 248, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  transform: scale(1.06);
}

/* Название стиля — под превью, не наезжает.
   Переносится на 2 строки при необходимости, min-height
   фиксирует высоту, чтобы карточки в сетке были ровными. */
.style-card .style-name {
  margin-top: 10px;
  font-weight: 700;
  color: #f1f5f9;
  font-size: .88rem;
  line-height: 1.25;
  white-space: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  min-height: 2.5em;
  word-break: break-word;
  flex: 1 1 auto;
  text-align: center;
  padding: 0 2px;
}

/* Полная сетка — та же карточка, что в карусели */
.style-grid-full {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

/* Модалка выбора стилей — та же сетка, что и полная */
#style-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}

/* Карусель: 3 / 2 / 1 карточки в ряд.
   Фиксируем ширину и выравниваем по верху — карточки
   с разной длиной названия будут одинаковой высоты
   за счёт flex-колонки и min-height у .style-name. */
.styles-carousel-track .style-card {
  flex: 0 0 calc((100% - 24px) / 3);
  min-width: 0;
  height: auto;
  align-self: flex-start;
}
@media (max-width: 900px) {
  .styles-carousel-track .style-card { flex: 0 0 calc((100% - 12px) / 2); }
}
@media (max-width: 640px) {
  .styles-carousel-track .style-card { flex: 0 0 100%; }
}
/* ============================================================
   Баланс в шапке order.html + модалка пополнения
   ============================================================ */
.nav-balance {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 12px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1;
}

.nav-balance-icon {
  font-size: 14px;
  line-height: 1;
}

.nav-balance-value {
  color: #86efac;
  font-weight: 700;
  font-family: ui-monospace, Menlo, Consolas, monospace;
}

.nav-topup-btn {
  background: linear-gradient(90deg, #38bdf8, #a78bfa);
  color: #0f172a;
  border: none;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  margin: 0;
  min-height: auto;
  transition: transform .15s, box-shadow .15s;
}

.nav-topup-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(167, 139, 250, 0.35);
}

.nav-topup-btn:disabled {
  opacity: .6;
  cursor: progress;
  transform: none;
}

/* Пресеты сумм в модалке */
.topup-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 16px;
}

.topup-preset {
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #334155;
  border-radius: 10px;
  padding: 12px 10px;
  color: #e2e8f0;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin: 0;
  min-height: auto;
  transition: all .15s;
}

.topup-preset:hover {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.08);
  transform: none;
}

.topup-preset.active {
  border-color: #38bdf8;
  background: rgba(56, 189, 248, 0.15);
  color: #38bdf8;
}

/* На узких экранах скрываем текст кнопки, оставляем «+» */
@media (max-width: 640px) {
  .nav-balance { padding: 5px 8px; gap: 6px; font-size: 12px; }
  .nav-topup-btn { padding: 5px 8px; font-size: 11px; }
}
/* ============================================================
   Реальный 3D-вьюер на шаге 3 (#model-result-block)
   ============================================================ */
#model-result-block .viewer-3d {
  width: 100%;
  aspect-ratio: 16 / 10;       /* тот же формат, что на главной */
  min-height: 480px;
  background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0f172a 100%);
  border: 1px solid #334155;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

/* Canvas Three.js должен заполнять весь контейнер */
#model-result-block .viewer-3d canvas {
  display: block;
}

/* Подсказка "ЛКМ — вращать..." внизу */
#model-result-block .viewer-3d .hint {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.75);
  border: 1px solid #334155;
  color: #94a3b8;
  font-size: 0.78rem;
  padding: 6px 14px;
  border-radius: 999px;
  backdrop-filter: blur(6px);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
}

/* Лоадер по центру поверх canvas */
#model-result-block .viewer-3d .loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #94a3b8;
  font-size: 0.9rem;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 3;
}
#model-result-block .viewer-3d .loader.hidden {
  display: none;
}