/**
 * ARCO Calendar v8.2 - Componentes Base
 * Botões, badges, cards e elementos de UI
 */

/* ═══════════════════════════════════════════════════════════════
   BOTÕES
   ═══════════════════════════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: var(--touch-min);
  padding: var(--space-sm) var(--space-lg);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-family);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--arco-laranja);
  outline-offset: 2px;
}

/* Botão Primário (WhatsApp - CTA principal) */
.btn--whatsapp {
  background: #25D366;
  color: white;
}

.btn--whatsapp:hover {
  background: #1ebe5d;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Botão Secundário (Catálogo) */
.btn--catalog {
  background: var(--arco-laranja);
  color: white;
}

.btn--catalog:hover {
  background: var(--arco-laranja-dark);
  transform: translateY(-1px);
}

/* Botão Terciário (E-commerce) */
.btn--ecommerce {
  background: var(--arco-azul);
  color: white;
}

.btn--ecommerce:hover {
  background: var(--arco-azul-light);
}

/* Botão Ghost */
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--surface-tertiary);
}

.btn--ghost:hover {
  background: var(--surface-tertiary);
}

/* Botão Link */
.btn--link {
  background: transparent;
  color: var(--text-link);
  padding: var(--space-xs) var(--space-sm);
  min-height: auto;
}

.btn--link:hover {
  text-decoration: underline;
}

/* Tamanhos */
.btn--sm {
  min-height: 36px;
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-xs);
}

.btn--lg {
  min-height: 52px;
  padding: var(--space-md) var(--space-xl);
  font-size: var(--font-size-base);
}

.btn--full {
  width: 100%;
}

/* Botão Crítico (Nível 1) */
.btn--critical {
  background: var(--impacto-4-badge);
  color: white;
  font-size: var(--font-size-lg);
  padding: var(--space-lg) var(--space-xl);
  animation: pulse-critical 2s infinite;
}

.btn--critical:hover {
  background: #b91c1c;
  animation: none;
}

/* ═══════════════════════════════════════════════════════════════
   BADGES
   ═══════════════════════════════════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge--impacto-4 {
  background: var(--impacto-4-bg);
  color: var(--impacto-4-text);
  border: 1px solid var(--impacto-4-border);
}

.badge--impacto-3 {
  background: var(--impacto-3-bg);
  color: var(--impacto-3-text);
  border: 1px solid var(--impacto-3-border);
}

.badge--impacto-2 {
  background: var(--impacto-2-bg);
  color: var(--impacto-2-text);
  border: 1px solid var(--impacto-2-border);
}

.badge--impacto-1 {
  background: var(--impacto-1-bg);
  color: var(--impacto-1-text);
  border: 1px solid var(--impacto-1-border);
}

/* Badges de Fase */
.badge--fase-planejamento {
  background: var(--fase-planejamento);
  color: var(--fase-planejamento-text);
}

.badge--fase-preparacao {
  background: var(--fase-preparacao);
  color: var(--fase-preparacao-text);
}

.badge--fase-ideal {
  background: var(--fase-ideal);
  color: var(--fase-ideal-text);
}

.badge--fase-lastcall {
  background: var(--fase-lastcall);
  color: var(--fase-lastcall-text);
}

.badge--fase-evento {
  background: var(--fase-evento);
  color: var(--fase-evento-text);
}

/* Badges de Marca */
.badge--cantagallo {
  background: var(--marca-cantagallo);
  color: white;
}

.badge--primegrill {
  background: var(--marca-primegrill);
  color: white;
}

.badge--montenovo {
  background: var(--marca-montenovo);
  color: white;
}

.badge--artmill {
  background: var(--marca-artmill);
  color: white;
}

.badge--admmetais {
  background: var(--marca-admmetais);
  color: white;
}

/* ═══════════════════════════════════════════════════════════════
   CARDS BASE
   ═══════════════════════════════════════════════════════════════ */
.card {
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: all var(--transition-fast);
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card__header {
  padding: var(--space-md);
  border-bottom: 1px solid var(--surface-tertiary);
}

.card__body {
  padding: var(--space-md);
}

.card__footer {
  padding: var(--space-md);
  border-top: 1px solid var(--surface-tertiary);
  background: var(--surface-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   LISTAS
   ═══════════════════════════════════════════════════════════════ */
.list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list__item {
  padding: var(--space-md);
  border-bottom: 1px solid var(--surface-tertiary);
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.list__item:last-child {
  border-bottom: none;
}

.list__item--clickable {
  cursor: pointer;
  transition: background var(--transition-fast);
}

.list__item--clickable:hover {
  background: var(--surface-secondary);
}

/* ═══════════════════════════════════════════════════════════════
   TIMELINE HORIZONTAL (Fases)
   ═══════════════════════════════════════════════════════════════ */
.timeline {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: var(--space-md);
  background: var(--surface-secondary);
  border-radius: var(--radius-lg);
  overflow-x: auto;
}

.timeline__phase {
  flex: 1;
  min-width: 60px;
  padding: var(--space-sm);
  text-align: center;
  border-radius: var(--radius-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
  opacity: 0.6;
}

.timeline__phase--active {
  opacity: 1;
  transform: scale(1.05);
}

.timeline__phase--planejamento {
  background: var(--fase-planejamento);
  color: var(--fase-planejamento-text);
}

.timeline__phase--preparacao {
  background: var(--fase-preparacao);
  color: var(--fase-preparacao-text);
}

.timeline__phase--ideal {
  background: var(--fase-ideal);
  color: var(--fase-ideal-text);
}

.timeline__phase--lastcall {
  background: var(--fase-lastcall);
  color: var(--fase-lastcall-text);
}

.timeline__phase--evento {
  background: var(--fase-evento);
  color: var(--fase-evento-text);
}

/* ═══════════════════════════════════════════════════════════════
   CHECKLIST
   ═══════════════════════════════════════════════════════════════ */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.checklist__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--font-size-sm);
  color: var(--text-secondary);
}

.checklist__item::before {
  content: '○';
  color: var(--text-tertiary);
  flex-shrink: 0;
}

.checklist__item--done::before {
  content: '✓';
  color: var(--text-success);
}

.checklist__item--urgent::before {
  content: '!';
  color: var(--text-error);
  font-weight: var(--font-weight-bold);
}

/* ═══════════════════════════════════════════════════════════════
   ÍCONES
   ═══════════════════════════════════════════════════════════════ */
.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.icon--sm { width: 16px; height: 16px; }
.icon--md { width: 24px; height: 24px; }
.icon--lg { width: 32px; height: 32px; }
.icon--xl { width: 48px; height: 48px; }

/* ═══════════════════════════════════════════════════════════════
   TOAST / NOTIFICAÇÕES
   ═══════════════════════════════════════════════════════════════ */
.toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--text-primary);
  color: var(--text-inverse);
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-lg);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  z-index: var(--z-toast);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
}

.toast--visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast--success {
  background: var(--text-success);
}

.toast--error {
  background: var(--text-error);
}

/* ═══════════════════════════════════════════════════════════════
   LOADING
   ═══════════════════════════════════════════════════════════════ */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-2xl);
  gap: var(--space-md);
}

.loading__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--surface-tertiary);
  border-top-color: var(--arco-azul);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading__text {
  color: var(--text-secondary);
  font-size: var(--font-size-sm);
}

/* ═══════════════════════════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════════════════════════ */
.empty-state {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-secondary);
}

.empty-state__icon {
  font-size: 48px;
  margin-bottom: var(--space-md);
  opacity: 0.5;
}

.empty-state__title {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-sm);
}

.empty-state__text {
  font-size: var(--font-size-sm);
  max-width: 300px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════════
   DIVIDERS
   ═══════════════════════════════════════════════════════════════ */
.divider {
  height: 1px;
  background: var(--surface-tertiary);
  margin: var(--space-md) 0;
}

.divider--thick {
  height: 4px;
  background: var(--surface-tertiary);
}
