/* Event Manager Block Styles */
.event-manager-block {
  margin: 20px 0;

  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Filter Controls */
.event-filters {
  background-color: #0a0a0a;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.filter-item {
  flex: 1;
  min-width: 150px;
}

.filter-input,
.filter-select {
  width: 100%;
  padding: 0.5rem;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #f5f5f5;
  font-size: 0.9em;
}

.filter-input:focus,
.filter-select:focus {
  outline: none;
  border-color: #3273dc;
  box-shadow: 0 0 0 2px rgba(50, 115, 220, 0.2);
}

.filter-input::placeholder {
  color: #888;
}

.filter-button {
  background-color: #3273dc;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  transition: background-color 0.2s ease;
}

.filter-button:hover {
  background-color: #4a9eff;
}

/* Collapsible Filters */
.filter-toggle-link {
  color: #3273dc;
  text-decoration: none;
  font-size: 0.9em;
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.filter-toggle-link:hover {
  background-color: #3273dc;
  color: white;
  text-decoration: none;
}

/* Quick Filter Links */
.quick-filter {
  color: #3273dc;
  text-decoration: none;
  font-size: 0.9em;
  padding: 0.5rem 0.75rem;
  margin: 0 0.25rem;
  border: none;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.quick-filter:hover {
  background-color: #3273dc;
  color: white;
  text-decoration: none;
}

.quick-filter.active {
  background-color: #3273dc;
  color: white;
}

.collapsible-filters {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #333;
}

.collapsible-filters .filter-item label {
  color: #d0d0d0;
  font-size: 0.85em;
  margin-bottom: 0.25rem;
  display: block;
}

/* Pagination Controls */
.pagination-controls {
  background-color: #0a0a0a;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.pagination-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
}

.pagination-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-select {
  padding: 0.5rem;
  background-color: #1a1a1a;
  border: 1px solid #333;
  border-radius: 4px;
  color: #f5f5f5;
  font-size: 0.9em;
}

.pagination-select:focus {
  outline: none;
  border-color: #3273dc;
  box-shadow: 0 0 0 2px rgba(50, 115, 220, 0.2);
}

.pagination-link {
  color: #3273dc;
  text-decoration: none;
  font-size: 0.9em;
  padding: 0.5rem 1rem;
  margin: 0 0.25rem;
  transition: color 0.2s ease;
  cursor: pointer;
  border: none !important;
  outline: none;
  box-shadow: none;
}

.pagination-link:hover:not(.disabled) {
  color: #4a9eff;
  text-decoration: underline;
}

.pagination-link.disabled {
  color: #666;
  cursor: not-allowed;
  text-decoration: none;
  border: none !important;
  outline: none;
  box-shadow: none;
}

#page-info {
  color: #d0d0d0;
  font-size: 0.9em;
  white-space: nowrap;
}

/* Responsive filter layout */
@media (max-width: 768px) {
  .filter-row {
    flex-direction: column;
    gap: 0.5rem;
  }

  .filter-item {
    min-width: 100%;
  }

  .pagination-row {
    flex-direction: column;
    gap: 0.5rem;
    align-items: stretch;
  }

  .pagination-item {
    justify-content: center;
  }
}

.events-table {
  display: flex;
  flex-direction: column;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

/* Sortable Headers */
.sortable-header {
  display: flex;
  background-color: #0a0a0a;
  border-bottom: 1px solid #333;
  padding: 0.5rem 1rem;
  font-weight: normal;
  color: #d0d0d0;
  font-size: 1em;
}

.sortable {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.2s ease;
  position: relative;
  padding-right: 1.5rem;
}

.sortable:hover {
  background-color: #1a1a1a;
}

.sort-arrow {
  position: absolute;
  right: 0.5rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.8em;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.sortable:hover .sort-arrow {
  opacity: 1;
}

.sortable.sorted-asc .sort-arrow::after {
  content: " ↑";
  color: #3273dc;
}

.sortable.sorted-desc .sort-arrow::after {
  content: " ↓";
  color: #3273dc;
}

.events-header {
  display: flex;
  background-color: #0a0a0a;
  font-weight: normal;
  border-bottom: 1px solid #333;
  padding: 0.5rem 1rem;
  color: #d0d0d0;
  font-size: 1em;
}

.event-row {
  display: flex;
  border-bottom: 1px solid #eee;
  padding: 15px 10px;
  transition: background-color 0.2s ease;
}

.event-row:hover {
  background-color: #f8f9fa;
}

.event-row:last-child {
  border-bottom: none;
}

/* Column widths - Order: DateTime, Event Details (Name + Venue), Event Type */
.event-datetime {
  flex: 1;
  color: #d0d0d0;
  font-size: 1em;
  margin-right: 1rem;
}

.event-details {
  flex: 2;
  margin-right: 1rem;
}

.event-name {
  font-weight: 600;
  color: #d0d0d0;
  margin-bottom: 0.25rem;
  font-size: 1.5em;
}

.event-venue {
  color: #d0d0d0;
  font-size: 1.275em;
  opacity: 0.8;
}

.event-type {
  flex: 1;
  color: #d0d0d0;
  font-size: 1em;
  font-weight: 500;
  margin-right: 1rem;
}

.event-rsvp {
  flex: 0 0 auto;
}

.rsvp-button {
  background-color: #3273dc;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9em;
  font-weight: 500;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 80px;
}

.rsvp-button:hover {
  background-color: #4a9eff;
  transform: translateY(-1px);
}

.rsvp-button:disabled {
  background-color: #666;
  cursor: not-allowed;
  transform: none;
}

.rsvp-button.rsvp-done {
  background-color: #48c774;
}

.rsvp-button.rsvp-done:hover {
  background-color: #3fb56d;
  transform: translateY(-1px);
}

.rsvp-text {
  font-size: 0.8em;
  margin-bottom: 0.25rem;
}

.rsvp-count {
  font-size: 0.7em;
  opacity: 0.9;
}

/* Responsive design */
@media (max-width: 768px) {
  .sortable-header,
  .events-header,
  .event-row {
    flex-direction: column;
    padding: 10px;
  }

  .sortable-header .sortable {
    padding-right: 0;
    margin-bottom: 5px;
  }

  .sort-arrow {
    position: static;
    transform: none;
    display: inline-block;
    margin-left: 0.5rem;
  }

  .event-datetime,
  .event-details,
  .event-type,
  .event-rsvp {
    flex: none;
    margin-bottom: 5px;
  }

  .event-name {
    font-size: 1.65em;
    margin-bottom: 8px;
  }

  .event-type {
    font-weight: 600;
    color: #d0d0d0;
    margin-bottom: 8px;
    font-size: 1em;
  }

  .event-datetime {
    font-weight: 600;
    color: #d0d0d0;
    font-size: 1em;
  }

  .event-venue {
    font-style: italic;
    font-size: 1.4025em;
  }
}

/* Block editor preview styles */
.event-manager-preview {
  padding: 20px;
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
  text-align: center;
  color: #666;
  font-style: italic;
}

/* Empty state */
.event-manager-block p {
  text-align: center;
  color: #666;
  font-style: italic;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #dee2e6;
}
