/* ═══════ Custom component styles for AutoChat Panel ═══════ */
/* Plain CSS — no @apply (Tailwind CDN doesn't support it) */

/* Input styles */
.ac-input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  color: #1e293b;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
  font-family: inherit;
}
.ac-input::placeholder { color: #94a3b8; }
.ac-input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}
.ac-input:disabled {
  background: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
}
textarea.ac-input {
  resize: vertical;
  min-height: 80px;
}

/* Select */
.ac-select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 0.75rem;
  background: #fff;
  color: #1e293b;
  padding: 0.625rem 0.875rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  outline: none;
  transition: border-color 150ms, box-shadow 150ms;
  font-family: inherit;
  cursor: pointer;
}
.ac-select:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
}

/* Label */
.ac-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.375rem;
}

/* Primary button */
.ac-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 150ms, transform 80ms;
  box-shadow: 0 1px 3px rgba(79,70,229,0.2);
  font-family: inherit;
  line-height: 1.25rem;
}
.ac-btn-primary:hover { background: #4338ca; }
.ac-btn-primary:active { transform: scale(0.98); }
.ac-btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Secondary button */
.ac-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  background: #fff;
  color: #334155;
  font-weight: 500;
  font-size: 0.875rem;
  border: 1px solid #cbd5e1;
  cursor: pointer;
  transition: background 150ms, border-color 150ms, transform 80ms;
  font-family: inherit;
  line-height: 1.25rem;
}
.ac-btn-secondary:hover { background: #f8fafc; border-color: #94a3b8; }
.ac-btn-secondary:active { transform: scale(0.98); }
.ac-btn-secondary:disabled { opacity: 0.5; cursor: not-allowed; }

/* Danger button */
.ac-btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  border-radius: 0.75rem;
  background: #dc2626;
  color: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: background 150ms, transform 80ms;
  font-family: inherit;
  line-height: 1.25rem;
}
.ac-btn-danger:hover { background: #b91c1c; }
.ac-btn-danger:active { transform: scale(0.98); }

/* Card */
.ac-card {
  background: #fff;
  border-radius: 1rem;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* Page title */
.ac-page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0f172a;
}

/* Empty state */
.ac-empty {
  border: 2px dashed #cbd5e1;
  border-radius: 1rem;
  background: #f8fafc;
  color: #64748b;
  padding: 2rem;
  text-align: center;
}
.ac-empty-sm {
  border: 1px dashed #cbd5e1;
  border-radius: 0.75rem;
  background: #f8fafc;
  color: #94a3b8;
  padding: 1rem;
  text-align: center;
  font-size: 0.875rem;
}

/* Badge */
.ac-badge-id {
  font-size: 0.75rem;
  font-family: 'SF Mono', 'Cascadia Code', 'Consolas', monospace;
  background: #f1f5f9;
  color: #475569;
  padding: 0.125rem 0.5rem;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

/* Spinner */
.ac-spinner {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ac-spin 0.6s linear infinite;
}
@keyframes ac-spin {
  to { transform: rotate(360deg); }
}

/* Toast animations */
.toast-enter-active {
  animation: toast-in 0.3s ease-out;
}
.toast-leave-active {
  animation: toast-out 0.25s ease-in forwards;
}
@keyframes toast-in {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toast-out {
  from { opacity: 1; transform: translateX(0) scale(1); }
  to   { opacity: 0; transform: translateX(40px) scale(0.95); }
}

/* Flatpickr overrides */
.flatpickr-calendar {
  border-radius: 0.75rem !important;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15) !important;
  border-color: #e2e8f0 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #4f46e5 !important;
  border-color: #4f46e5 !important;
}
.flatpickr-months .flatpickr-month {
  border-radius: 0.75rem 0.75rem 0 0 !important;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Smooth view transitions */
section {
  animation: ac-fade-in 0.2s ease-out;
}
@keyframes ac-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ═══════ Mobile Responsive Fixes ═══════ */
@media (max-width: 640px) {
  .ac-btn-primary,
  .ac-btn-secondary,
  .ac-btn-danger {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    line-height: 1.125rem;
  }

  .ac-input,
  .ac-select {
    padding: 0.5rem 0.625rem;
    font-size: 0.875rem;
  }

  .ac-page-title {
    font-size: 1.125rem;
  }

  .ac-card {
    border-radius: 0.75rem;
  }

  /* Cards with p-6 or p-5: tighter on mobile */
  .ac-card.p-6,
  .ac-card.p-5 {
    padding: 1rem;
  }

  /* Sidebar scrollable + visible logout */
  aside {
    display: flex;
    flex-direction: column;
    max-height: 100vh;
    max-height: 100dvh;
  }
  aside nav {
    flex: 1 1 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0;
  }

  /* Toast: smaller on mobile */
  .toast-enter-active {
    animation: toast-in 0.2s ease-out;
  }

  /* Geo instruction block tighter on mobile */
  .ac-card ol {
    font-size: 0.8125rem;
  }

  /* Main content: tighter padding */
  main {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* Campaign grid: full-width columns on mobile */
  .grid.lg\:grid-cols-5 {
    gap: 1rem;
  }

  /* Salon cards: stack action buttons */
  .ac-card .flex.gap-1\.5 {
    flex-wrap: wrap;
  }

  /* Overview feature items: tighter */
  .grid.gap-2 > .flex.items-start {
    padding: 0.5rem 0.625rem;
    font-size: 0.8125rem;
  }

  /* Example grid: slightly smaller gap */
  .grid.grid-cols-2 {
    gap: 0.5rem;
  }
  .grid.grid-cols-2 .p-3 {
    padding: 0.5rem;
  }
}


