/* Form rendering and validation styles */

/* Global text input styles */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="tel"],
input[type="url"],
textarea,
select {
  @apply block w-full h-11 px-4 rounded-lg border border-gray-300 text-sm focus:border-blue-500 focus:ring-2 focus:ring-blue-500/20 transition-colors;
}

/* Override for disabled inputs */
input:disabled,
textarea:disabled,
select:disabled {
  @apply bg-gray-50 text-gray-500 cursor-not-allowed;
}

/* Override for smaller inputs in specific contexts */
input[type="number"][style*="width"],
input[type="text"][style*="width"] {
  @apply w-auto;
}

/* File input custom styling */
input[type="file"] {
  @apply block w-full text-sm text-gray-900 border border-gray-300 rounded-lg cursor-pointer;
  file-path: initial;
}

input[type="file"]:focus {
  @apply border-blue-500 ring-2 ring-blue-500/20 outline-none;
}

/* Filter search specific styling */
.filters input[type="text"] {
  @apply h-10;
}

/* Filters container styling */
.filters {
  background-color: white;
  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.filters .flex {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
}

.filters label {
  display: block;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.25rem;
}

/* Global button styles */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
  text-decoration: none;
  outline: none;
  focus: ring: 2px;
  focus: ring-offset: 2px;
}

.btn-primary {
  background-color: #2563eb !important;
  border-color: #2563eb !important;
  color: white !important;
}

.btn-primary:hover {
  background-color: #1d4ed8 !important;
  border-color: #1d4ed8 !important;
}

.btn-primary:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
  outline: none;
}

.btn-secondary {
  background-color: white !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

.btn-secondary:hover {
  background-color: #f9fafb !important;
  border-color: #9ca3af !important;
}

.btn-white {
  background-color: white !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
}

.btn-small {
  @apply px-3 py-1.5 text-xs;
}

.btn-large {
  @apply px-6 py-3 text-base;
}

/* Filter buttons */
.filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border: 1px solid #d1d5db;
  font-size: 0.875rem;
  line-height: 1.25rem;
  font-weight: 500;
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  background-color: white !important;
  border-color: #d1d5db !important;
  color: #374151 !important;
  transition: all 0.2s ease-in-out;
  outline: none;
}

.filter-btn:hover {
  background-color: #f9fafb !important;
  border-color: #9ca3af !important;
}

.filter-btn:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.5);
  outline: none;
}

.filter-link {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280 !important;
  text-decoration: none;
  transition: color 0.2s ease-in-out;
}

.filter-link:hover {
  color: #374151 !important;
}

/* Fade in animation for form sections */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

/* Form field validation states */
.form-field.border-red-200 {
  border-color: #fca5a5;
  background-color: #fef2f2;
}

.form-field.border-green-200 {
  border-color: #86efac;
  background-color: #f0fdf4;
}

/* Progress indicator enhancements */
.form-progress-bar {
  transition: width 0.3s ease-in-out;
}

.section-indicator {
  transition: all 0.2s ease-in-out;
}

.section-indicator:hover {
  transform: translateY(-1px);
}

/* File upload enhancements */
.border-dashed:hover {
  border-color: #3b82f6;
  background-color: #f0f9ff;
}

/* Form field focus enhancements */
.focus\:ring-blue-500\/20:focus {
  --tw-ring-color: rgb(59 130 246 / 0.2);
}

/* Validation error animations */
.validation-errors {
  animation: slideDown 0.2s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
    max-height: 0;
  }
  to {
    opacity: 1;
    transform: translateY(0);
    max-height: 200px;
  }
}

.section-validation-error {
  animation: slideDown 0.2s ease-out;
}

/* File selection feedback */
.field-error {
  animation: shake 0.3s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

/* Improved form field styling */
.form-field input:invalid {
  border-color: #ef4444;
}

.form-field input:valid {
  border-color: #10b981;
}

/* Multi-select checkbox improvements */
input[type="checkbox"]:checked + span {
  font-weight: 500;
  color: #1f2937;
}

/* Radio button improvements */
input[type="radio"]:checked + span {
  font-weight: 500;
  color: #1f2937;
}

/* User lookup dropdown */
[data-user-lookup-target="results"] {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  z-index: 50;
}

[data-user-lookup-target="results"] div:hover {
  background-color: #f3f4f6;
}

/* Form submission loading state */
.form-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.6;
}

.form-loading::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #e5e7eb;
  border-top: 2px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Auto-save status indicator */
.status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #d1d5db;
  transition: all 0.3s ease-in-out;
}

.status-indicator.status-ready {
  background-color: #d1d5db;
}

.status-indicator.status-typing {
  background-color: #fbbf24;
  animation: pulse 1.5s ease-in-out infinite;
}

.status-indicator.status-saving {
  background-color: #3b82f6;
  animation: pulse 1s ease-in-out infinite;
}

.status-indicator.status-saved {
  background-color: #10b981;
}

.status-indicator.status-error {
  background-color: #ef4444;
  animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.4;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 640px) {
  .form-display-component {
    padding: 1rem;
  }

  .section-indicator div {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
  }

  .section-indicator .hidden {
    display: none;
  }
}
/* Help page markdown content styles */

.help-content h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.help-content h2 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.help-content h3 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.help-content p {
  color: #374151;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.help-content ul,
.help-content ol {
  color: #374151;
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.help-content ul {
  list-style-type: disc;
}

.help-content ol {
  list-style-type: decimal;
}

.help-content li {
  margin-bottom: 0.375rem;
  line-height: 1.6;
}

.help-content strong {
  font-weight: 600;
  color: #111827;
}

.help-content code {
  font-size: 0.8125rem;
  background-color: #f3f4f6;
  color: #1f2937;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.help-content pre {
  background-color: #f3f4f6;
  border-radius: 0.5rem;
  padding: 1rem;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.help-content pre code {
  background: none;
  padding: 0;
  font-size: 0.875rem;
}

.help-content hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 2rem 0;
}

.help-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.help-content th {
  background-color: #f9fafb;
  color: #374151;
  font-weight: 600;
  text-align: left;
  padding: 0.625rem 1rem;
  border-bottom: 2px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
}

.help-content th:last-child {
  border-right: none;
}

.help-content td {
  color: #374151;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid #f3f4f6;
  border-right: 1px solid #f3f4f6;
}

.help-content td:last-child {
  border-right: none;
}

.help-content tr:last-child td {
  border-bottom: none;
}

.help-content a {
  color: #2563eb;
  text-decoration: underline;
}

.help-content a:hover {
  color: #1d4ed8;
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
