/* ==========================================================================
   Anúncios pra Casas — Design System Tokens & Base Utilities
   ========================================================================== */

:root {
  /* Primitive Tokens */
  --tpc-sky-50: #F0F9FF;
  --tpc-sky-100: #E0F2FE;
  --tpc-sky-600: #0284C7;
  --tpc-sky-700: #0369A1;
  --tpc-sky-800: #075985;

  --tpc-amber-50: #FFFBEB;
  --tpc-amber-100: #FEF3C7;
  --tpc-amber-600: #D97706;
  --tpc-amber-700: #B45309;

  --tpc-emerald-50: #ECFDF5;
  --tpc-emerald-700: #047857;

  --tpc-red-50: #FEF2F2;
  --tpc-red-200: #FECACA;
  --tpc-red-600: #DC2626;
  --tpc-red-700: #B91C1C;

  --tpc-slate-50: #F8FAFC;
  --tpc-slate-200: #E2E8F0;
  --tpc-slate-300: #CBD5E1;
  --tpc-slate-600: #475569;
  --tpc-slate-900: #0F172A;
  --tpc-white: #FFFFFF;

  /* Semantic Tokens */
  --color-primary: var(--tpc-sky-700);
  --color-primary-hover: var(--tpc-sky-800);
  --color-focus-ring: var(--tpc-sky-600);

  --color-cleaning-bg: var(--tpc-sky-100);
  --color-cleaning-fg: var(--tpc-sky-700);
  --color-cleaning-icon: var(--tpc-sky-600);

  --color-events-bg: var(--tpc-amber-100);
  --color-events-tint: var(--tpc-amber-50);
  --color-events-fg: var(--tpc-amber-700);
  --color-events-icon: var(--tpc-amber-600);

  --color-success-bg: var(--tpc-emerald-50);
  --color-success-fg: var(--tpc-emerald-700);

  --color-danger-bg: var(--tpc-red-50);
  --color-danger-border: var(--tpc-red-200);
  --color-danger-fg: var(--tpc-red-600);

  --color-bg-body: var(--tpc-slate-50);
  --color-bg-hero: var(--tpc-sky-50);
  --color-surface: var(--tpc-white);
  --color-border: var(--tpc-slate-200);
  --color-text: var(--tpc-slate-900);
  --color-text-muted: var(--tpc-slate-600);

  /* Typography & Radii */
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius-card: 1rem;
  --radius-control: 0.75rem;
}

/* Prevent Alpine.js flash of uncloaked content */
[x-cloak] {
  display: none !important;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  background-color: var(--color-bg-body);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Skip to main content link */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  min-height: 44px;
  border-radius: var(--radius-control);
  background-color: var(--color-primary);
  color: var(--tpc-white);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid var(--color-focus-ring);
  outline-offset: 2px;
}

/* Soft hero background gradient */
.bg-hero-soft {
  background: linear-gradient(180deg, var(--color-bg-hero) 0%, var(--color-bg-body) 100%);
}

/* Minimum 44x44px touch target helper */
.touch-target {
  min-width: 44px;
  min-height: 44px;
}

/* Consistent focus ring for non-Tailwind elements */
.tpc-focus:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--tpc-white), 0 0 0 4px var(--color-focus-ring);
}

/* Provider Studio: drag-and-drop active upload zone */
.tpc-dropzone-active {
  border-color: var(--color-focus-ring);
  background-color: var(--color-bg-hero);
}

/* Provider Studio: clean horizontal navigation strip for mobile */
.tpc-scroll-strip {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tpc-scroll-strip::-webkit-scrollbar {
  display: none;
}

/* Public Vitrine: flat-elevated card hover without layout shift */
.tpc-card-hover {
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.tpc-card-hover:hover {
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 4px 10px -6px rgba(15, 23, 42, 0.04);
}

/* Public Vitrine: elevated hero search bar container */
.tpc-hero-search-shadow {
  box-shadow: 0 20px 40px -15px rgba(3, 105, 161, 0.14), 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}

/* Phase 4: smooth star rating hover/active transition */
.tpc-star-btn {
  transition: color 150ms ease, transform 150ms ease;
}

/* Respect user reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
