/* 
 * Browser compatibility layer for Tailwind CSS v4
 * This file addresses browser compatibility issues with Tailwind CSS v4 beta
 * and provides a fallback for browsers that don't support the newer CSS features.
 */

/* Default background color fallback */
body {
  background-color: #f0f4ff; /* Light blue fallback if gradient fails */
}

/* Basic font-family fallback */
body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, 
               "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", 
               "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

/* Basic container width fallbacks */
.container {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Basic form input styling fallbacks */
input[type="email"],
input[type="password"],
input[type="text"],
input[type="tel"] {
  width: 100%;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus,
input[type="tel"]:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Button fallbacks */
button, 
.btn,
[type="submit"] {
  padding: 0.5rem 1rem;
  font-weight: 500;
  border-radius: 0.375rem;
  background-color: #3b82f6;
  color: white;
  cursor: pointer;
}

button:hover, 
.btn:hover,
[type="submit"]:hover {
  background-color: #2563eb;
}

/* Checkbox styling fallback */
input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

/* Links styling fallback */
a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Force CSS loading for authentication forms */
.sign-in-form {
  max-width: 24rem;
  margin: 0 auto;
  padding: 1.5rem;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Additional form element fallbacks */
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  background-color: white;
}

textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  line-height: 1.5;
  border-radius: 0.375rem;
  border: 1px solid #d1d5db;
  resize: vertical;
  min-height: 4rem;
}

/* Error messages styling fallback */
#error_explanation {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

#error_explanation h2 {
  color: #991b1b;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.75rem;
}

#error_explanation ul {
  color: #b91c1c;
  font-size: 0.875rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#error_explanation li {
  margin-bottom: 0.25rem;
}

.sign-in-form h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 1.5rem;
  text-align: center;
}

.sign-in-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: #4b5563;
}

.sign-in-form .field {
  margin-bottom: 1.25rem;
}

.sign-in-form input[type="submit"] {
  width: 100%;
  padding: 0.75rem 1rem;
  background-color: #3b82f6;
  color: white;
  font-weight: 600;
  border-radius: 0.375rem;
  cursor: pointer;
}

.sign-in-form input[type="submit"]:hover {
  background-color: #2563eb;
}

.remember-me {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

.remember-me input {
  margin-right: 0.5rem;
}

.links {
  display: flex;
  justify-content: space-between;
  margin-top: 1rem;
  font-size: 0.875rem;
}
