/* Editor de Artigo - Estilos */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: #0a0a0a;
  color: #ffffff;
  min-height: 100vh;
}

/* Header */
.editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: #111;
  border-bottom: 1px solid #333;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #888;
  text-decoration: none;
  padding: 0.5rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.back-btn:hover {
  color: #fff;
  background: #333;
}

.editor-header h1 {
  font-size: 1.5rem;
  font-weight: 600;
}

.actions {
  display: flex;
  gap: 0.5rem;
}

.btn-save {
  background: #28a745;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-save:hover {
  background: #218838;
}

.btn-publish {
  background: #0066cc;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
}

.btn-publish:hover {
  background: #0052a3;
}

/* Tabs */
.tabs {
  display: flex;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}

.tab {
  background: none;
  border: none;
  color: #888;
  padding: 1rem 2rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
}

.tab:hover {
  color: #fff;
  background: #333;
}

.tab.active {
  color: #0066cc;
  border-bottom-color: #0066cc;
}

/* Container */
.editor-container {
  flex: 1;
  overflow: hidden;
}

/* Tab Content */
.tab-content {
  display: none;
  height: calc(100vh - 140px);
  overflow-y: auto;
}

.tab-content.active {
  display: block;
}

/* Content Editor */
.content-editor {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  background: #1a1a1a;
  border-bottom: 1px solid #333;
}

.toolbar button {
  background: #333;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.toolbar button:hover {
  background: #555;
}

.content-area {
  flex: 1;
  padding: 2rem;
  background: #111;
  outline: none;
  font-size: 1rem;
  line-height: 1.6;
  min-height: 500px;
}

.content-area p {
  margin-bottom: 1rem;
}

.content-area h2 {
  margin: 2rem 0 1rem 0;
  color: #fff;
}

.content-area blockquote {
  border-left: 4px solid #0066cc;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #ccc;
}

/* Image Editor */
.image-editor {
  padding: 2rem;
}

.image-editor h3 {
  margin-bottom: 1.5rem;
}

.image-upload {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.btn-upload, .btn-load {
  background: #0066cc;
  color: white;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-upload:hover, .btn-load:hover {
  background: #0052a3;
}

.image-url-input {
  flex: 1;
  min-width: 300px;
  padding: 0.75rem;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  color: white;
  font-size: 0.9rem;
}

.image-preview {
  border: 2px dashed #555;
  border-radius: 8px;
  padding: 2rem;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-preview img {
  max-width: 100%;
  max-height: 400px;
  border-radius: 8px;
}

/* Meta Editor */
.meta-editor {
  padding: 2rem;
  max-width: 600px;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #ccc;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: #333;
  border: 1px solid #555;
  border-radius: 6px;
  color: white;
  font-size: 0.9rem;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #0066cc;
}

.form-group input[readonly] {
  background: #222;
  color: #888;
}

/* Preview */
.preview-container {
  padding: 2rem;
  background: #111;
  height: 100%;
}

.article-preview {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  color: black;
  padding: 2rem;
  border-radius: 8px;
  min-height: 500px;
}

.article-preview h1 {
  margin-bottom: 1rem;
  color: #333;
}

.article-preview h2 {
  margin: 2rem 0 1rem 0;
  color: #333;
}

.article-preview p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.article-preview blockquote {
  border-left: 4px solid #0066cc;
  padding-left: 1rem;
  margin: 1rem 0;
  font-style: italic;
  color: #666;
}

/* Responsivo */
@media (max-width: 768px) {
  .editor-header {
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
  }
  
  .tabs {
    overflow-x: auto;
  }
  
  .tab {
    white-space: nowrap;
    padding: 1rem;
  }
  
  .image-upload {
    flex-direction: column;
    align-items: stretch;
  }
  
  .image-url-input {
    min-width: auto;
  }
}