/* ============================================================
   AURA Studio (Image / Video generation pages)
   ============================================================ */

.studio-main {
  flex: 1 1 auto;
  display: flex;
  min-width: 0;
  height: 100vh;
}

/* ---- chat column ---- */
.studio-chat {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
}
.studio-topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 36px 14px;
  flex: 0 0 auto;
}
.studio-topbar h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}
.studio-topbar h1 svg { width: 22px; height: 22px; color: var(--accent-2); }
.studio-topbar .new-btn {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text-2);
  font-family: inherit;
  font-weight: 600;
  font-size: 13.5px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.studio-topbar .new-btn:hover { color: var(--text); border-color: var(--line-strong); background: var(--surface-3); }
.studio-topbar .new-btn svg { width: 15px; height: 15px; }
/* после первой генерации кнопка загорается фирменным цветом — намёк начать новую */
.studio-topbar .new-btn.lit {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px -10px var(--accent-ring);
}
.studio-topbar .new-btn.lit:hover {
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  border-color: transparent;
  color: #fff;
  filter: brightness(1.08);
}

.studio-feed {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 14px 36px 28px;
  min-height: 0;
}
.studio-feed::-webkit-scrollbar { width: 10px; }
.studio-feed::-webkit-scrollbar-thumb {
  background: var(--surface-3); border-radius: 99px; border: 3px solid var(--bg);
}

/* empty state */
.studio-empty {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  color: var(--text-2);
}
.studio-empty .ico {
  width: 76px; height: 76px;
  border-radius: 22px;
  display: grid; place-items: center;
  background: radial-gradient(120% 120% at 30% 20%, var(--accent-2), var(--accent) 70%, #3a2a8c);
  box-shadow: 0 16px 44px -12px var(--accent-ring), 0 4px 12px -6px rgba(0,0,0,.5);
}
.studio-empty .ico svg { width: 36px; height: 36px; color: #fff; }
.studio-empty h2 {
  font-family: var(--font-display);
  font-weight: 700; font-size: 28px; color: var(--text); margin: 0;
  white-space: nowrap;
}
.studio-empty p { font-size: 14.5px; max-width: 420px; margin: 0; line-height: 1.55; }
.studio-empty .examples { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }
.studio-empty .ex {
  background: var(--surface-2); border: 1px solid var(--line);
  color: var(--text-2); font-family: inherit; font-weight: 600; font-size: 13px;
  padding: 8px 13px; border-radius: 99px; cursor: pointer;
}
.studio-empty .ex:hover { background: var(--accent-soft); color: var(--text); border-color: var(--accent-ring); }

/* composer (bottom) */
.composer-wrap { flex: 0 0 auto; padding: 14px 36px 26px; }
.composer {
  width: 100%;
  background: rgba(20, 20, 24, 0.9);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 12px 12px 12px 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  box-shadow: 0 22px 54px -24px rgba(0,0,0,.78);
  transition: border-color .2s, box-shadow .2s;
}
/* Превью загруженного фото — отдельной строкой ВНУТРИ рамки композера */
.composer .attach-preview { order: -1; flex: 0 0 100%; width: 100%; margin: 2px 0 0; }
.composer:focus-within {
  border-color: var(--accent-ring);
  box-shadow: 0 22px 54px -24px rgba(0,0,0,.78), 0 0 0 4px var(--accent-soft);
}
.composer input,
.composer textarea {
  flex: 1 1 auto; min-width: 0;
  background: transparent; border: 0; outline: 0;
  color: var(--text); font-family: inherit; font-size: 15.5px;
}
.composer textarea {
  resize: none;
  overflow-y: auto;
  overscroll-behavior: contain;
  line-height: 1.5;
  max-height: 240px;
  padding: 0; margin: 0;
  display: block;
  scrollbar-width: thin;
}
.composer textarea::-webkit-scrollbar { width: 8px; height: 0; }
.composer textarea::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
.composer textarea::-webkit-scrollbar-track { background: transparent; }
.composer textarea::-webkit-scrollbar-thumb { background: var(--text-3); border-radius: 4px; }
.composer textarea::-webkit-scrollbar-thumb:hover { background: var(--text-2); }
.composer input::placeholder,
.composer textarea::placeholder { color: var(--text-3); }

/* ============================================================
   SETTINGS PANEL
   ============================================================ */
.settings-panel {
  width: 372px;
  flex: 0 0 372px;
  border-left: 1px solid var(--line);
  height: 100vh;
  overflow-y: auto;
  padding: 22px 20px 26px;
  background: var(--bg-rail);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.settings-panel::-webkit-scrollbar { width: 8px; }
.settings-panel::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }

/* model / style selector rows */
.set-select {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 12px 14px;
  cursor: pointer;
  box-shadow: 0 2px 10px -6px rgba(0,0,0,.5);
  transition: border-color .15s, box-shadow .2s;
}
.set-select:hover, .set-select.open { border-color: var(--line-strong); box-shadow: 0 10px 28px -14px rgba(0,0,0,.6); }
.set-select .set-ico {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
}
.set-select .set-ico.grad { background: linear-gradient(150deg, var(--accent-2), var(--accent)); }
.set-select .set-ico.flask { background: var(--surface-3); color: var(--text-2); }
.set-select .set-ico svg { width: 20px; height: 20px; }
.set-select .set-ico.has-prev { background: none; padding: 0; overflow: hidden; }
.set-select .set-ico.has-prev img,
.set-select .set-ico.has-prev video { width: 100%; height: 100%; object-fit: cover; display: block; }
.set-select .set-meta { flex: 1 1 auto; min-width: 0; }
.set-select .set-label { font-size: 12px; color: var(--text-3); font-weight: 600; }
.set-select .set-value { font-size: 15px; color: var(--text); font-weight: 700; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; word-break: normal; }
.set-select .set-chev { width: 18px; height: 18px; color: var(--text-3); flex: 0 0 auto; }

/* стоимость генерации в блоке выбранной модели (значок токена + число) */
.set-select .set-cost {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}
.set-select .set-coin {
  width: 14px; height: 14px; border-radius: 50%; flex: 0 0 auto;
  background: linear-gradient(160deg, #f0d97a, #c79a2e);
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.35);
}

.set-menu {
  position: absolute;
  top: calc(100% + 6px); bottom: auto; left: 0; right: 0;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 20px 50px -16px rgba(0,0,0,.85);
  z-index: 200;
  animation: asstIn .15s ease;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.set-menu::-webkit-scrollbar { width: 8px; }
.set-menu::-webkit-scrollbar-track { background: transparent; }
.set-menu::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid var(--surface); }
.set-menu button {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; background: transparent; border: 0;
  color: var(--text-2); font-family: inherit; font-weight: 600; font-size: 14px;
  padding: 10px 11px; border-radius: 8px; cursor: pointer;
}
.set-menu button:hover { background: var(--surface-2); color: var(--text); }
.set-menu button.sel { color: var(--text); }
.set-menu button.sel::after { content: "✓"; margin-left: auto; color: var(--accent-2); font-weight: 800; }

/* бегунок «Сохранить результат»: недоступен, пока нет результата */
.set-block.is-disabled { opacity: .45; pointer-events: none; }
/* благодарность за сохранение — заметка в ленте чата */
.feed-note {
  align-self: center;
  margin: 8px auto 4px;
  padding: 9px 15px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  color: var(--text);
  border-radius: 11px;
  font-size: 13px;
  text-align: center;
  max-width: 540px;
}

/* blocks */
.set-block { display: flex; flex-direction: column; gap: 12px; }
.set-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 15px; font-weight: 700; color: var(--text);
}
.set-title .q {
  width: 17px; height: 17px; border-radius: 50%;
  border: 1.5px solid var(--text-3); color: var(--text-3);
  display: inline-grid; place-items: center; font-size: 10px; font-weight: 700;
}

/* dimension grid */
.dim-grid, .num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.dim-cell {
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  padding: 14px 0 11px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--text-2);
  font-family: inherit; font-weight: 700; font-size: 13px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.dim-cell:hover { border-color: var(--line-strong); color: var(--text); }
.dim-cell.active { border-color: var(--accent); background: var(--accent-soft); color: #fff; box-shadow: 0 0 0 1px var(--accent-ring), 0 6px 18px -10px var(--accent-ring); }
.dim-cell .frame {
  border: 2px solid currentColor; border-radius: 4px; opacity: .9;
}
.dim-cell.active .frame { color: #fff; opacity: 1; }

/* number grid */
.num-grid { grid-template-columns: repeat(5, 1fr); }
.num-cell {
  height: 52px;
  display: grid; place-items: center;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  font-family: inherit; font-weight: 700; font-size: 17px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.num-cell:hover { border-color: var(--line-strong); }
.num-cell.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-ring), 0 6px 18px -10px var(--accent-ring); }
.num-cell.more { color: var(--text-3); }
.num-cell.more svg { width: 18px; height: 18px; }

/* row with toggle */
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-row .set-title { flex: 1 1 auto; }

/* info tooltip */
.tip { position: relative; display: inline-flex; align-items: center; }
.tip .q { cursor: help; }
.tip-pop {
  display: none;
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%);
  width: 250px;
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: 12.5px; font-weight: 500; line-height: 1.5;
  color: var(--text-2);
  box-shadow: 0 18px 44px -14px rgba(0,0,0,.75);
  z-index: 80; white-space: normal; text-align: left;
}
.tip-pop::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--surface-3);
}
.tip:hover .tip-pop, .tip:focus-within .tip-pop { display: block; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 0; }
.switch input { display: none; }
.switch .track {
  width: 50px; height: 28px; border-radius: 99px;
  background: var(--surface-3); border: 1px solid var(--line);
  position: relative; cursor: pointer; transition: background .18s;
  display: flex; align-items: center; padding: 0 3px;
}
.switch .knob {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; transition: transform .18s;
  display: grid; place-items: center;
}
.switch .knob svg { width: 13px; height: 13px; color: var(--accent); display: none; }
.switch input:checked + .track { background: var(--upgrade); }
.switch input:checked + .track .knob { transform: translateX(22px); }
.switch input:checked + .track .knob svg { display: block; color: #2a4d00; }

.set-sep { height: 1px; background: var(--line); margin: 2px 0; }

.set-collapse {
  display: flex; align-items: center; gap: 8px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px; color: var(--text);
  padding: 2px 0;
}
.set-collapse .q { width: 17px; height: 17px; border-radius: 50%; border: 1.5px solid var(--text-3); color: var(--text-3); display: inline-grid; place-items: center; font-size: 10px; }
.set-collapse .set-chev { margin-left: auto; width: 18px; height: 18px; color: var(--text-3); transition: transform .18s; }
.set-collapse.open .set-chev { transform: rotate(180deg); }

/* quality grid */
.qual-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.qual-cell {
  height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.qual-cell:hover { border-color: var(--line-strong); color: var(--text); }
.qual-cell.active { border-color: var(--accent); background: var(--accent-soft); color: #fff; box-shadow: 0 0 0 1px var(--accent-ring), 0 6px 18px -10px var(--accent-ring); }

/* sound toggle (video only) */
.snd-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.snd-cell {
  height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-2);
  font-family: inherit; font-weight: 700; font-size: 14px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.snd-cell:hover { border-color: var(--line-strong); color: var(--text); }
.snd-cell.active { border-color: var(--accent); background: var(--accent-soft); color: #fff; box-shadow: 0 0 0 1px var(--accent-ring), 0 6px 18px -10px var(--accent-ring); }

/* ready-made ideas panel */
.ideas-panel {
  display: flex; flex-direction: column; gap: 12px;
  margin-top: 2px;
  animation: fadeUp .22s ease;
}
.ideas-panel[hidden] { display: none; }
.idea-current {
  display: flex; align-items: center; gap: 9px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-ring);
  border-radius: 12px;
  padding: 9px 9px 9px 13px;
}
.idea-current .ic-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex: 0 0 auto; }
.idea-current .ic-title { flex: 1 1 auto; font-size: 13.5px; font-weight: 700; color: var(--text); }
.idea-current .ic-x {
  flex: 0 0 auto;
  width: 26px; height: 26px; border-radius: 8px;
  border: 0; background: rgba(255,255,255,.08); color: var(--text-2);
  cursor: pointer; font-size: 13px; line-height: 1;
  display: grid; place-items: center;
}
.idea-current .ic-x:hover { background: rgba(255,255,255,.16); color: #fff; }

.idea-scroll {
  max-height: 320px;
  overflow-y: auto;
  margin: 0 -2px;
  padding: 2px;
}
.idea-scroll::-webkit-scrollbar { width: 8px; }
.idea-scroll::-webkit-scrollbar-track { background: transparent; }
.idea-scroll::-webkit-scrollbar-thumb {
  background: var(--surface-3);
  border-radius: 99px;
  border: 2px solid var(--surface);
}
.idea-scroll::-webkit-scrollbar-thumb:hover { background: #ffffff; }
.idea-scroll { scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.idea-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}
.idea-tile {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  padding: 0;
  transition: border-color .15s, transform .12s;
}
.idea-tile:hover { border-color: var(--line-strong); transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(0,0,0,.72); }
.idea-tile.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.idea-tile image-slot { position: absolute; inset: 0; width: 100%; height: 100%; }
.idea-tile .idea-media { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.idea-tile .idea-name {
  position: absolute; left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: 16px 9px 8px;
  font-size: 11.5px; font-weight: 700; color: #fff; text-align: left;
  background: linear-gradient(to top, rgba(10,10,12,.9), transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.idea-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  z-index: 3;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(12,12,16,.6);
  border: 1px solid rgba(255,255,255,.5);
  display: grid; place-items: center;
  color: #fff; pointer-events: none;
}
.idea-play svg { width: 16px; height: 16px; margin-left: 1px; }
.idea-play.big { width: 64px; height: 64px; }
.idea-play.big svg { width: 28px; height: 28px; }

.reset-btn {
  margin-top: auto;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 700; font-size: 15px; color: var(--text);
  padding: 12px;
}
.reset-btn:hover { color: var(--accent-2); }
.reset-btn svg { width: 18px; height: 18px; }

/* responsive: hide settings panel on narrow screens */
@media (max-width: 1100px) {
  .settings-panel { display: none; }
}

/* п6: кнопка «Сохранить фотосет» */
.ps-save-btn { background: rgba(124,92,255,.22) !important; }
.ps-save-btn.saved-done { background: #ffffff !important; }
