/**
 * Component Styles - Cards, buttons, form inputs, and alerts
 */

/* ========== Cards ========== */
.card {
  background: white;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ========== Form Elements ========== */
.form-group {
  margin-bottom: 1rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--gray-700);
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--gray-300);
  border-radius: 6px;
  font-size: 1rem;
  transition: all 0.2s;
  font-family: inherit;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ========== Buttons ========== */
button {
  background: var(--primary-color);
  color: white;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.2s;
  font-family: inherit;
}

button:hover {
  background: var(--primary-hover);
}

button:active {
  background: var(--primary-dark);
}

button:disabled {
  background: var(--gray-300);
  cursor: not-allowed;
}

/* ========== Alerts ========== */
.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  margin-bottom: 1rem;
}

/* ========== Filter/Search UI ========== */
.filters-container {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--gray-50);
  border-radius: 8px;
}

.filters-grid {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.filter-group {
  margin-bottom: 1rem;
}

.filter-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.filter-select,
.filter-input {
  width: 100%;
  padding: 0.5rem;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
}

/* ========== Table Enhancements ========== */
.text-right {
  text-align: right;
}

.primary-link {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.primary-link:hover {
  text-decoration: underline;
}

.flag-display {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.flag-image {
  width: 20px;
  height: 15px;
  object-fit: cover;
  border: 1px solid var(--gray-300);
}

.no-value-text {
  color: var(--gray-400);
  font-style: italic;
}

/* ========== Pagination ========== */
.pagination-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--gray-200);
}

.pagination-stats {
  color: var(--gray-600);
  font-size: 0.875rem;
}

.pagination-buttons {
  display: flex;
  gap: 0.5rem;
}

/* ========== Empty States ========== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  min-height: 300px;
}

.empty-state-icon {
  color: var(--gray-300);
  margin-bottom: 1.5rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 0.5rem;
}

.empty-state-description {
  color: var(--gray-500);
  max-width: 360px;
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

.empty-state-compact {
  padding: 1.5rem;
  text-align: center;
  color: var(--gray-500);
  font-size: 0.875rem;
}

.empty-state-compact-icon {
  color: var(--gray-300);
  margin-bottom: 0.5rem;
}

/* ========== Event Stats Cards ========== */
.event-stats-card {
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 8px;
  color: white;
}

.event-stats-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  margin-bottom: 1rem;
}

.event-stats-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
}

.event-stats-actions {
  display: flex;
  gap: 0.5rem;
}

.event-stats-btn {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

.event-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.event-stats-item {
  text-align: center;
}

.event-stats-label {
  font-size: 0.875rem;
  opacity: 0.8;
  margin-bottom: 0.5rem;
}

.event-stats-value {
  font-size: 2rem;
  font-weight: 700;
}

.event-stats-detail {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
}

/* ========== Responsive Components ========== */

/* Tablet breakpoint */
@media (max-width: 1024px) {
  .filters-grid {
    grid-template-columns: 1fr 1fr;
  }

  .filters-grid > :last-child {
    grid-column: span 2;
  }

  .event-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Mobile breakpoint */
@media (max-width: 768px) {
  .card {
    padding: 1rem;
    border-radius: 6px;
  }

  .filters-container {
    padding: 0.75rem;
    margin-bottom: 1rem;
  }

  .filters-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .filters-grid > :last-child {
    grid-column: 1;
  }

  /* Pagination adjustments */
  .pagination-container {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .pagination-stats {
    text-align: center;
    order: 2;
  }

  .pagination-buttons {
    justify-content: center;
    order: 1;
    flex-wrap: wrap;
  }

  /* Event stats responsive */
  .event-stats-card {
    padding: 1rem;
  }

  .event-stats-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .event-stats-item {
    padding: 0.75rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
  }

  .event-stats-value {
    font-size: 1.75rem;
  }

  /* Empty state mobile */
  .empty-state {
    padding: 2rem 1rem;
    min-height: 250px;
  }

  .empty-state-title {
    font-size: 1.125rem;
  }

  .empty-state-description {
    font-size: 0.9375rem;
  }
}

/* Small mobile breakpoint */
@media (max-width: 480px) {
  .card {
    padding: 0.75rem;
  }

  .filters-container {
    padding: 0.5rem;
  }

  .event-stats-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .event-stats-actions {
    width: 100%;
    justify-content: flex-end;
  }

  .empty-state {
    padding: 1.5rem 0.75rem;
    min-height: 200px;
  }
}
