/* Base styles for Hotel Analyzer Widget - Shadow DOM version */

:host {
  /* CSS Variables for theming */
  --ha-background: 0 0% 100%;
  --ha-foreground: 222.2 84% 4.9%;
  --ha-card: 0 0% 100%;
  --ha-card-foreground: 222.2 84% 4.9%;
  --ha-primary: 239 84% 67%;
  --ha-primary-foreground: 0 0% 100%;
  --ha-secondary: 210 40% 96.1%;
  --ha-secondary-foreground: 222.2 47.4% 11.2%;
  --ha-muted: 210 40% 96.1%;
  --ha-muted-foreground: 215.4 16.3% 46.9%;
  --ha-accent: 210 40% 96.1%;
  --ha-accent-foreground: 222.2 47.4% 11.2%;
  --ha-destructive: 0 84.2% 60.2%;
  --ha-destructive-foreground: 0 0% 100%;
  --ha-success: 142 76% 36%;
  --ha-success-foreground: 0 0% 100%;
  --ha-warning: 38 92% 50%;
  --ha-warning-foreground: 0 0% 100%;
  --ha-border: 214.3 31.8% 91.4%;
  --ha-input: 214.3 31.8% 91.4%;
  --ha-ring: 239 84% 67%;
  --ha-radius: 0.5rem;

  /* Base font */
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dark mode support (optional) */
:host(.dark) {
  --ha-background: 222.2 84% 4.9%;
  --ha-foreground: 210 40% 98%;
  --ha-card: 222.2 84% 4.9%;
  --ha-card-foreground: 210 40% 98%;
  --ha-primary: 239 84% 67%;
  --ha-primary-foreground: 0 0% 100%;
  --ha-secondary: 217.2 32.6% 17.5%;
  --ha-secondary-foreground: 210 40% 98%;
  --ha-muted: 217.2 32.6% 17.5%;
  --ha-muted-foreground: 215 20.2% 65.1%;
  --ha-accent: 217.2 32.6% 17.5%;
  --ha-accent-foreground: 210 40% 98%;
  --ha-destructive: 0 62.8% 30.6%;
  --ha-destructive-foreground: 210 40% 98%;
  --ha-success: 142 76% 36%;
  --ha-success-foreground: 0 0% 100%;
  --ha-warning: 38 92% 50%;
  --ha-warning-foreground: 0 0% 100%;
  --ha-border: 217.2 32.6% 17.5%;
  --ha-input: 217.2 32.6% 17.5%;
  --ha-ring: 239 84% 67%;
}

/* Reset styles within Shadow DOM */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Glass card effect */
.ha-glass-card {
  background: hsl(var(--ha-card) / 0.8);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid hsl(var(--ha-border));
  border-radius: 1rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Glow effect */
.ha-glow-primary {
  box-shadow: 0 0 20px rgba(99, 102, 241, 0.5);
}

/* Pulse ring animation */
.ha-pulse-ring {
  position: absolute;
  inset: -10px;
  border-radius: 9999px;
  opacity: 0;
  animation: ha-pulse-ring 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes ha-pulse-ring {
  0%, 100% {
    opacity: 0;
    transform: scale(0.9);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1);
  }
}

/* Text gradient */
.ha-text-gradient {
  background: linear-gradient(to bottom right, #667eea, #764ba2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Progress ring */
.ha-progress-ring-circle {
  transition: stroke-dashoffset 0.5s ease;
  transform-origin: 50% 50%;
}

/* Fade in animation */
@keyframes ha-fade-in {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ha-animate-fade-in {
  animation: ha-fade-in 0.5s ease-out;
}

/* Slide up animation */
@keyframes ha-slide-up {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.ha-animate-slide-up {
  animation: ha-slide-up 0.6s ease-out;
}
