/* Custom CSS for the diagnostic application */

/* CSS Variables for design system */
:root {
  --background: 0 0% 100%;
  --foreground: 252 89% 15%;

  --card: 0 0% 100%;
  --card-foreground: 252 89% 15%;

  --popover: 0 0% 100%;
  --popover-foreground: 252 89% 15%;

  --primary: 222 92% 59%;
  --primary-foreground: 0 0% 100%;
  
  --primary-hover: 218 68% 39%;
  --primary-glow: 197 87% 53%;

  --secondary: 39 100% 50%;
  --secondary-foreground: 252 89% 15%;
  --secondary-hover: 39 100% 45%;

  --muted: 227 43% 90%;
  --muted-foreground: 218 30% 50%;

  --accent: 179 80% 48%;
  --accent-foreground: 0 0% 100%;

  --destructive: 339 71% 52%;
  --destructive-foreground: 0 0% 100%;

  --border: 227 43% 82%;
  --input: 227 43% 88%;
  --ring: 222 92% 59%;

  --radius: 0.75rem;
  
  --gradient-primary: linear-gradient(135deg, hsl(252 89% 15%), hsl(218 68% 39%), hsl(222 92% 59%));
  --gradient-secondary: linear-gradient(135deg, hsl(39 100% 50%), hsl(39 100% 60%));
  --gradient-hero: linear-gradient(135deg, hsl(222 92% 59%), hsl(197 87% 53%));
  --gradient-subtle: linear-gradient(180deg, hsl(0 0% 100%), hsl(227 43% 97%));
  
  --shadow-elegant: 0 10px 30px -10px hsl(222 92% 59% / 0.3);
  --shadow-glow: 0 0 40px hsl(197 87% 53% / 0.4);
  
  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode variables */
.dark {
  --background: 252 89% 8%;
  --foreground: 227 43% 95%;

  --card: 252 70% 12%;
  --card-foreground: 227 43% 95%;

  --popover: 252 70% 12%;
  --popover-foreground: 227 43% 95%;

  --primary: 222 92% 59%;
  --primary-foreground: 0 0% 100%;
  
  --primary-hover: 197 87% 53%;
  --primary-glow: 179 80% 48%;

  --secondary: 39 100% 50%;
  --secondary-foreground: 252 89% 15%;
  --secondary-hover: 39 100% 45%;

  --muted: 252 60% 18%;
  --muted-foreground: 227 30% 70%;

  --accent: 179 80% 48%;
  --accent-foreground: 0 0% 100%;

  --destructive: 339 71% 52%;
  --destructive-foreground: 227 43% 95%;

  --border: 252 50% 20%;
  --input: 252 50% 20%;
  --ring: 222 92% 59%;
  
  --gradient-primary: linear-gradient(135deg, hsl(252 89% 15%), hsl(218 68% 39%), hsl(222 92% 59%));
  --gradient-secondary: linear-gradient(135deg, hsl(39 100% 50%), hsl(39 100% 60%));
  --gradient-hero: linear-gradient(135deg, hsl(222 92% 59%), hsl(197 87% 53%));
  --gradient-subtle: linear-gradient(180deg, hsl(252 89% 8%), hsl(252 70% 10%));
  
  --shadow-elegant: 0 10px 30px -10px hsl(0 0% 0% / 0.4);
  --shadow-glow: 0 0 40px hsl(197 87% 53% / 0.3);
}

/* Base styles */
* {
  border-color: hsl(var(--border));
}

body {
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

/* Custom animations */
@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slide-in-from-bottom-4 {
  from {
    transform: translateY(1rem);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slide-in-from-left-4 {
  from {
    transform: translateX(-1rem);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slide-in-from-right-4 {
  from {
    transform: translateX(1rem);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes scale-in {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.animate-in {
  animation-fill-mode: both;
}

.fade-in {
  animation-name: fade-in;
}

.slide-in-from-bottom-4 {
  animation-name: slide-in-from-bottom-4;
}

.slide-in-from-left-4 {
  animation-name: slide-in-from-left-4;
}

.slide-in-from-right-4 {
  animation-name: slide-in-from-right-4;
}

.scale-in {
  animation-name: scale-in;
}

.duration-300 {
  animation-duration: 300ms;
}

.duration-500 {
  animation-duration: 500ms;
}

.duration-700 {
  animation-duration: 700ms;
}

.delay-150 {
  animation-delay: 150ms;
}

.delay-300 {
  animation-delay: 300ms;
}

.delay-450 {
  animation-delay: 450ms;
}

/* Custom select styles */
.custom-select {
  position: relative;
  display: inline-block;
  width: 100%;
}

.custom-select select {
  display: none;
}

.select-selected {
  background-color: white;
  border: 2px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  font-size: 1rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.select-selected:hover {
  border-color: hsl(var(--primary));
}

.select-selected:focus {
  outline: none;
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 3px hsl(var(--primary) / 0.1);
}

.select-selected:after {
  content: "▼";
  font-size: 0.8rem;
  color: hsl(var(--muted-foreground));
  transition: transform 0.2s ease;
}

.select-selected.select-arrow-active:after {
  transform: rotate(180deg);
}

.select-items {
  position: absolute;
  background-color: white;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  border: 2px solid hsl(var(--border));
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  max-height: 200px;
  overflow-y: auto;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.select-hide {
  display: none;
}

.select-items div {
  color: hsl(var(--foreground));
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-color: transparent transparent rgba(0, 0, 0, 0.1) transparent;
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
}

.select-items div:hover {
  background-color: hsl(var(--muted));
}

.select-items div:last-child {
  border-bottom: none;
}

/* Same item selected */
.select-items div.same-as-selected {
  background-color: hsl(var(--primary));
  color: white;
}

/* Custom button styles */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  text-decoration: none;
}

.btn:focus-visible {
  outline: 2px solid hsl(var(--ring));
  outline-offset: 2px;
}

.btn:disabled {
  pointer-events: none;
  opacity: 0.5;
}

.btn-default {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.btn-default:hover {
  background-color: hsl(var(--primary-hover));
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.btn-outline {
  border: 2px solid hsl(var(--border));
  background-color: hsl(var(--background));
  color: hsl(var(--foreground));
}

.btn-outline:hover {
  background-color: hsl(var(--muted));
  border-color: hsl(var(--primary));
}

.btn-ghost {
  background-color: transparent;
  color: hsl(var(--foreground));
}

.btn-ghost:hover {
  background-color: hsl(var(--muted));
}

.btn-premium {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-hover)));
  color: hsl(var(--primary-foreground));
  box-shadow: 0 10px 30px -10px hsl(var(--primary) / 0.3);
}

.btn-premium:hover {
  box-shadow: 0 15px 40px -10px hsl(var(--primary) / 0.4);
  transform: scale(1.02);
}

.btn-lg {
  height: 3.5rem;
  padding: 0 2.5rem;
  font-size: 1rem;
}

.btn-sm {
  height: 2.25rem;
  padding: 0 1rem;
  border-radius: 0.375rem;
}

/* Card styles */
.card {
  border-radius: 0.5rem;
  border: 1px solid hsl(var(--border));
  background-color: hsl(var(--card));
  color: hsl(var(--card-foreground));
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.card-elegant {
  box-shadow: var(--shadow-elegant);
}

/* Progress bar styles */
.progress-bar {
  height: 0.5rem;
  background-color: hsl(var(--muted));
  border-radius: 9999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(to right, hsl(var(--primary)), hsl(var(--secondary)));
  transition: width 0.5s ease-out;
}

/* Stage indicator styles */
.stage-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.375rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s ease;
}

.stage-indicator.active {
  background-color: hsl(var(--primary));
  color: hsl(var(--primary-foreground));
}

.stage-indicator.completed {
  background-color: hsl(var(--secondary));
  color: hsl(var(--secondary-foreground));
}

.stage-indicator.inactive {
  background-color: hsl(var(--muted));
  color: hsl(var(--muted-foreground));
}

/* Result type styles */
.result-sem-potencial {
  background: linear-gradient(135deg, hsl(var(--muted)), hsl(var(--muted-foreground) / 0.2));
}

.result-potencial-medio {
  background: linear-gradient(135deg, hsl(var(--accent) / 0.5), hsl(var(--secondary) / 0.5));
}

.result-potencial-alto {
  background: linear-gradient(135deg, hsl(var(--secondary)), hsl(var(--accent)));
}

.result-potencial-extremo {
  background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-glow)));
}

/* Radar chart container */
.radar-chart-container {
  width: 100%;
  height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .stage-indicator span {
    display: none;
  }
  
  .btn-lg {
    height: 3rem;
    padding: 0 1.5rem;
    font-size: 0.875rem;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    box-shadow: none !important;
    border: 1px solid #ccc !important;
  }
}

/* Custom scrollbar */
.select-items::-webkit-scrollbar {
  width: 8px;
}

.select-items::-webkit-scrollbar-track {
  background: hsl(var(--muted));
}

.select-items::-webkit-scrollbar-thumb {
  background: hsl(var(--muted-foreground));
  border-radius: 4px;
}

.select-items::-webkit-scrollbar-thumb:hover {
  background: hsl(var(--foreground));
}


