@import 'tailwindcss';

/* HeroUI plugin for Tailwind v4 */
@plugin './hero.mjs';

/* Include HeroUI theme files for Tailwind to scan */
@source '../../node_modules/@heroui/theme/dist/**/*.{js,ts,jsx,tsx}';

/* Dark mode variant for HeroUI */
@custom-variant dark (&:is(.dark *));

/* ================================================
   Professional B2B SaaS Design System
   ================================================ */

/* Typography */
body {
  font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ================================================
   Gradient Backgrounds
   ================================================ */

/* Primary gradient - blue */
.gradient-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

/* Secondary gradient - teal to cyan */
.gradient-secondary {
  background: linear-gradient(135deg, #0d9488 0%, #06b6d4 100%);
}

/* Hero gradient - subtle blue mesh */
.gradient-hero {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 50%, #f0fdfa 100%);
}

/* Card accent gradient */
.gradient-accent {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

/* Stats card gradients */
.gradient-stat-1 {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.gradient-stat-2 {
  background: linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 100%);
}

.gradient-stat-3 {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

.gradient-stat-4 {
  background: linear-gradient(135deg, #fce7f3 0%, #fbcfe8 100%);
}

/* Text gradients */
.text-gradient-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ================================================
   Shadows & Depth
   ================================================ */

.shadow-soft {
  box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.04), 0 1px 2px -1px rgb(0 0 0 / 0.04);
}

.shadow-medium {
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
}

.shadow-elevated {
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.05), 0 4px 6px -4px rgb(0 0 0 / 0.05);
}

.shadow-glow-primary {
  box-shadow: 0 0 20px -5px rgba(59, 130, 246, 0.3);
}

.shadow-glow-secondary {
  box-shadow: 0 0 20px -5px rgba(13, 148, 136, 0.3);
}

/* ================================================
   Card Effects
   ================================================ */

.card-hover {
  transition: all 0.2s ease-in-out;
}

.card-hover:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.05);
}

.card-interactive {
  transition: all 0.15s ease-out;
  cursor: pointer;
}

.card-interactive:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px -2px rgb(0 0 0 / 0.08);
}

.card-interactive:active {
  transform: translateY(0);
}

/* Glass effect */
.glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.glass-strong {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ================================================
   Animations
   ================================================ */

@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-soft {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-fade-in {
  animation: fade-in 0.3s ease-out forwards;
}

.animate-slide-up {
  animation: slide-up 0.4s ease-out forwards;
}

.animate-pulse-soft {
  animation: pulse-soft 2s ease-in-out infinite;
}

/* Staggered animations */
.stagger-1 { animation-delay: 0.05s; }
.stagger-2 { animation-delay: 0.1s; }
.stagger-3 { animation-delay: 0.15s; }
.stagger-4 { animation-delay: 0.2s; }

/* ================================================
   Icon Containers
   ================================================ */

.icon-container {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.2s ease;
}

.icon-container-sm {
  width: 36px;
  height: 36px;
}

.icon-container-md {
  width: 44px;
  height: 44px;
}

.icon-container-lg {
  width: 56px;
  height: 56px;
}

/* ================================================
   Status Indicators
   ================================================ */

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.status-dot-success {
  background-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.2);
}

.status-dot-warning {
  background-color: #f59e0b;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.status-dot-danger {
  background-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

/* ================================================
   List Items
   ================================================ */

.list-item-hover {
  transition: all 0.15s ease;
  border-radius: 12px;
}

.list-item-hover:hover {
  background-color: #f8fafc;
}

/* ================================================
   Borders & Dividers
   ================================================ */

.border-subtle {
  border-color: rgba(0, 0, 0, 0.05);
}

.divider-subtle {
  border-top: 1px solid rgba(0, 0, 0, 0.05);
}

/* ================================================
   Badge Styles
   ================================================ */

.badge-glow {
  position: relative;
}

.badge-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  background: inherit;
  filter: blur(8px);
  opacity: 0.4;
  z-index: -1;
}

/* ================================================
   Live Meeting Indicators
   ================================================ */

/* Live indicator animation */
@keyframes pulse-live {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.1);
  }
}

.animate-pulse-live {
  animation: pulse-live 1.5s ease-in-out infinite;
}

/* Live badge with glow effect */
.badge-live {
  background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
  color: white;
  box-shadow: 0 0 20px rgba(220, 38, 38, 0.4);
}

/* Bot mode badges */
.badge-note-taker {
  background: linear-gradient(135deg, #ec4899 0%, #f472b6 100%);
  color: white;
}

.badge-ai-avatar {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
}

/* Timer display with tabular nums for stable width */
.timer-display {
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum';
}

/* Live status dot */
.status-dot-live {
  background-color: #dc2626;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
  animation: pulse-live 1.5s ease-in-out infinite;
}

/* ================================================
   Urgent Join Request Animations
   ================================================ */

/* Urgent pulsing for join request buttons */
@keyframes pulse-urgent {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 20px 5px rgba(220, 38, 38, 0.4);
  }
}

.animate-pulse-urgent {
  animation: pulse-urgent 1s ease-in-out infinite;
}

/* Subtle pulse for container backgrounds */
@keyframes pulse-subtle {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.85;
  }
}

.animate-pulse-subtle {
  animation: pulse-subtle 2s ease-in-out infinite;
}

/* Danger glow for urgent buttons */
.shadow-glow-danger {
  box-shadow: 0 0 20px -5px rgba(220, 38, 38, 0.5);
}

/* Flashing border for urgent elements */
@keyframes flash-border {
  0%, 100% {
    border-color: rgba(220, 38, 38, 0.3);
  }
  50% {
    border-color: rgba(220, 38, 38, 0.8);
  }
}

.animate-flash-border {
  animation: flash-border 1.5s ease-in-out infinite;
}

/* ================================================
   Tooltip & Popover Overrides
   ================================================ */

/* Ensure tooltips have solid backgrounds with good contrast */
[data-slot="base"][data-placement] {
  --tw-bg-opacity: 1 !important;
}

/* HeroUI Tooltip - solid dark background */
.heroui-tooltip,
[role="tooltip"] {
  background-color: #18181b !important;
  color: #ffffff !important;
}

/* Tooltip content styling */
[data-slot="content"][role="tooltip"] {
  background-color: #18181b !important;
  color: #ffffff !important;
}

/* HeroUI Popover - solid white background */
[data-slot="content"][data-open="true"],
.heroui-popover-content {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

/* Ensure popover arrow matches */
[data-slot="content"][data-open="true"]::before,
.heroui-popover-content::before {
  background-color: #ffffff !important;
}

/* Override any transparent backdrop filters on tooltips */
[role="tooltip"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* Custom scrollbar for overflow content in tooltips/popovers */
.scrollbar-thin {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.scrollbar-thin::-webkit-scrollbar {
  width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
  background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

/* ================================================
   Modal & Overlay Overrides
   ================================================ */

/* Make modal backdrops more opaque by default */
[data-slot="backdrop"] {
  background-color: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* Ensure modal content has solid white background */
[data-slot="base"][role="dialog"],
[data-slot="wrapper"][role="dialog"] > div {
  background-color: #ffffff !important;
}

/* Select/Dropdown popover - solid background */
[data-slot="content"][data-open="true"][role="listbox"],
[data-slot="listbox"] {
  background-color: #ffffff !important;
  border: 1px solid #e2e8f0;
}
