/* CraftAttack.me - Staffel Detail Page */

/* Back link */
.staffel-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--color-text-muted); font-size: 0.85rem;
  margin-bottom: 24px; transition: color var(--transition);
}
.staffel-back:hover { color: var(--color-primary); }
.staffel-back svg { width: 16px; height: 16px; }

/* Header */
.staffel-header {
  margin-bottom: 32px;
}
.staffel-header-top {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.staffel-nr {
  font-size: 3rem; font-weight: 800; color: var(--color-primary);
  line-height: 1; letter-spacing: -1px;
}
.staffel-header-meta {
  display: flex; gap: 8px; flex-wrap: wrap;
}
.staffel-zeitraum {
  font-size: 1rem; color: var(--color-text-muted); margin-bottom: 4px;
}

/* Description */
.staffel-beschreibung {
  background: var(--color-bg-card);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight); border-left-color: var(--mc-highlight);
  border-bottom-color: var(--mc-border-dark); border-right-color: var(--mc-border-dark);
  padding: 24px;
  margin-bottom: 32px;
}
.staffel-beschreibung p {
  font-size: 0.95rem; line-height: 1.8;
}

/* Stats Grid */
.staffel-stats {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 2px; background: var(--mc-border-dark);
  border: 2px solid var(--mc-border-dark);
  margin-bottom: 32px;
}
.staffel-stat {
  background: var(--color-bg-card); padding: 16px 18px;
}
.staffel-stat-label {
  font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
  color: var(--color-text-muted); margin-bottom: 4px;
}
.staffel-stat-value {
  font-size: 0.95rem; color: var(--color-text); font-weight: 600;
}

/* Section Title */
.staffel-section-title {
  font-size: 1.1rem; color: var(--color-primary); font-weight: 700;
  margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 2px solid var(--mc-border-dark);
}

/* Highlights */
.staffel-highlights {
  margin-bottom: 40px;
}
.highlight-list {
  display: flex; flex-direction: column;
  gap: 2px; background: var(--mc-border-dark);
  border: 2px solid var(--mc-border-dark);
}
.highlight-item {
  background: var(--color-bg-card);
  padding: 18px 20px;
  display: flex; gap: 16px; align-items: flex-start;
}
.highlight-icon {
  width: 32px; height: 32px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,152,0,0.08);
  border: 1px solid rgba(255,152,0,0.15);
  color: var(--color-primary); font-size: 0.8rem; font-weight: 700;
}
.highlight-content { flex: 1; }
.highlight-content h4 {
  font-size: 0.92rem; color: var(--color-text); font-weight: 600;
  margin-bottom: 4px;
}
.highlight-content p {
  font-size: 0.85rem; line-height: 1.6;
}
.highlight-date {
  font-size: 0.72rem; color: var(--color-text-muted);
  margin-top: 4px;
}

/* Bauwerke Outer Section Toggle */
.bauwerke-outer-accordion {
  margin-bottom: 40px;
  background: var(--color-bg-card);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight); border-left-color: var(--mc-highlight);
  border-bottom-color: var(--mc-border-dark); border-right-color: var(--mc-border-dark);
}
.bauwerke-outer-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 18px 20px; cursor: pointer;
  text-align: left; transition: background var(--transition);
}
.bauwerke-outer-toggle:hover { background: rgba(255,152,0,0.04); }
.bauwerke-count { font-size: 0.8rem; color: var(--color-text-muted); font-weight: 400; }
.bauwerke-outer-chevron {
  width: 20px; height: 20px; color: var(--color-text-muted);
  transition: transform var(--transition); flex-shrink: 0;
}
.bauwerke-outer-toggle.open .bauwerke-outer-chevron { transform: rotate(180deg); color: var(--color-primary); }
.bauwerke-outer-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s ease;
  padding: 0 12px;
}
.bauwerke-outer-content > .bauwerke-outer-inner {
  overflow: hidden;
}
.bauwerke-outer-content.open {
  grid-template-rows: 1fr;
  padding: 0 12px 12px;
}

/* Bauwerk Preview Avatars (in collapsed header) */
.bauwerk-preview-avatars {
  display: flex; align-items: center; gap: 0; flex-shrink: 0; margin-right: 8px;
}
.bauwerk-preview-avatars img {
  width: 22px; height: 22px; border-radius: 50%;
  border: 1.5px solid var(--mc-border-dark);
  margin-left: -6px; object-fit: cover;
  background: var(--mc-border-dark);
}
.bauwerk-preview-avatars img:first-child { margin-left: 0; }
.bauwerk-preview-more {
  font-size: 0.68rem; color: var(--color-text-muted); font-weight: 600;
  margin-left: 4px; white-space: nowrap;
}

/* Bauwerke Accordion */
.bauwerk-accordion-list {
  display: flex; flex-direction: column;
  gap: 2px; background: var(--mc-border-dark);
  border: 2px solid var(--mc-border-dark);
}
.bauwerk-accordion {
  background: var(--color-bg-card);
  overflow: hidden;
}
.bauwerk-accordion.open { background: var(--color-bg-lighter); }

.bauwerk-header {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px; cursor: pointer; user-select: none;
  width: 100%; text-align: left; font-size: 1rem;
  transition: background var(--transition);
}
.bauwerk-header:hover { background: rgba(255,152,0,0.04); }
.bauwerk-header .accordion-header-text { flex: 1; }
.bauwerk-header .accordion-header-text h3 { font-size: 0.92rem; margin-bottom: 1px; }
.bauwerk-header .accordion-header-text span { font-size: 0.72rem; color: var(--color-text-muted); }
.bauwerk-header .accordion-chevron {
  width: 16px; height: 16px; color: var(--color-text-muted);
  transition: transform var(--transition); flex-shrink: 0;
}
.bauwerk-accordion.open > .bauwerk-header .accordion-chevron { transform: rotate(180deg); color: var(--color-primary); }

.bauwerk-content-inner { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; }
.bauwerk-body { padding: 0 18px 18px; }
.bauwerk-body p { font-size: 0.88rem; line-height: 1.6; margin-bottom: 8px; }
.bauwerk-builders {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--mc-border-light);
}
.bauwerk-builder {
  display: inline-flex; align-items: center; gap: 6px;
  text-decoration: none; color: var(--color-text-muted);
  font-size: 0.78rem; font-weight: 500;
  padding: 3px 8px 3px 3px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--mc-border-light);
  transition: all var(--transition);
}
.bauwerk-builder:hover {
  color: var(--color-primary); background: rgba(255,152,0,0.06);
  border-color: rgba(255,152,0,0.2);
}
.bauwerk-builder img {
  width: 24px; height: 24px; border-radius: 50%;
  object-fit: cover;
}
.bauwerk-builder-text {
  font-size: 0.78rem; color: var(--color-text-muted); margin-top: 8px;
  padding-top: 8px; border-top: 1px solid var(--mc-border-light);
}

/* Bauwerke Hinweis */
.bauwerke-hinweis {
  margin-top: 12px;
  padding: 14px 18px;
  background: rgba(255,152,0,0.04);
  border-left: 3px solid rgba(255,152,0,0.2);
}
.bauwerke-hinweis p {
  font-size: 0.8rem; color: var(--color-text-muted);
  line-height: 1.6;
}
.bauwerke-hinweis p:first-child {
  font-style: italic; margin-bottom: 4px;
}
.bauwerke-hinweis a { color: var(--color-primary); }

/* Events Timeline */
.staffel-events {
  margin-bottom: 40px;
}
.events-timeline {
  position: relative; padding-left: 28px;
}
.events-timeline::before {
  content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
  width: 2px; background: linear-gradient(to bottom, var(--color-primary), var(--mc-border-light));
}
.event-item {
  position: relative; margin-bottom: 14px; padding-left: 18px;
}
.event-item::before {
  content: ''; position: absolute; left: -25px; top: 5px;
  width: 8px; height: 8px;
  background: var(--color-primary); border: 2px solid var(--color-primary);
}
.event-item h4 { font-size: 0.88rem; color: var(--color-text); margin-bottom: 1px; }
.event-item span { font-size: 0.75rem; color: var(--color-text-muted); }

/* Besonderheiten */
.staffel-besonderheiten {
  margin-bottom: 40px;
}
.besonderheiten-list {
  display: flex; flex-direction: column; gap: 8px;
}
.besonderheit-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: rgba(255,152,0,0.04);
  border-left: 3px solid rgba(255,152,0,0.3);
  font-size: 0.88rem; color: var(--color-text-muted);
}
.besonderheit-item::before {
  content: '\2605'; color: var(--color-primary); font-size: 0.7rem;
}

/* Teilnehmer Preview */
.staffel-teilnehmer {
  margin-bottom: 40px;
}
.staffel-teilnehmer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 2px; background: var(--mc-border-dark);
  border: 2px solid var(--mc-border-dark);
}
.staffel-tn-card {
  background: var(--color-bg-card);
  padding: 10px 6px;
  text-align: center;
  transition: background var(--transition);
  text-decoration: none; color: inherit;
  display: block;
  position: relative;
}
.staffel-tn-card:hover { background: var(--color-bg-lighter); color: inherit; }

/* "NEU" badge on avatar instead of confusing top border */
.staffel-tn-card.is-new .staffel-tn-avatar {
  border-color: var(--color-primary);
}
.staffel-tn-card.is-new::after {
  content: 'NEU';
  position: absolute;
  top: 4px; right: 4px;
  font-size: 0.5rem; font-weight: 800; letter-spacing: 0.3px;
  padding: 1px 4px;
  background: var(--color-primary); color: var(--color-bg);
  border-radius: 2px;
  line-height: 1.3;
}
.staffel-tn-card.is-new .staffel-tn-name {
  color: var(--color-primary);
}

.staffel-tn-avatar {
  width: 40px; height: 40px;
  margin: 0 auto 6px;
  border: 1px solid var(--mc-border-light);
  border-radius: 50%;
  overflow: hidden;
  background: var(--mc-border-dark);
}
.staffel-tn-avatar img { width: 100%; height: 100%; object-fit: cover; }

.staffel-tn-name {
  font-size: 0.65rem; color: var(--color-text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* Map Download */
.staffel-download {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px;
  background: var(--color-bg-card);
  border: 2px solid var(--mc-border-light);
  border-top-color: var(--mc-highlight); border-left-color: var(--mc-highlight);
  border-bottom-color: var(--mc-border-dark); border-right-color: var(--mc-border-dark);
  margin-bottom: 32px;
}
.staffel-download-info { flex: 1; }
.staffel-download-info h4 { font-size: 0.92rem; margin-bottom: 2px; }
.staffel-download-info p { font-size: 0.82rem; }

/* Navigation */
.staffel-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: 40px; padding-top: 24px;
  border-top: 2px solid var(--mc-border-dark);
}
.staffel-nav a {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--color-text-muted); font-size: 0.88rem;
  transition: color var(--transition); text-decoration: none;
}
.staffel-nav a:hover { color: var(--color-primary); }
.staffel-nav svg { width: 16px; height: 16px; }

/* Not found */
.staffel-not-found {
  text-align: center; padding: 80px 20px;
}
.staffel-not-found h2 { color: var(--color-primary); margin-bottom: 12px; }

@media (max-width: 768px) {
  .staffel-nr { font-size: 2.2rem; }
  .staffel-stats { grid-template-columns: 1fr 1fr; }
  .staffel-teilnehmer-grid { grid-template-columns: repeat(auto-fill, minmax(60px, 1fr)); }
  .staffel-tn-avatar { width: 32px; height: 32px; }
  .staffel-download { flex-direction: column; }
  .highlight-item { flex-direction: column; gap: 8px; }
}
