/* ==========================================================================
   Tailwind CSS Utilities Engine - NgolaBiz Design System
   Compilado para compatibilidade total com Bootstrap 5 e temas Sngine
   Zero Preflight (sem reset destrutivo) | 100% Utilitários | Acessibilidade Ativa
   ========================================================================== */

:root {
  --ngola-brand: #b37feb;
  --ngola-brand-hover: #9d65db;
  --ngola-brand-light: #f3e8ff;
  --ngola-primary: #e02424;
  --ngola-primary-hover: #c81e1e;
  --ngola-dark-bg: #121212;
  --ngola-dark-card: #262d34;
  --ngola-dark-border: #303a41;
}

/* --- Layout & Display --- */
.flex { display: flex !important; }
.inline-flex { display: inline-flex !important; }
.grid { display: grid !important; }
.hidden { display: none !important; }
.block { display: block !important; }
.inline-block { display: inline-block !important; }

.flex-row { flex-direction: row !important; }
.flex-col { flex-direction: column !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-nowrap { flex-wrap: nowrap !important; }
.flex-1 { flex: 1 1 0% !important; }
.flex-auto { flex: 1 1 auto !important; }
.flex-none { flex: none !important; }
.shrink-0 { flex-shrink: 0 !important; }
.grow { flex-grow: 1 !important; }

.items-start { align-items: flex-start !important; }
.items-center { align-items: center !important; }
.items-end { align-items: flex-end !important; }
.items-stretch { align-items: stretch !important; }
.items-baseline { align-items: baseline !important; }

.justify-start { justify-content: flex-start !important; }
.justify-center { justify-content: center !important; }
.justify-end { justify-content: flex-end !important; }
.justify-between { justify-content: space-between !important; }
.justify-around { justify-content: space-around !important; }
.justify-evenly { justify-content: space-evenly !important; }

/* --- Spacing: Gap, Margin & Padding --- */
.gap-1 { gap: 0.25rem !important; }
.gap-1\.5 { gap: 0.375rem !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-2\.5 { gap: 0.625rem !important; }
.gap-3 { gap: 0.75rem !important; }
.gap-3\.5 { gap: 0.875rem !important; }
.gap-4 { gap: 1rem !important; }
.gap-5 { gap: 1.25rem !important; }
.gap-6 { gap: 1.5rem !important; }
.gap-8 { gap: 2rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-1\.5 { padding: 0.375rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-2\.5 { padding: 0.625rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-3\.5 { padding: 0.875rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.25rem !important; }
.p-6 { padding: 1.5rem !important; }
.p-8 { padding: 2rem !important; }

.px-1 { padding-left: 0.25rem !important; padding-right: 0.25rem !important; }
.px-2 { padding-left: 0.5rem !important; padding-right: 0.5rem !important; }
.px-2\.5 { padding-left: 0.625rem !important; padding-right: 0.625rem !important; }
.px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.px-3\.5 { padding-left: 0.875rem !important; padding-right: 0.875rem !important; }
.px-4 { padding-left: 1rem !important; padding-right: 1rem !important; }
.px-5 { padding-left: 1.25rem !important; padding-right: 1.25rem !important; }
.px-6 { padding-left: 1.5rem !important; padding-right: 1.5rem !important; }

.py-0\.5 { padding-top: 0.125rem !important; padding-bottom: 0.125rem !important; }
.py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }
.py-1\.5 { padding-top: 0.375rem !important; padding-bottom: 0.375rem !important; }
.py-2 { padding-top: 0.5rem !important; padding-bottom: 0.5rem !important; }
.py-2\.5 { padding-top: 0.625rem !important; padding-bottom: 0.625rem !important; }
.py-3 { padding-top: 0.75rem !important; padding-bottom: 0.75rem !important; }
.py-4 { padding-top: 1rem !important; padding-bottom: 1rem !important; }

.m-0 { margin: 0 !important; }
.my-1 { margin-top: 0.25rem !important; margin-bottom: 0.25rem !important; }
.my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.my-3 { margin-top: 0.75rem !important; margin-bottom: 0.75rem !important; }
.my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }

/* --- Sizing --- */
.w-full { width: 100% !important; }
.w-auto { width: auto !important; }
.h-full { height: 100% !important; }
.h-auto { height: auto !important; }
.min-h-full { min-height: 100% !important; }
.max-w-full { max-width: 100% !important; }

/* --- Borders & Border-Radius --- */
.rounded-none { border-radius: 0px !important; }
.rounded-sm { border-radius: 0.125rem !important; }
.rounded { border-radius: 0.25rem !important; }
.rounded-md { border-radius: 0.375rem !important; }
.rounded-lg { border-radius: 0.5rem !important; }
.rounded-xl { border-radius: 0.75rem !important; }
.rounded-2xl { border-radius: 1rem !important; }
.rounded-3xl { border-radius: 1.5rem !important; }
.rounded-full { border-radius: 9999px !important; }

.border { border-width: 1px !important; border-style: solid !important; }
.border-0 { border-width: 0px !important; }
.border-2 { border-width: 2px !important; border-style: solid !important; }
.border-t { border-top-width: 1px !important; border-top-style: solid !important; }
.border-b { border-bottom-width: 1px !important; border-bottom-style: solid !important; }
.border-l { border-left-width: 1px !important; border-left-style: solid !important; }
.border-r { border-right-width: 1px !important; border-right-style: solid !important; }

.border-slate-100 { border-color: #f1f5f9 !important; }
.border-slate-200 { border-color: #e2e8f0 !important; }
.border-slate-300 { border-color: #cbd5e1 !important; }
.border-slate-700 { border-color: #334155 !important; }
.border-slate-800 { border-color: #1e293b !important; }
.border-ngola-brand { border-color: #b37feb !important; }
.border-ngola-primary { border-color: #e02424 !important; }

/* --- Typography --- */
.text-xs { font-size: 0.75rem !important; line-height: 1rem !important; }
.text-sm { font-size: 0.875rem !important; line-height: 1.25rem !important; }
.text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }
.text-2xl { font-size: 1.5rem !important; line-height: 2rem !important; }
.text-3xl { font-size: 1.875rem !important; line-height: 2.25rem !important; }

.font-normal { font-weight: 400 !important; }
.font-medium { font-weight: 500 !important; }
.font-semibold { font-weight: 600 !important; }
.font-bold { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }

.text-left { text-align: left !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.truncate { overflow: hidden !important; text-overflow: ellipsis !important; white-space: nowrap !important; }

/* --- Cores de Marca NgolaBiz --- */
.text-ngola-brand { color: #b37feb !important; }
.bg-ngola-brand { background-color: #b37feb !important; color: #ffffff !important; }
.bg-ngola-brand-light { background-color: #f5edff !important; color: #7e3af2 !important; }
.hover\:bg-ngola-brand:hover { background-color: #9d65db !important; }

.text-ngola-primary { color: #e02424 !important; }
.bg-ngola-primary { background-color: #e02424 !important; color: #ffffff !important; }
.hover\:bg-ngola-primary:hover { background-color: #c81e1e !important; }

.bg-slate-50 { background-color: #f8fafc !important; }
.bg-slate-100 { background-color: #f1f5f9 !important; }
.bg-slate-200 { background-color: #e2e8f0 !important; }
.text-slate-500 { color: #64748b !important; }
.text-slate-600 { color: #475569 !important; }
.text-slate-700 { color: #334155 !important; }
.text-slate-800 { color: #1e293b !important; }
.text-slate-900 { color: #0f172a !important; }

/* --- Shadows & Elevação --- */
.shadow-sm { box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important; }
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1) !important; }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1) !important; }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important; }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1) !important; }
.shadow-soft { box-shadow: 0 2px 15px -3px rgba(0, 0, 0, 0.07), 0 10px 20px -2px rgba(0, 0, 0, 0.04) !important; }
.shadow-none { box-shadow: none !important; }

/* --- Transições & Micro-Interações Fluidas --- */
.transition-none { transition-property: none !important; }
.transition-all { transition-property: all !important; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important; transition-duration: 200ms !important; }
.transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke !important; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important; transition-duration: 150ms !important; }
.transition-transform { transition-property: transform !important; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important; transition-duration: 150ms !important; }
.transition-opacity { transition-property: opacity !important; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important; transition-duration: 150ms !important; }
.transition-shadow { transition-property: box-shadow !important; transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1) !important; transition-duration: 200ms !important; }

.duration-100 { transition-duration: 100ms !important; }
.duration-150 { transition-duration: 150ms !important; }
.duration-200 { transition-duration: 200ms !important; }
.duration-300 { transition-duration: 300ms !important; }

.ease-out { transition-timing-function: cubic-bezier(0, 0, 0.2, 1) !important; }
.ease-in-out { transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1) !important; }

/* Hover effects */
.hover\:scale-\[1\.02\]:hover { transform: scale(1.02); }
.hover\:scale-\[1\.03\]:hover { transform: scale(1.03); }
.active\:scale-95:active { transform: scale(0.95); }
.hover\:translate-x-1:hover { transform: translateX(4px); }
.hover\:translate-y-\[-2px\]:hover { transform: translateY(-2px); }

.hover\:shadow-md:hover { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1) !important; }
.hover\:shadow-lg:hover { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1) !important; }
.hover\:bg-slate-50:hover { background-color: #f8fafc !important; }
.hover\:bg-slate-100:hover { background-color: #f1f5f9 !important; }

/* Backdrop Blur */
.backdrop-blur-sm { backdrop-filter: blur(4px) !important; -webkit-backdrop-filter: blur(4px) !important; }
.backdrop-blur-md { backdrop-filter: blur(8px) !important; -webkit-backdrop-filter: blur(8px) !important; }

/* Animações nativas */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in { animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards !important; }
.animate-slide-down { animation: slideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important; }

/* Cards Interativos */
.interactive-card {
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.interactive-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 10px 20px -3px rgba(0, 0, 0, 0.08) !important;
}

/* Foco Acessível (WCAG 2.1) */
.focus-accessible:focus-visible {
  outline: 2px solid var(--ngola-brand, #b37feb) !important;
  outline-offset: 2px !important;
}

/* Preferência do Usuário para Redução de Movimento */
@media (prefers-reduced-motion: reduce) {
  *, ::before, ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --- Suporte a Modo Escuro (Night Mode NgolaBiz) --- */
body.night-mode .dark\:bg-slate-800 { background-color: #1e293b !important; }
body.night-mode .dark\:bg-slate-900 { background-color: #0f172a !important; }
body.night-mode .dark\:border-slate-700 { border-color: #334155 !important; }
body.night-mode .dark\:border-slate-800 { border-color: #1e293b !important; }
body.night-mode .dark\:text-slate-100 { color: #f1f5f9 !important; }
body.night-mode .dark\:text-slate-200 { color: #e2e8f0 !important; }
body.night-mode .dark\:text-slate-300 { color: #cbd5e1 !important; }
body.night-mode .dark\:hover\:bg-slate-800:hover { background-color: #1e293b !important; }
body.night-mode .dark\:hover\:bg-slate-700:hover { background-color: #334155 !important; }

.hover\:scale-\[1\.01\]:hover { transform: scale(1.01) !important; }
.hover\:scale-105:hover { transform: scale(1.05) !important; }
.active\:scale-95:active { transform: scale(0.95) !important; }
.hover\:translate-x-1:hover { transform: translateX(4px) !important; }

/* Enhanced dropdown animation & shadow */
.x_side_create_menu,
.x_mobi_user_menu {
  border-radius: 1rem !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08) !important;
  border: 1px solid rgba(226, 232, 240, 0.8) !important;
  animation: slideDown 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  overflow: hidden !important;
}

body.night-mode .x_side_create_menu,
body.night-mode .x_mobi_user_menu {
  background-color: #1e293b !important;
  border-color: #334155 !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5) !important;
}

/* Post Cards Modern Styling */
.post.rounded-2xl {
  border-radius: 1rem !important;
  border: 1px solid rgba(241, 245, 249, 0.9) !important;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05) !important;
  transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.post.rounded-2xl:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05) !important;
}
body.night-mode .post.rounded-2xl {
  background-color: #1e293b !important;
  border-color: #334155 !important;
}

/* Sidebar links subtle micro-interaction */
.x_side_links {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), color 0.15s ease !important;
}
.x_side_links:hover {
  transform: translateX(3px) !important;
}

/* Action buttons tactile feel */
.action-btn {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), background-color 0.15s ease !important;
}
.action-btn:hover {
  transform: scale(1.08) !important;
}
.action-btn:active {
  transform: scale(0.95) !important;
}

/* User pill in header */
.x_user_info {
  transition: transform 0.15s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.15s ease !important;
}
.x_user_info:hover {
  transform: scale(1.01) !important;
}

/* Prevenção de salto de layout (CLS) nas descrições longas */
.post-text.js_readmore,
.comment-text.js_readmore {
  max-height: 125px !important;
  overflow: hidden !important;
  position: relative !important;
}
.post-text.js_readmore[data-readmore],
.comment-text.js_readmore[data-readmore] {
  max-height: none !important;
}
.readmore-js-toggle {
  color: var(--ngola-primary, #e02424) !important;
  font-weight: 600 !important;
  font-size: 13.5px !important;
  display: inline-block !important;
  margin-top: 4px !important;
  text-decoration: none !important;
  cursor: pointer !important;
}
.readmore-js-toggle:hover {
  text-decoration: underline !important;
}

/* Otimização de Vídeos: Thumbnail imediata e sem tela preta */
.post-video-reel, .post-media-video {
  background-color: #0b0f19 !important;
  border-radius: 12px !important;
  overflow: hidden !important;
}
.plyr video {
  object-fit: contain !important;
  background-color: #000000 !important;
}
