/* ===== ПАНЕЛИ ЗАПИСИ / РЕДАКТИРОВАНИЯ ===== */
.recording-panel.hidden,
.content-panel.hidden {
  display: none;
}

/* Кнопки управления записью — всегда в строку */
.recording-controls {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.recording-controls .btn {
  flex: 1;
  justify-content: center;
}

.content-buttons {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.content-buttons .btn {
  flex: 0 0 auto;
}

/* ===== ЭКСПОРТ: FORMAT + РЕЗУЛЬТАТ ===== */
.export-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.export-format-label {
  font-size: 13px;
  color: #646b75;
}

#exportResult {
  padding: 12px 14px;
  background: #f6f8ff;
  border-left: 4px solid #0000ff;
  border-radius: 10px;
  font-size: 13px;
  color: #1b1f24;
  text-align: left;
}

#exportResult.success {
  background: #ecfdf5;
  border-left-color: #10b981;
  color: #047857;
}

#exportResult.error {
  background: #fef2f2;
  border-left-color: #ef4444;
  color: #b91c1c;
}

#exportResult.warning {
  background: #fff7ed;
  border-left-color: #f59e0b;
  color: #92400e;
}

/* ===== ПАНЕЛЬ ИСТОРИИ ВЕРСИЙ ===== */
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 10px 0;
  gap: 8px;
}

.history-label {
  font-size: 13px;
  font-weight: 500;
  color: #646b75;
}

.history-buttons {
  display: flex;
  gap: 6px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #0000ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease, transform 0.12s ease;
  padding: 0;
}

.icon-btn:hover:not(:disabled) {
  background: #eef2ff;
  border-color: #c7d2fe;
  box-shadow: 0 4px 10px rgba(0, 0, 255, 0.12);
  transform: translateY(-1px);
}

.icon-btn:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  box-shadow: none;
  transform: none;
}

.icon-svg {
  width: 18px;
  height: 18px;
  display: block;
}

.edit-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
}

.edit-restore {
  margin-top: 10px;
}

.edit-history-controls {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

/* ===== ПЕРЕКЛЮЧАТЕЛИ ВИДА ===== */
#viewToggle {
  display: flex;
  gap: 8px;
  margin: 4px 0;
}

#viewToggle .btn {
  flex: 1;
  max-width: 160px;
}

/* ===== АДАПТИВНОСТЬ (МОБИЛЬНАЯ) ===== */
@media (max-width: 768px) {
  body {
    padding: 10px;
    align-items: flex-start;
  }

  .container {
    max-width: 100%;
    padding: 20px 16px;
  }

  h1 {
    font-size: 22px;
  }

  /* Кнопки записи — остаются в строку даже на мобильных */
  .recording-controls {
    flex-direction: row; /* явно задаем строку */
    gap: 8px;
  }
  
  .recording-controls .btn {
    padding: 10px 8px;
    font-size: 13px;
  }

  /* Кнопки экспорта и другие — остаются в колонку */
  .content-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .export-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-left: 0;
  }

  .export-format-select {
    flex: 1;
  }

  .edit-input-group {
    flex-direction: column;
  }
}