/* ═══════════════════════════════════════════════════════════════
   RËEL STUDIO — RËEL Voice Panel CSS
   Two-column layout: main creation area + right sidebar
   ═══════════════════════════════════════════════════════════════ */

/* ── Page Layout ─────────────────────────────────────────────── */
.rv-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  padding: 24px 24px 80px;
  box-sizing: border-box;
}

.rv-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  flex-shrink: 0;
}

.rv-header-left h1 {
  font-family: inherit;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  margin: 0 0 var(--sp-1);
  line-height: 1.2;
}

.rv-header-left h1 span {
  font-family: var(--ff-display);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  display: block;
  font-weight: 400;
  margin-bottom: var(--sp-1);
}

.rv-header-left p {
  font-family: var(--ff-serif);
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin: 0;
}

.rv-header-actions {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-shrink: 0;
}

.rv-btn-outline {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: var(--sp-2) var(--sp-4);
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 6px;
  color: var(--text-muted);
  font-family: var(--ff-body);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.rv-btn-outline:hover {
  border-color: rgba(255,255,255,0.3);
  color: var(--text);
  background: rgba(255,255,255,0.04);
}

/* ── Two-column body ─────────────────────────────────────────── */
.rv-body {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 20px;
  align-items: start;
  flex: 1;
}

/* ── Main Column ─────────────────────────────────────────────── */
.rv-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

/* ── Create Panel ────────────────────────────────────────────── */
.rv-create-panel {
  position: relative;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.07);
  overflow: hidden;
  background: #0d0b14;
}

.rv-create-inner {
  position: relative;
  z-index: 2;
  padding: 20px;
}

.rv-create-title {
  font-family: var(--ff-display);
  font-size: 16px;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 4px;
}

.rv-create-sub {
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 14px;
}

/* ── Microphone hero ─────────────────────────────────────────── */
.rv-mic-hero {
  position: absolute;
  top: 0; right: 0;
  width: 45%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
  background: url('/assets/voice/Microphone.png') center/cover no-repeat;
  mask-image: linear-gradient(to left, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
  -webkit-mask-image: linear-gradient(to left, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
}

/* Waveform overlay on mic hero */
.rv-waveform-overlay {
  position: absolute;
  bottom: 60px;
  right: 20px;
  width: 180px;
  height: 36px;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 2px;
}

.rv-waveform-overlay .rv-wbar {
  flex: 1;
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(144,92,255,0.9), rgba(144,92,255,0.3));
  animation: rvWavePulse 1.4s ease-in-out infinite;
}

@keyframes rvWavePulse {
  0%, 100% { transform: scaleY(0.4); opacity: 0.5; }
  50%       { transform: scaleY(1);   opacity: 1;   }
}

/* ── Textarea ────────────────────────────────────────────────── */
.rv-textarea-wrap {
  position: relative;
  margin-bottom: 14px;
  width: 55%;
}

.rv-textarea {
  width: 100%;
  min-height: 100px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  padding: 14px;
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 13px;
  line-height: 1.6;
  resize: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.rv-textarea::placeholder { color: var(--text-dim); }
.rv-textarea:focus { outline: none; border-color: rgba(144,92,255,0.4); }

.rv-char-count {
  position: absolute;
  bottom: 10px;
  right: 12px;
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--ff-body);
  pointer-events: none;
}

/* ── Mode Tiles ──────────────────────────────────────────────── */
.rv-modes {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 14px;
}

.rv-mode-tile {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.rv-mode-tile:hover {
  border-color: rgba(144,92,255,0.35);
  background: rgba(144,92,255,0.06);
}

.rv-mode-tile.active {
  border-color: rgba(144,92,255,0.6);
  background: rgba(144,92,255,0.12);
}

.rv-mode-tile-top {
  display: flex;
  align-items: center;
  gap: 7px;
}

.rv-mode-icon {
  width: 18px;
  height: 18px;
  color: rgba(144,92,255,0.85);
  flex-shrink: 0;
}

.rv-mode-tile.active .rv-mode-icon { color: #b26dff; }

.rv-mode-label {
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.rv-mode-tile.active .rv-mode-label { color: var(--text); }

.rv-mode-sub {
  font-family: var(--ff-body);
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
  padding-left: 25px;
}

/* ── Dropdowns row ───────────────────────────────────────────── */
.rv-dropdowns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.rv-dropdown-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.rv-dropdown-label {
  font-family: var(--ff-display);
  font-size: 9px;
  letter-spacing: 0.15em;
  color: var(--text-dim);
  text-transform: uppercase;
}

.rv-select {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 6px;
  padding: 7px 10px;
  color: var(--text-muted);
  font-family: var(--ff-body);
  font-size: 12px;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  transition: border-color 0.2s;
}

.rv-select:focus { outline: none; border-color: rgba(144,92,255,0.4); }

/* ── Advanced Settings ───────────────────────────────────────── */
.rv-advanced-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  cursor: pointer;
}

.rv-toggle-switch {
  width: 32px;
  height: 18px;
  background: rgba(255,255,255,0.1);
  border-radius: 9px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.rv-toggle-switch.on { background: rgba(144,92,255,0.6); }

.rv-toggle-knob {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--text);
  transition: transform 0.2s;
}

.rv-toggle-switch.on .rv-toggle-knob { transform: translateX(14px); }

.rv-advanced-label {
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.rv-advanced-panel {
  display: none;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 8px;
  padding: 14px;
  margin-bottom: 14px;
}

.rv-advanced-panel.open { display: block; }

.rv-advanced-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ── Generate Button ─────────────────────────────────────────── */
.rv-generate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(90deg, #7B3FF2, #C850C0, #D4A843);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-family: var(--ff-display);
  font-size: 14px;
  letter-spacing: 0.2em;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}

.rv-generate-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(167,139,250,0.4);
}

.rv-generate-btn:active { transform: translateY(0); }
.rv-generate-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.rv-generate-btn-sub {
  display: block;
  font-family: var(--ff-body);
  font-size: 10px;
  letter-spacing: 0.05em;
  opacity: 0.7;
  margin-top: 2px;
}

/* ── Progress bar ────────────────────────────────────────────── */
.rv-progress-wrap { margin-top: 12px; display: none; }
.rv-progress-label { font-size: 11px; color: var(--text-muted); font-family: var(--ff-body); margin-bottom: 6px; }
.rv-progress-track { height: 3px; background: rgba(255,255,255,0.07); border-radius: 2px; overflow: hidden; }
.rv-progress-bar { height: 100%; background: linear-gradient(90deg, var(--violet), #c2410c); border-radius: 2px; width: 0%; transition: width 0.4s ease; }

/* ── Result box ──────────────────────────────────────────────── */
.rv-result-box {
  display: none;
  margin-top: 14px;
  background: rgba(144,92,255,0.06);
  border: 1px solid rgba(144,92,255,0.25);
  border-radius: 8px;
  padding: 16px;
}

/* ── Voice Tools Section ─────────────────────────────────────── */
.rv-tools-section {
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.01);
  padding: 18px 20px;
}

.rv-tools-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.rv-tools-title {
  font-family: var(--ff-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 3px;
}

.rv-tools-sub {
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.rv-view-all {
  font-family: var(--ff-body);
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  transition: color 0.2s;
  white-space: nowrap;
}

.rv-view-all:hover { color: var(--text-muted); }

.rv-tools-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.rv-tool-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 16px 10px 14px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.rv-tool-card:hover {
  border-color: rgba(144,92,255,0.3);
  background: rgba(144,92,255,0.05);
  transform: translateY(-2px);
}

.rv-tool-icon {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rv-tool-icon svg {
  width: 36px;
  height: 36px;
}

.rv-tool-name {
  font-family: var(--ff-body);
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.3;
}

.rv-tool-desc {
  font-family: var(--ff-body);
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}

/* ── Right Sidebar ───────────────────────────────────────────── */
.rv-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rv-sidebar-section {
  background: rgba(255,255,255,0.01);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 16px;
}

.rv-sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}

.rv-sidebar-title {
  font-family: var(--ff-display);
  font-size: 13px;
  letter-spacing: 0.12em;
  color: var(--text);
  margin: 0 0 2px;
}

.rv-sidebar-sub {
  font-family: var(--ff-body);
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 0 14px;
}

/* ── Voice entries ───────────────────────────────────────────── */
.rv-voice-list { display: flex; flex-direction: column; gap: 10px; }

.rv-voice-entry {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.rv-voice-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, #4c1d95, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 11px;
  color: rgba(255,255,255,0.8);
  overflow: hidden;
}

.rv-voice-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-voice-info { flex: 1; min-width: 0; }

.rv-voice-name {
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-voice-type {
  font-family: var(--ff-body);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}

.rv-voice-wave {
  display: flex;
  align-items: center;
  gap: 1.5px;
  height: 20px;
  flex-shrink: 0;
}

.rv-voice-wave span {
  display: block;
  width: 2px;
  border-radius: 1px;
  background: #4ade80;
  animation: rvVoiceWave 1.2s ease-in-out infinite;
}

.rv-voice-wave span:nth-child(2)  { animation-delay: 0.1s; background: #34d399; }
.rv-voice-wave span:nth-child(3)  { animation-delay: 0.2s; }
.rv-voice-wave span:nth-child(4)  { animation-delay: 0.3s; background: #34d399; }
.rv-voice-wave span:nth-child(5)  { animation-delay: 0.15s; }
.rv-voice-wave span:nth-child(6)  { animation-delay: 0.25s; background: #34d399; }
.rv-voice-wave span:nth-child(7)  { animation-delay: 0.05s; }
.rv-voice-wave span:nth-child(8)  { animation-delay: 0.35s; background: #34d399; }
.rv-voice-wave span:nth-child(9)  { animation-delay: 0.2s; }
.rv-voice-wave span:nth-child(10) { animation-delay: 0.1s; background: #34d399; }

@keyframes rvVoiceWave {
  0%, 100% { height: 4px;  opacity: 0.5; }
  50%       { height: 16px; opacity: 1; }
}

.rv-voice-menu {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 4px;
  transition: color 0.2s;
  flex-shrink: 0;
}

.rv-voice-menu:hover { color: var(--text-muted); }

/* ── Recent Generations ──────────────────────────────────────── */
.rv-gen-list { display: flex; flex-direction: column; gap: 10px; }

.rv-gen-entry {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rv-gen-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}

.rv-gen-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.rv-gen-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.35);
  transition: background 0.2s;
  cursor: pointer;
  border: none;
}

.rv-gen-play:hover { background: rgba(0,0,0,0.55); }

.rv-gen-play svg { width: 16px; height: 16px; color: #fff; }

.rv-gen-info { flex: 1; min-width: 0; }

.rv-gen-title {
  font-family: var(--ff-body);
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rv-gen-meta {
  font-family: var(--ff-body);
  font-size: 10px;
  color: var(--text-dim);
  margin-top: 1px;
}

.rv-gen-duration {
  font-family: var(--ff-body);
  font-size: 11px;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── Loading / Empty states ──────────────────────────────────── */
.rv-empty {
  text-align: center;
  padding: 20px 10px;
  color: var(--text-dim);
  font-family: var(--ff-body);
  font-style: italic;
  font-size: 12px;
}

/* nav-lucide icon styles live in layout.css */

