/* ============================================================
   AI Content Assistant — Brand Voice Writer Styles
   ============================================================ */

.tool-area {
  padding: var(--space-8) 0 var(--space-12);
  background: var(--color-bg-secondary);
  min-height: calc(100vh - var(--nav-height) - 200px);
}

.tool-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: var(--space-8);
  align-items: start;
}

.tool-main {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
}

.tool-section-block {
  margin-bottom: var(--space-8);
  padding-bottom: var(--space-8);
  border-bottom: 1px solid var(--color-border-light);
}

.tool-section-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.tool-step-title {
  font-size: var(--text-h4);
  margin-bottom: var(--space-2);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.step-badge {
  display: inline-flex;
  width: 28px;
  height: 28px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  font-size: var(--text-small);
  font-weight: var(--weight-bold);
  flex-shrink: 0;
}

.tool-step-desc {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
  margin-left: var(--space-10);
}

.learn-status {
  margin-top: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-md);
  font-size: var(--text-small);
  font-weight: var(--weight-medium);
}

.learn-status.success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--color-accent-dark);
}

.learn-status.error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--color-error);
}

/* Sidebar */
.tool-sidebar {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  position: sticky;
  top: calc(var(--nav-height) + var(--space-8));
}

.sidebar-title {
  font-size: var(--text-h4);
  margin-bottom: var(--space-2);
}

.sidebar-desc {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Result Area */
.result-area {
  margin-top: var(--space-6);
  padding: var(--space-6);
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  animation: fadeIn 0.3s ease-out;
}

.result-content {
  font-size: var(--text-body);
  line-height: var(--leading-relaxed);
  color: var(--color-text-primary);
  white-space: pre-wrap;
  margin: var(--space-4) 0;
  padding: var(--space-4);
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md);
  max-height: 400px;
  overflow-y: auto;
}

/* Save Dialog */
.save-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  padding: var(--space-4);
}

.save-dialog-inner {
  background: var(--color-bg);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  max-width: 400px;
  width: 100%;
  box-shadow: var(--shadow-xl);
}

.save-dialog h3 {
  margin-bottom: var(--space-2);
}

.save-dialog p {
  font-size: var(--text-small);
  color: var(--color-text-muted);
  margin-bottom: var(--space-4);
}

/* Responsive */
@media (max-width: 1023px) {
  .tool-layout {
    grid-template-columns: 1fr;
  }
  .tool-sidebar {
    position: static;
    order: -1;
  }
}
