/* ==========================================================================
   PROMPTMASTER AI — COMPONENTE: EDITOR (Editor de Texto com Linhas e Contadores)
   ========================================================================== */

.editor-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 520px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border-glass);
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #FFF;
}

.card-title i {
  color: var(--secondary);
  width: 20px;
  height: 20px;
}

.card-title h2 {
  font-size: 1.15rem;
  font-weight: 600;
}

.editor-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 2. IDE-style Editor Container */
.editor-container {
  display: flex;
  flex: 1;
  background: rgba(3, 4, 9, 0.4);
  border-bottom: 1px solid var(--border-glass);
  min-height: 360px;
  position: relative;
}

/* Line Number Gutter */
.line-numbers {
  width: 44px;
  padding: 20px 0;
  text-align: right;
  padding-right: 12px;
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  color: var(--text-darker);
  border-right: 1px solid rgba(255, 255, 255, 0.04);
  user-select: none;
  background: rgba(3, 4, 9, 0.2);
  overflow: hidden;
}

.line-numbers div {
  height: 24px;
  line-height: 24px;
}

/* Textarea input */
#promptInput {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  padding: 20px 24px;
  color: #F8FAFC;
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.95rem;
  line-height: 24px;
  height: 100%;
  width: 100%;
  min-height: 360px;
}

#promptInput::placeholder {
  color: rgba(148, 163, 184, 0.4);
  font-style: italic;
  line-height: 1.6;
}

/* 3. Editor Footer Actions */
.editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: rgba(255, 255, 255, 0.01);
  border-bottom-left-radius: 20px;
  border-bottom-right-radius: 20px;
}

.primary-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

@media (max-width: 600px) {
  .editor-footer {
    flex-direction: column-reverse;
    gap: 16px;
    align-items: stretch;
  }
  
  .primary-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  
  .btn {
    width: 100%;
  }
}
