/* DataGrid CSS - Modern Design ohne Tailwind */

/* DataGrid Container */
.datagrid-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2rem 1rem;
  background: transparent;
}

/* Header */
.datagrid-header {
  margin-bottom: 2rem;
}

.datagrid-title {
  font-size: 1.875rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.5rem;
}

.datagrid-subtitle {
  color: #6b7280;
}

/* Jahr-Tabs Card */
.jahr-tabs-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #d1d5db;
  margin-bottom: 1.5rem;
}

.jahr-tabs-border {
  border-bottom: 1px solid #e5e7eb;
  padding: 0.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.jahr-tab {
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  font-weight: 500;
  border: none;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
}

.jahr-tab:hover {
  background: #f3f4f6;
}

.jahr-tab.active {
  background: #eb5e50;
  color: white;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Filter Card */
.filter-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #d1d5db;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.filter-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 768px) {
  .filter-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.filter-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.search-wrapper {
  position: relative;
}

.search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  pointer-events: none;
}

.search-input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
}

.search-input:focus {
  outline: none;
  border-color: #EB5E50;
  box-shadow: 0 0 0 3px rgba(235, 94, 80, 0.1);
}

.clear-search {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0.25rem;
  cursor: pointer;
  color: #9ca3af;
}

.clear-search:hover {
  color: #6b7280;
}

.filter-select {
  display: block;
  width: 100%;
  padding: 0.625rem 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  background: white;
  font-size: 0.875rem;
}

.filter-select:focus {
  outline: none;
  border-color: #EB5E50;
  box-shadow: 0 0 0 3px rgba(235, 94, 80, 0.1);
}

.filter-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.filter-info {
  font-size: 0.875rem;
  color: #6b7280;
}

.filter-reset {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
  color: #14b8a6;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
}

.filter-reset:hover {
  color: #0f766e;
  background: #f0fdfa;
}

/* DataGrid Table */
.datagrid-table-container {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #d1d5db;
  overflow: hidden;
}

/* Toolbar bei Selektion */
.datagrid-toolbar {
  background: #f0fdfa;
  border-bottom: 1px solid #99f6e4;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.toolbar-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.toolbar-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #134e4a;
}

.toolbar-clear {
  font-size: 0.875rem;
  color: #0f766e;
  font-weight: 500;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}

.toolbar-clear:hover {
  color: #134e4a;
}

.toolbar-actions {
  display: flex;
  gap: 0.5rem;
}

.toolbar-btn {
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #0f766e;
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}

.toolbar-btn:hover {
  background: #ccfbf1;
}

/* Table */
.datagrid-table {
  width: 100%;
  border-collapse: collapse;
}

.datagrid-table thead {
  background: linear-gradient(to right, #f9fafb, #f3f4f6);
  border-bottom: 2px solid #d1d5db;
}

.datagrid-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #374151;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  user-select: none;
}

.datagrid-table th.sortable {
  cursor: pointer;
  transition: background 0.15s;
}

.datagrid-table th.sortable:hover {
  background: #e5e7eb;
}

.datagrid-table th.text-right {
  text-align: right;
}

.sort-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sort-header.justify-end {
  justify-content: flex-end;
}

.sort-icon {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}

.sort-icon.inactive {
  color: #9ca3af;
}

.sort-icon.active {
  color: #EB5E50;
}

.datagrid-table tbody {
  background: white;
}

.datagrid-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
  border-left: 4px solid transparent;
  transition: all 0.15s;
  cursor: pointer;
}

.datagrid-table tbody tr:hover {
  background: #f9fafb;
  border-left-color: #EB5E50;
}

.datagrid-table tbody tr.selected {
  background: rgba(235, 94, 80, 0.05);
  border-left-color: #EB5E50;
}

.datagrid-table td {
  padding: 1rem 1.5rem;
}

.datagrid-table td.text-right {
  text-align: right;
}

/* Checkbox */
.datagrid-checkbox {
  width: 1rem;
  height: 1rem;
  border: 1px solid #d1d5db;
  border-radius: 0.25rem;
  cursor: pointer;
  accent-color: #14b8a6;
}

.datagrid-checkbox:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.1);
}

/* Cell Content */
.cell-content-flex {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

.status-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  margin-top: 0.375rem;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px white;
}

.status-dot.durchgefuehrt {
  background: #3b82f6;
}

.status-dot.abgesagt {
  background: #6b7280;
}

.status-dot.geplant {
  background: #eab308;
}

.status-dot.aktiv {
  background: #14b8a6;
}

.cell-text-wrapper {
  flex: 1;
  min-width: 0;
}

.cell-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

tr:hover .cell-title {
  color: #EB5E50;
}

.cell-id {
  font-size: 0.75rem;
  color: #6b7280;
  margin-top: 0.25rem;
}

.date-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.date-icon {
  width: 1rem;
  height: 1rem;
  color: #9ca3af;
  flex-shrink: 0;
}

.date-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
}

.status-badge.durchgefuehrt {
  background: #dbeafe;
  color: #1e40af;
}

.status-badge.abgesagt {
  background: #f3f4f6;
  color: #374151;
}

.status-badge.geplant {
  background: #fef9c3;
  color: #854d0e;
}

.status-badge.aktiv {
  background: #ccfbf1;
  color: #115e59;
}

.status-badge .status-dot {
  margin-top: 0;
  box-shadow: none;
}

/* Teilnehmer Cell */
.participants-cell {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.participant-count {
  font-size: 0.875rem;
  font-weight: 700;
  color: #111827;
}

.participant-icon-wrapper {
  width: 2rem;
  height: 2rem;
  background: #f3f4f6;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

tr:hover .participant-icon-wrapper {
  background: #fef2f2;
}

.participant-icon {
  width: 1rem;
  height: 1rem;
  color: #6b7280;
  transition: color 0.15s;
}

tr:hover .participant-icon {
  color: #EB5E50;
}

/* Actions Button */
.actions-btn {
  padding: 0.5rem;
  background: none;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background 0.15s;
}

.actions-btn:hover {
  background: #f3f4f6;
}

.actions-icon {
  width: 1.25rem;
  height: 1.25rem;
  color: #9ca3af;
  transition: color 0.15s;
}

.actions-btn:hover .actions-icon {
  color: #6b7280;
}

/* Empty State */
.empty-state {
  padding: 4rem 1.5rem;
  text-align: center;
}

.empty-icon-wrapper {
  width: 4rem;
  height: 4rem;
  background: #f3f4f6;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
}

.empty-icon {
  width: 2rem;
  height: 2rem;
  color: #9ca3af;
}

.empty-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 0.25rem;
}

.empty-text {
  font-size: 0.875rem;
  color: #6b7280;
}

/* Pagination */
.pagination {
  background: #f9fafb;
  padding: 1rem 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pagination-info {
  font-size: 0.875rem;
  color: #374151;
}

.pagination-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pagination-btn {
  padding: 0.5rem 0.75rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.pagination-btn:hover:not(:disabled) {
  background: #f9fafb;
}

.pagination-btn:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
  border-color: #e5e7eb;
}

.pagination-btn svg {
  width: 1.25rem;
  height: 1.25rem;
}

.pagination-pages {
  display: flex;
  gap: 0.25rem;
}

.pagination-page {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid #d1d5db;
  background: white;
  color: #374151;
  cursor: pointer;
  transition: all 0.15s;
}

.pagination-page:hover {
  background: #f9fafb;
}

.pagination-page.active {
  background: #14b8a6;
  color: white;
  border-color: #14b8a6;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.pagination-ellipsis {
  padding: 0.5rem 0.75rem;
  color: #9ca3af;
}

/* Mobile Card View */
.mobile-cards-container {
  display: none;
}

.mobile-card {
  background: white;
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  border: 1px solid #d1d5db;
  margin-bottom: 1rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.15s;
}

.mobile-card:hover {
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border-color: #8C084D;
}

.mobile-card:active {
  transform: scale(0.99);
}

.mobile-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e5e7eb;
}

.mobile-card-title-wrapper {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
  min-width: 0;
}

.mobile-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #111827;
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.mobile-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-card-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.mobile-card-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #6b7280;
  font-weight: 500;
}

.mobile-card-icon {
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
}

.mobile-card-value {
  font-size: 0.875rem;
  color: #111827;
  font-weight: 500;
  text-align: right;
}

.mobile-card-participants {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  color: #8C084D;
  font-weight: 600;
}

/* Responsive: Mobile and Tablet View */
@media (max-width: 1024px) {
  .datagrid-table-container table {
    display: none;
  }

  .datagrid-table-container {
    background: transparent;
    box-shadow: none;
    border: none;
  }

  .mobile-cards-container {
    display: block;
  }

  .datagrid-container {
    padding: 1rem 0.75rem;
  }

  .datagrid-title {
    font-size: 1.5rem;
  }

  .filter-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .jahr-tabs-border {
    padding: 0.375rem;
  }

  .jahr-tab {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
  }

  .pagination {
    flex-direction: column;
    gap: 1rem;
    align-items: stretch;
  }

  .pagination-info {
    text-align: center;
  }

  .pagination-nav {
    justify-content: center;
  }
}

