/* Additional custom styles for the Contract Analyzer */

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Custom animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* Custom button hover effects */
.btn-hover:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
}

/* File upload area hover effect */
.upload-area:hover {
  background-color: #f8fafc;
  border-color: #3b82f6;
}

/* Loading spinner */
.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Custom scrollbar for analysis results */
.analysis-result::-webkit-scrollbar {
  width: 8px;
}

.analysis-result::-webkit-scrollbar-track {
  background: #f1f5f9;
  border-radius: 4px;
}

.analysis-result::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.analysis-result::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .mobile-padding {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  .mobile-text {
    font-size: 1.5rem;
  }
}

/* Success/Warning/Error status indicators */
.status-pass {
  background-color: #ecfdf5;
  border-color: #10b981;
}

.status-warning {
  background-color: #fffbeb;
  border-color: #f59e0b;
}

.status-error {
  background-color: #fef2f2;
  border-color: #ef4444;
}

/* Form input focus styles */
input:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
}

/* SUPER CRITICAL INPUT VISIBILITY FIX - OVERRIDE EVERYTHING */
input[type="password"],
input[type="text"],
input[type="email"],
input[type="tel"] {
  color: #000000 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #000000 !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  text-shadow: none !important;
  font-size: 14px !important;
  font-weight: normal !important;
  text-decoration: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* All states - focus, hover, active */
input[type="password"]:focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="password"]:hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="tel"]:hover,
input[type="password"]:active,
input[type="text"]:active,
input[type="email"]:active,
input[type="tel"]:active {
  color: #000000 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #000000 !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  text-shadow: none !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Placeholder text */
input[type="password"]::placeholder,
input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="tel"]::placeholder {
  color: #9ca3af !important;
  opacity: 0.7 !important;
  visibility: visible !important;
}

/* Autofill override */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
  -webkit-text-fill-color: #000000 !important;
  -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
  background-color: #ffffff !important;
  color: #000000 !important;
  transition: background-color 5000s ease-in-out 0s !important;
}

/* Target specific IDs if needed */
#email, #password, #phone, #confirm-password {
  color: #000000 !important;
  background-color: #ffffff !important;
  -webkit-text-fill-color: #000000 !important;
  text-shadow: none !important;
  opacity: 1 !important;
}

/* Password toggle button */
.password-toggle {
  cursor: pointer;
  user-select: none;
}

/* Custom prose styles for analysis results */
.prose {
  max-width: none;
}

.prose h1, .prose h2, .prose h3, .prose h4 {
  color: #1f2937;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.prose p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.prose ul, .prose ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

.prose li {
  margin-bottom: 0.25rem;
}

/* Highlight important sections in analysis */
.highlight {
  background-color: #fef3cd;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

/* Custom modal/overlay styles if needed */
.overlay {
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
}

/* Tab Styling */
.tab-button {
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  position: relative;
}

/* Ensure hidden class works properly */
.hidden {
  display: none !important;
}

/* Ensure tab content is visible by default for first tab */
.tab-content:first-of-type {
  display: block;
}

.tab-button:hover {
  color: #4f46e5 !important;
  border-color: #c7d2fe !important;
}

.tab-button:focus {
  outline: none;
  ring: 2px;
  ring-color: #3b82f6;
  ring-opacity: 0.5;
}

.tab-content {
  animation: fadeInTab 0.3s ease-in-out;
}

@keyframes fadeInTab {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tab-content-container {
  min-height: 300px;
}

/* Tab content sections */
.tab-content .bg-blue-50 {
  border-left: 4px solid #3b82f6;
}

.tab-content .bg-indigo-50 {
  border-left: 4px solid #6366f1;
}

.tab-content .bg-yellow-50 {
  border-left: 4px solid #f59e0b;
}

.tab-content .bg-purple-50 {
  border-left: 4px solid #8b5cf6;
}

.tab-content .bg-red-50 {
  border-left: 4px solid #ef4444;
}

.tab-content .bg-green-50 {
  border-left: 4px solid #10b981;
}

/* Responsive tab design */
@media (max-width: 768px) {
  .tab-button {
    font-size: 0.875rem;
    padding: 0.5rem 0.25rem;
  }
  
  nav.-mb-px {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

@media (max-width: 640px) {
  nav.-mb-px {
    flex-direction: column;
    space-x: 0;
  }
  
  .tab-button {
    border-bottom: none !important;
    border-left: 2px solid transparent;
    text-align: left;
    padding: 0.75rem 1rem;
    margin-bottom: 0.25rem;
    border-radius: 0.375rem;
    width: 100%;
  }
  
  .tab-button.border-blue-500 {
    border-left-color: #3b82f6 !important;
    background-color: #dbeafe;
  }
}

/* Print styles */
@media print {
  .no-print {
    display: none;
  }
  
  .print-break {
    page-break-before: always;
  }
}