/* PolicyBuilder AI - Multi-Framework Compliance Platform Custom Styles */

/* Custom animations and transitions */
.fade-in {
  animation: fadeIn 0.3s ease-in-out;
}

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

/* Loading spinner animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

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

/* Form styling enhancements */
.form-section {
  transition: all 0.3s ease;
}

.form-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Button hover effects */
.btn-primary {
  @apply bg-blue-600 text-white px-6 py-3 rounded-lg font-medium transition-all duration-200;
}

.btn-primary:hover {
  @apply bg-blue-700 transform -translate-y-1 shadow-lg;
}

.btn-secondary {
  @apply bg-gray-200 text-gray-800 px-6 py-3 rounded-lg font-medium transition-all duration-200;
}

.btn-secondary:hover {
  @apply bg-gray-300 transform -translate-y-1 shadow-lg;
}

.btn-success {
  @apply bg-green-600 text-white px-6 py-3 rounded-lg font-medium transition-all duration-200;
}

.btn-success:hover {
  @apply bg-green-700 transform -translate-y-1 shadow-lg;
}

/* Card styling */
.card {
  @apply bg-white rounded-lg shadow-md p-6 transition-all duration-200;
}

.card:hover {
  @apply shadow-lg transform -translate-y-1;
}

/* Input styling */
.form-input {
  @apply w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-all duration-200;
}

.form-input:focus {
  @apply shadow-md;
}

/* Navigation */
.nav-link {
  @apply px-4 py-2 rounded-lg text-gray-700 hover:bg-blue-100 hover:text-blue-700 transition-colors duration-200;
}

.nav-link.active {
  @apply bg-blue-600 text-white;
}

/* Status indicators */
.status-success {
  @apply bg-green-100 text-green-800 px-3 py-1 rounded-full text-sm font-medium;
}

.status-warning {
  @apply bg-yellow-100 text-yellow-800 px-3 py-1 rounded-full text-sm font-medium;
}

.status-error {
  @apply bg-red-100 text-red-800 px-3 py-1 rounded-full text-sm font-medium;
}

/* Progress bars */
.progress-bar {
  @apply w-full bg-gray-200 rounded-full h-2;
}

.progress-fill {
  @apply bg-blue-600 h-2 rounded-full transition-all duration-300;
}

/* Tooltips */
.tooltip {
  @apply relative cursor-help;
}

.tooltip:hover .tooltip-text {
  @apply visible opacity-100;
}

.tooltip-text {
  @apply invisible opacity-0 absolute z-10 bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-3 py-2 text-sm text-white bg-gray-900 rounded-lg transition-all duration-200;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .container {
    @apply px-4;
  }
  
  .grid {
    @apply grid-cols-1;
  }
  
  .card {
    @apply p-4;
  }
}

/* Print styles for generated documents */
@media print {
  .no-print {
    display: none !important;
  }
  
  .print-only {
    display: block !important;
  }
  
  body {
    font-size: 12pt;
    line-height: 1.4;
  }
  
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
  }
  
  .page-break {
    page-break-before: always;
  }
}

/* Code syntax highlighting for generated policies */
.policy-content {
  @apply prose prose-lg max-w-none;
}

.policy-content h1 {
  @apply text-3xl font-bold text-gray-900 mb-6;
}

.policy-content h2 {
  @apply text-2xl font-semibold text-gray-800 mt-8 mb-4;
}

.policy-content h3 {
  @apply text-xl font-semibold text-gray-700 mt-6 mb-3;
}

.policy-content p {
  @apply mb-4 text-gray-700 leading-relaxed;
}

.policy-content ul {
  @apply list-disc list-inside mb-4 space-y-2;
}

.policy-content ol {
  @apply list-decimal list-inside mb-4 space-y-2;
}

.policy-content table {
  @apply w-full border-collapse border border-gray-300 mb-4;
}

.policy-content th {
  @apply bg-gray-100 border border-gray-300 px-4 py-2 font-semibold text-left;
}

.policy-content td {
  @apply border border-gray-300 px-4 py-2;
}

/* Accessibility improvements */
.sr-only {
  @apply absolute w-px h-px p-0 -m-px overflow-hidden whitespace-nowrap border-0;
}

/* Focus indicators for keyboard navigation */
button:focus,
input:focus,
textarea:focus,
select:focus {
  @apply outline-none ring-2 ring-blue-500 ring-offset-2;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    @apply border-2 border-gray-800;
  }
  
  .btn-primary {
    @apply border-2 border-blue-800;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}