/* Global SVG Icon Fixes - Prevents SVG from becoming huge */

/* Default SVG sizing - applies to all SVGs unless overridden */
svg:not([class*="w-"]):not([class*="h-"]) {
  width: 1.25rem !important;  /* 20px - default icon size */
  height: 1.25rem !important;
  flex-shrink: 0;
}

/* Ensure Tailwind width/height classes work properly on SVG */
svg[class*="h-4"],
svg[class*="w-4"] {
  width: 1rem !important;
  height: 1rem !important;
}

svg[class*="h-5"],
svg[class*="w-5"] {
  width: 1.25rem !important;
  height: 1.25rem !important;
}

svg[class*="h-6"],
svg[class*="w-6"] {
  width: 1.5rem !important;
  height: 1.5rem !important;
}

svg[class*="h-8"],
svg[class*="w-8"] {
  width: 2rem !important;
  height: 2rem !important;
}

svg[class*="h-10"],
svg[class*="w-10"] {
  width: 2.5rem !important;
  height: 2.5rem !important;
}

svg[class*="h-12"],
svg[class*="w-12"] {
  width: 3rem !important;
  height: 3rem !important;
}

svg[class*="h-16"],
svg[class*="w-16"] {
  width: 4rem !important;
  height: 4rem !important;
}

svg[class*="h-20"],
svg[class*="w-20"] {
  width: 5rem !important;
  height: 5rem !important;
}

svg[class*="h-24"],
svg[class*="w-24"] {
  width: 6rem !important;
  height: 6rem !important;
}

/* Specific contexts */
.btn svg:not([class*="h-"]):not([class*="w-"]),
button svg:not([class*="h-"]):not([class*="w-"]) {
  width: 1.25rem !important;  /* 20px */
  height: 1.25rem !important;
  flex-shrink: 0;
}

.dropdown svg:not([class*="h-"]):not([class*="w-"]) {
  width: 1rem !important;  /* 16px */
  height: 1rem !important;
  flex-shrink: 0;
}

.menu svg:not([class*="h-"]):not([class*="w-"]) {
  width: 1.25rem !important;  /* 20px */
  height: 1.25rem !important;
  flex-shrink: 0;
}

.card svg:not(.hero-icon):not([class*="h-"]):not([class*="w-"]) {
  width: 1.25rem !important;  /* 20px */
  height: 1.25rem !important;
  flex-shrink: 0;
}

.alert svg:not([class*="h-"]):not([class*="w-"]) {
  width: 1.5rem !important;  /* 24px */
  height: 1.5rem !important;
  flex-shrink: 0;
}

/* Hero header SVGs (for page headers) */
.hero-header svg:not([class*="h-"]):not([class*="w-"]) {
  width: 2rem !important;  /* 32px */
  height: 2rem !important;
  flex-shrink: 0;
}

/* Respect Tailwind classes when present */
svg[class*="w-"],
svg[class*="h-"] {
  /* Let Tailwind classes override */
}

/* Large icons (when explicitly needed) */
.icon-large svg {
  width: 3rem !important;  /* 48px */
  height: 3rem !important;
}

.icon-xl svg {
  width: 4rem !important;  /* 64px */
  height: 4rem !important;
}

/* Prevent SVG text selection issues */
svg {
  user-select: none;
  pointer-events: none;
}

/* Allow clicks on parent elements */
button svg,
a svg,
.clickable svg {
  pointer-events: none;
}
