/* ============================================================
   EventCountdownTiles — Dashboard Messe-Timer Kacheln
   ============================================================ */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

/* Single Tile */
.tile {
  background: var(--color-bg-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  border-left: 4px solid #3b82f6;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

/* Tile Header */
.tileHeader {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.tileName {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0;
  line-height: 1.3;
}

/* Status Chip */
.statusChip {
  flex-shrink: 0;
  padding: 0.125rem 0.5rem;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.chip_upcoming {
  background: #dbeafe;
  color: #1e40af;
}

.chip_ongoing {
  background: #dcfce7;
  color: #166534;
}

.chip_ended {
  background: var(--color-bg-subtle);
  color: var(--color-text-muted);
}

/* Countdown Row */
.countdownRow {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.countdownLabel {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--color-text);
}

.countdownLabelMuted {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

/* Progress Bar */
.progressBar {
  width: 100%;
  height: 6px;
  background: var(--color-bg-subtle);
  border-radius: 3px;
  overflow: hidden;
}

.progressFill {
  height: 100%;
  background: linear-gradient(90deg, #22c55e, #16a34a);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* Meta Info */
.tileMeta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.metaItem {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--color-text-secondary);
}

.metaItem svg {
  flex-shrink: 0;
}

/* Website Link */
.websiteLink {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--color-primary);
  text-decoration: none;
  margin-top: 0.125rem;
}

.websiteLink:hover {
  text-decoration: underline;
}

/* Dark Mode */
:global([data-theme='dark']) .chip_upcoming {
  background: rgba(59, 130, 246, 0.15);
  color: #93c5fd;
}

:global([data-theme='dark']) .chip_ongoing {
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
}

/* Responsive */
@media (max-width: 640px) {
  .grid {
    grid-template-columns: 1fr;
  }
}
