/*
 * Custom Avo table styling utilities
 * These classes can be applied to specific resources as needed
 */

/* Utility: Make table headers wrap text to save horizontal space */
.wrap-table-headers table thead th {
  white-space: normal !important;
  word-wrap: break-word;
  vertical-align: top;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/*
 * Resource-specific applications:
 * Apply to Events resource and Registration Tracker which have many long column names
 */
[data-resource-name="events"] table thead th,
[data-resource-name="registration_tracker_metrics"] table thead th {
  white-space: normal !important;
  word-wrap: break-word;
  vertical-align: top;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

/*
 * Event Type Badge Styling
 * Color-coded badges for different event types
 */
.event-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.5rem;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
}

/* Live events - Dark Blue */
.event-type-live {
  background-color: #bfdbfe;
  color: #1e3a8a;
}

/* Virtual events - Magenta/Pink */
.event-type-virtual {
  background-color: #fce7f3;
  color: #9f1239;
}

/* Webinar events - Green */
.event-type-webinar {
  background-color: #dcfce7;
  color: #166534;
}

/* Meal events - Orange/Amber */
.event-type-meal {
  background-color: #fed7aa;
  color: #9a3412;
}

/*
 * Daily Entry Form - Compact table styling
 * Reduces padding and column widths to fit on screen without horizontal scrolling
 */
.daily-entry-table th,
.daily-entry-table td {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.daily-entry-table input[type="number"] {
  width: 100%;
  padding: 0.25rem 0.5rem;
  font-size: 0.875rem;
}

.daily-entry-table button[type="submit"] {
  opacity: 1 !important; /* Override row opacity for buttons */
}

/*
 * Registration Tracker - Compact table styling
 * Reduces padding and font size to match daily entry form information density
 */
[data-resource-name="registration_tracker_metrics"] table th,
[data-resource-name="registration_tracker_metrics"] table td {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  font-size: 0.875rem;
}
