/*
 * Application CSS - Legacy styles for components not yet migrated to Tailwind
 * New components should use Tailwind utilities + ViewComponents (app/components/)
 */

/* Minimal CSS variables for legacy components */
:root {
  --color-primary: #1a73e8;
  --color-danger: #ea4335;
  --color-white: #ffffff;
  --color-gray-50: #f8f9fa;
  --color-gray-500: #6c757d;
  --color-border-light: #e9ecef;
  --color-border-medium: #dee2e6;
  --shadow-medium: rgba(0, 0, 0, 0.1);
}

/* Base styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  margin: 0;
  background-color: var(--color-gray-50);
}

/* Legacy button styles - DEPRECATED: Use ButtonComponent instead */
.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-white);
  border: none;
}

.btn-danger,
.btn-outline-danger {
  border: 1px solid var(--color-danger);
  color: var(--color-danger);
  background: white;
}

.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8rem;
}

/* Layout - Keep for now */
.main-content {
  padding: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  min-height: calc(100vh - 69px);
}

/* Navbar - Legacy component */
.navbar {
  background-color: var(--color-white);
  border-bottom: 1px solid var(--color-border-light);
  padding: 0.75rem 1.5rem;
  box-shadow: 0 1px 3px var(--shadow-medium);
  position: absolute;
  top: 1em;
  right: 2em;
}

/* Legacy card styles - DEPRECATED: Use CardComponent instead */
.card {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--color-border-light);
  box-shadow: 0 2px 8px var(--shadow-medium);
}

.card-header {
  padding: 1rem;
}

.card-body {
  padding: 1rem;
}

.card-actions {
  padding: 1rem;
  background-color: var(--color-gray-50);
  border-top: 1px solid var(--color-border-light);
}

/* Legacy table styles - Keep for views not yet migrated */
.table {
  width: 100%;
  background-color: white;
  border-radius: 8px;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 180, 0.03);
}

.table thead th {
  background-color: var(--color-gray-50);
  padding: 0.75rem;
}

.table tbody td {
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border-medium);
}

.table-responsive {
  overflow-x: auto;
}

/* Keep table danger/warning row colors for reports */
table tr.danger td {
  background: rgba(255, 85, 0, 0.3);
}

table tr.warning td {
  background: rgba(255, 174, 0, 0.3);
}

/* Report-specific styles (used in show views) */
.reports-section {
  margin-top: 2rem;
}

.report-type-card {
  background: white;
  border: 1px solid var(--color-border-light);
  border-radius: 12px;
  padding: 1rem;
}

/* Notification/Flash messages */
@keyframes slideIn {
  from {
    transform: translateY(-100%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.notification {
  position: fixed;
  top: 1em;
  left: 0;
  right: 0;
  margin: 0 auto;
  width: 400px;
  padding: 1em;
  border-radius: 0.5em;
  background-color: white;
  box-shadow: 0 0 10px var(--shadow-medium);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  animation: slideIn 0.3s ease-out forwards;
  z-index: 20;
}

.notification.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

.notification > button {
  border: none;
  padding: 0;
  width: 36px;
  font-size: 24px;
  background: none;
  cursor: pointer;
}

/* Pagination (Kaminari) */
ul.pagination {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-item {
  display: block;
}

.pagination .page-item .page-link {
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--color-border-medium);
  border-radius: 0.25rem;
  text-decoration: none;
  color: var(--color-primary);
}

.pagination .page-item.active .page-link {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.pagination .page-item.disabled .page-link {
  color: var(--color-gray-500);
  cursor: not-allowed;
}

/* Badge styles (legacy flash messages) */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.875rem;
  font-weight: 500;
}

.badge-success {
  background-color: #d4edda;
  color: #155724;
}

.badge-danger {
  background-color: #f8d7da;
  color: #721c24;
}
