/* Browser autofill fix for dark mode*/
input,
select {
  -webkit-background-clip: text !important;
  background-clip: text !important;
}

/* Firefox-specific theme handling */
@-moz-document url-prefix() {
  /* Light mode defaults */
  :root {
    color-scheme: light;
  }

  html {
    background-color: white;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
  }

  /* Force correct background colors */
  .bg-white {
    background-color: white !important;
  }

  /* Remove transitions from specific elements that might cause flashing */
  .no-transition,
  .no-transition * {
    transition: none !important;
  }
}

/* Dark mode autofill fix 
[data-theme="dark"] input:-webkit-autofill {
  background-color: transparent !important; /* Ensures autofill matches dark mode 
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: white !important;  Ensures autofill text is white 
}*/

/* Ensure borders and shadows remain consistent 
[data-theme="dark"].dark input:-webkit-autofill {
  border: 1px solid #4b5563 !important; /* Adjust to your Tailwind border-gray-600 
  box-shadow: 0 0 0px 1000px #1f2937 inset !important; /* Adjust to your
}*/

[x-cloak] {
  display: none !important;
}

iconify-icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  transform: translateY(-1.8px);
  margin-right: 0.2rem;
}

/* Remove green success border from validator */
.validator:user-valid,
.validator:has(:user-valid) {
  --input-color: hsl(var(--bc) / 0.2) !important;
}
.validator:user-valid:focus,
.validator:has(:user-valid):focus,
.validator:user-valid:focus-within,
.validator:has(:user-valid):focus-within {
  --input-color: hsl(var(--bc) / 0.2) !important;
}
.modal::backdrop {
  backdrop-filter: none;
}

/* Remove Shiki background color, keep only syntax highlighting */
#wireframe-code .shiki {
  background: transparent !important;
}
#wireframe-code pre {
  background: transparent !important;
}
