/* ═══════════════════════════════════════════════════════════════
   ARANTES TECNOLOGIA — CONFIGURADOR UNIVERSAL DE SITES
   configurador-layout.css — Layout 3 Colunas, Live Preview & Telas
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. ESTRUTURA GERAL DA JANELA ── */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
  font-family: var(--font-sans);
}

.cfg-wrapper {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* ── 2. HEADER SUPERIOR COMPACTO ── */
.cfg-topbar {
  height: 56px;
  min-height: 56px;
  background-color: rgba(18, 18, 24, 0.95);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 50;
}

.cfg-brand {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.cfg-brand-logo {
  height: 28px;
  width: auto;
  display: block;
}

.cfg-brand-divider {
  width: 1px;
  height: 20px;
  background-color: hsl(var(--border));
}

.cfg-brand-title {
  font-family: var(--font-heading);
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cfg-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Indicador de Sincronização em Nuvem */
.sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background-color: rgba(24, 24, 27, 0.7);
  border: 1px solid hsl(var(--border));
  transition: all var(--transition-fast);
}

.sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #71717a;
  transition: background-color var(--transition-fast);
}

.sync-indicator.saved .sync-dot { background-color: #10b981; box-shadow: 0 0 8px rgba(16, 185, 129, 0.6); }
.sync-indicator.saving .sync-dot { background-color: #f59e0b; animation: pulse 1s infinite; }
.sync-indicator.conflict .sync-dot { background-color: #ef4444; }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}

/* ── 3. CORPO PRINCIPAL EM 3 COLUNAS ── */
.cfg-main-grid {
  display: grid;
  grid-template-columns: 390px 1fr 310px;
  height: calc(100vh - 56px);
  width: 100%;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   COLUNA 1: ETAPAS & FORMULÁRIOS
   ═══════════════════════════════════════════════════════════════ */
.cfg-steps-sidebar {
  background-color: #0c0c0f;
  border-right: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 20;
}

/* Barra de Progresso e Navegação das 8 Etapas */
.steps-progress-card {
  padding: 1rem 1.25rem 0.875rem 1.25rem;
  background-color: rgba(18, 18, 24, 0.8);
  border-bottom: 1px solid hsl(var(--border));
}

.progress-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.progress-title {
  font-size: 0.8125rem;
  font-weight: 600;
  color: hsl(var(--foreground));
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.progress-badge {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--arantes-purple-light);
}

.progress-track {
  width: 100%;
  height: 4px;
  background-color: var(--zinc-800);
  border-radius: 9999px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  width: 12.5%;
  background: linear-gradient(90deg, var(--arantes-purple), var(--arantes-cyan));
  border-radius: 9999px;
  transition: width 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Seletor Horizontal Scrollável de Etapas */
.steps-pill-nav {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 1rem;
  background-color: rgba(12, 12, 15, 0.9);
  border-bottom: 1px solid hsl(var(--border));
  overflow-x: auto;
  scrollbar-width: none;
}
.steps-pill-nav::-webkit-scrollbar { display: none; }

.step-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.35rem 0.65rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  background-color: var(--zinc-900);
  color: hsl(var(--muted-foreground));
  border: 1px solid var(--zinc-800);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.step-pill-btn:hover {
  color: hsl(var(--foreground));
  border-color: var(--zinc-700);
}

.step-pill-btn.active {
  background-color: var(--arantes-purple);
  color: #fff;
  border-color: var(--arantes-purple);
  box-shadow: 0 0 10px var(--arantes-purple-glow);
}

.step-pill-btn.completed {
  color: #10b981;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Formulário com Scroll Suave */
.step-form-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
}

.step-pane {
  display: none;
  animation: fadeIn 200ms ease;
}
.step-pane.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-header-banner {
  margin-bottom: 1.25rem;
}

.step-header-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  color: hsl(var(--foreground));
}

.step-header-desc {
  font-size: 0.8125rem;
  color: hsl(var(--muted-foreground));
  margin: 0;
  line-height: 1.45;
}

/* Rodapé de Ações do Formulário */
.step-form-footer {
  padding: 0.875rem 1.25rem;
  background-color: rgba(18, 18, 24, 0.95);
  border-top: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

/* ═══════════════════════════════════════════════════════════════
   COLUNA 2: LIVE PREVIEW RESPONSIVO EM TEMPO REAL
   ═══════════════════════════════════════════════════════════════ */
.cfg-preview-viewport {
  background-color: #050508;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* Toolbar Superior do Preview */
.preview-browser-toolbar {
  height: 44px;
  min-height: 44px;
  background-color: rgba(18, 18, 24, 0.9);
  border-bottom: 1px solid hsl(var(--border));
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  gap: 1rem;
  z-index: 10;
}

.preview-address-bar {
  flex: 1;
  max-width: 480px;
  height: 26px;
  background-color: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  padding: 0 0.625rem;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--zinc-400);
  font-family: var(--font-mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-address-bar .lock-icon {
  color: #10b981;
}

.preview-device-switcher {
  display: flex;
  align-items: center;
  background-color: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.device-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 22px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: hsl(var(--muted-foreground));
  cursor: pointer;
  font-size: 0.8125rem;
  transition: all var(--transition-fast);
}

.device-btn:hover {
  color: hsl(var(--foreground));
}

.device-btn.active {
  background-color: var(--zinc-800);
  color: #fff;
}

/* Palco de Renderização do Preview */
.preview-stage-container {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1.25rem;
  overflow-y: auto;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.05) 0%, transparent 70%);
}

.mockup-browser-window {
  width: 100%;
  max-width: 100%;
  background-color: var(--preview-bg, #09090b);
  color: var(--preview-fg, #fafafa);
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 1px 1px rgba(255, 255, 255, 0.05);
  transition: max-width 300ms cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.mockup-browser-window.view-tablet {
  max-width: 768px;
}

.mockup-browser-window.view-mobile {
  max-width: 375px;
}

/* ── MOCKUP DO SITE AO VIVO (SEÇÕES REATIVAS) ── */
:root {
  --preview-primary: #7c3aed;
  --preview-secondary: #c084fc;
  --preview-bg: #09090b;
  --preview-surface: #18181b;
  --preview-fg: #fafafa;
  --preview-font-heading: 'Manrope', sans-serif;
  --preview-font-body: 'Inter', sans-serif;
}

.mock-site {
  font-family: var(--preview-font-body);
  background-color: var(--preview-bg);
  color: var(--preview-fg);
  min-height: 600px;
}

/* Header Mock */
.mock-site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background-color: rgba(18, 18, 24, 0.6);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 5;
}

.mock-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--preview-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.mock-nav-logo-img {
  height: 28px;
  max-width: 120px;
  object-fit: contain;
}

.mock-nav-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.7);
}

.mock-nav-cta {
  background-color: var(--preview-primary);
  color: #fff;
  padding: 0.35rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}

/* Hero Section Mock */
.mock-hero-section {
  padding: 3rem 1.5rem 2.5rem 1.5rem;
  text-align: center;
  position: relative;
  background: radial-gradient(circle at 50% 0%, rgba(124, 58, 237, 0.15), transparent 70%);
}

.mock-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  background-color: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.75rem;
  margin-bottom: 1rem;
  color: var(--preview-secondary);
}

.mock-hero-headline {
  font-family: var(--preview-font-heading);
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 auto 0.75rem auto;
  max-width: 650px;
  line-height: 1.2;
}

.mock-hero-sub {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.75);
  margin: 0 auto 1.5rem auto;
  max-width: 520px;
  line-height: 1.5;
}

.mock-hero-ctas {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

/* Grid de Serviços Mock */
.mock-section {
  padding: 2.25rem 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.mock-section-title {
  font-family: var(--preview-font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.375rem 0;
  text-align: center;
}

.mock-section-desc {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
  margin: 0 auto 1.5rem auto;
  max-width: 480px;
}

.mock-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.875rem;
}

.mock-service-card {
  background-color: var(--preview-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1rem;
  transition: transform 150ms ease;
}

.mock-service-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: rgba(124, 58, 237, 0.15);
  color: var(--preview-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.625rem;
  font-size: 1rem;
}

/* Instagram Feed Mock */
.mock-instagram-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
}

.mock-instagram-item {
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  background-color: var(--zinc-800);
}

.mock-instagram-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 200ms ease;
}

.mock-instagram-item:hover .mock-instagram-img {
  transform: scale(1.05);
}

.mock-instagram-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 150ms ease;
  color: #fff;
  font-size: 0.875rem;
  gap: 0.5rem;
}
.mock-instagram-item:hover .mock-instagram-overlay {
  opacity: 1;
}

/* Botão WhatsApp Flutuante no Mock */
.mock-wa-floating {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: #25d366;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 10;
  text-decoration: none;
}

/* ═══════════════════════════════════════════════════════════════
   COLUNA 3: COLABORAÇÃO & AUDITORIA
   ═══════════════════════════════════════════════════════════════ */
.cfg-collab-sidebar {
  background-color: #0c0c0f;
  border-left: 1px solid hsl(var(--border));
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  z-index: 20;
}

.collab-pane-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid hsl(var(--border));
  background-color: rgba(18, 18, 24, 0.8);
}

.collab-pane-title {
  font-family: var(--font-heading);
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: hsl(var(--foreground));
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.collab-pane-content {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

/* Seção de Participantes Online */
.collab-card-box {
  background-color: var(--zinc-900);
  border: 1px solid var(--zinc-800);
  border-radius: var(--radius);
  padding: 0.875rem;
}

.collab-card-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: hsl(var(--muted-foreground));
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin-bottom: 0.625rem;
}

.collab-users-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.collab-user-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.375rem 0.5rem;
  background-color: var(--zinc-950);
  border-radius: var(--radius-sm);
  border: 1px solid var(--zinc-800);
  font-size: 0.8125rem;
}

.collab-user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.collab-user-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background-color: var(--arantes-purple);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6875rem;
  font-weight: 700;
}

/* Feed de Alterações */
.audit-log-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.audit-log-item {
  padding: 0.5rem 0.625rem;
  background-color: var(--zinc-950);
  border: 1px solid var(--zinc-800);
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  line-height: 1.4;
}

.audit-log-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.25rem;
  color: var(--zinc-400);
}

.audit-log-author {
  font-weight: 600;
  color: hsl(var(--foreground));
}

.audit-log-field {
  color: var(--arantes-purple-light);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
}

/* ── 4. CHIPS DE SERVIÇOS & DIFERENCIAIS ── */
.tags-input-container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  padding: 0.375rem;
  border-radius: var(--radius);
  border: 1px solid hsl(var(--border));
  background-color: rgba(24, 24, 27, 0.45);
  min-height: 2.375rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--zinc-800);
  color: hsl(var(--foreground));
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--zinc-700);
}

.tag-chip-remove {
  cursor: pointer;
  color: hsl(var(--muted-foreground));
  display: inline-flex;
}
.tag-chip-remove:hover { color: #ef4444; }

.tag-raw-input {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  outline: none;
  flex: 1;
  min-width: 120px;
}

/* ── 5. CARDS DE ESTILO E PALETA ── */
.style-cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.style-select-card {
  border: 1px solid var(--zinc-800);
  background-color: var(--zinc-900);
  border-radius: var(--radius);
  padding: 0.875rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  text-align: center;
}

.style-select-card:hover {
  border-color: var(--zinc-600);
}

.style-select-card.active {
  border-color: var(--arantes-purple);
  background-color: rgba(124, 58, 237, 0.1);
  box-shadow: 0 0 12px var(--arantes-purple-glow);
}

.palette-preset-card {
  border: 1px solid var(--zinc-800);
  background-color: var(--zinc-900);
  border-radius: var(--radius);
  padding: 0.625rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all var(--transition-fast);
}

.palette-preset-card:hover {
  border-color: var(--zinc-600);
}

.palette-preset-card.active {
  border-color: var(--arantes-purple);
  box-shadow: 0 0 10px var(--arantes-purple-glow);
}

.swatch-group {
  display: flex;
  gap: 4px;
}

.swatch-circle {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ── 6. RESPONSIVIDADE DO CONFIGURADOR ── */
@media (max-width: 1200px) {
  .cfg-main-grid {
    grid-template-columns: 360px 1fr 260px;
  }
}

@media (max-width: 992px) {
  .cfg-main-grid {
    grid-template-columns: 360px 1fr;
  }
  .cfg-collab-sidebar {
    display: none;
  }
}

@media (max-width: 768px) {
  .cfg-main-grid {
    grid-template-columns: 1fr;
  }
  .cfg-preview-viewport {
    display: none;
  }
}
