/**
 * FDC Global Styles
 * 
 * This stylesheet provides consistent styling across the entire FDC application,
 * based on the Events module design pattern.
 */

/* Global variables and theme colors */
:root {
  --primary: #1a365d;
  --primary-dark: #0f2942;
  --primary-light: #e2e8f0;
  --secondary: #2d3748;
  --success: #38a169;
  --warning: #ffa200;
  --danger: #e53e3e;
  --light: #f7fafc;
  --dark: #2d3748;
  --gray-100: #f7fafc;
  --gray-200: #edf2f7;
  --gray-300: #e2e8f0;
  --gray-400: #cbd5e0;
  --gray-500: #a0aec0;
  --gray-600: #718096;
  --gray-700: #4a5568;
  --gray-800: #2d3748;
  --gray-900: #1a202c;
}

/* Page Header Styles */
.page-header {
  margin-bottom: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}

.page-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}

.page-header p {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--gray-500);
}

@media (min-width: 640px) {
  .page-header h1 {
    font-size: 1.875rem;
  }
}

/* Card styling with shadows */
.card {
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  animation: fadeIn 0.3s ease-out;
}

/* Form styling */
.form-container {
  animation: fadeIn 0.3s ease-out;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-700);
  margin-bottom: 0.375rem;
}

/* Form elements enhance with transitions */
input, 
select, 
textarea {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--gray-300);
  border-radius: 0.375rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

input:focus, 
select:focus, 
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.2);
  transform: translateY(-1px);
}

/* Force styling for Django form elements (override any Tailwind classes) */
input[type="text"],
input[type="email"],
input[type="number"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
input[type="time"],
select,
textarea {
  width: 100% !important;
  padding: 0.625rem 0.875rem !important;
  border: 1px solid var(--gray-300) !important;
  border-radius: 0.375rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  font-size: 0.875rem !important;
  transition: all 0.2s ease !important;
  background-color: white !important;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="number"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="date"]:focus,
input[type="datetime-local"]:focus,
input[type="month"]:focus,
input[type="week"]:focus,
input[type="time"]:focus,
select:focus,
textarea:focus {
  outline: none !important;
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.2) !important;
  transform: translateY(-1px) !important;
}

/* Button styling */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Primary Button */
.btn-primary {
  background-color: var(--primary);
  color: white;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

/* Secondary Button */
.btn-secondary {
  background-color: white;
  color: var(--gray-700);
  border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
  background-color: var(--gray-100);
  color: var(--gray-800);
}

/* Action Button - for create/add operations */
.btn-action {
  background-color: var(--success);
  color: white;
  border: 1px solid transparent;
}

.btn-action:hover {
  background-color: #2f855a; /* Darker green */
}

/* Danger Button */
.btn-danger {
  background-color: var(--danger);
  color: white;
  border: 1px solid transparent;
}

.btn-danger:hover {
  background-color: #c53030; /* Darker red */
}

/* Link Button */
.btn-link {
  background: none;
  color: var(--primary);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
}

.btn-link:hover {
  text-decoration: underline;
  background: none;
  box-shadow: none;
  transform: none;
}

/* Button with icon */
.btn-icon {
  display: inline-flex;
  align-items: center;
}

.btn-icon svg {
  margin-right: 0.5rem;
  width: 1.25rem;
  height: 1.25rem;
}

/* Table styling */
.table-container {
  overflow-x: auto;
  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);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.table th {
  background-color: var(--gray-100);
  color: var(--gray-700);
  font-weight: 600;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid var(--gray-200);
}

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

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

.table tr:hover {
  background-color: var(--gray-50);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.badge-success {
  background-color: #C6F6D5;
  color: #276749;
}

.badge-warning {
  background-color: #FEEBC8;
  color: #C05621;
}

.badge-danger {
  background-color: #FED7D7;
  color: #C53030;
}

.badge-info {
  background-color: #BEE3F8;
  color: #2B6CB0;
}

.badge-secondary {
  background-color: #E2E8F0;
  color: #4A5568;
}

/* Flex utility */
.flex-between {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Margin utilities */
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

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

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

/* Error messages container */
.error-container {
  background-color: #FED7D7;
  border-left: 4px solid #C53030;
  color: #C53030;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.375rem;
}

.error-title {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.error-list {
  list-style-type: disc;
  margin-left: 1.5rem;
}

/* Success messages container */
.success-container {
  background-color: #C6F6D5;
  border-left: 4px solid #38A169;
  color: #2F855A;
  padding: 1rem;
  margin-bottom: 1.5rem;
  border-radius: 0.375rem;
} 