/*
 * Cards - Clean & Minimal
 */

.card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  overflow: hidden;
  margin-bottom: var(--space-6);
}

.card:hover {
  border-color: var(--border-secondary);
  box-shadow: var(--shadow-md);
}

.card-header {
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border-primary);
  padding: var(--space-4) var(--space-6);
  font-weight: 600;
  color: var(--text-primary);
  font-size: 1rem;
}

.card-body {
  padding: var(--space-6);
  color: var(--text-secondary);
}

.card-footer {
  background: var(--bg-tertiary);
  border-top: 1px solid var(--border-primary);
  padding: var(--space-4) var(--space-6);
}

.card-title {
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: var(--space-2);
  font-size: 1.125rem;
}

.card-text {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* Card header: auto-zero heading margins + flex layout utility */
.card-header h5,
.card-header h6 {
  margin-bottom: 0;
}

.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.section-header-note--single-line {
  display: block;
  flex: 1 1 auto;
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section-header-note--single-line > span {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: top;
  white-space: nowrap;
}

.feed-filter-tray {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  padding-bottom: 0.25rem;
  padding-right: 0.25rem;
  scroll-behavior: smooth;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.feed-filter-tray__content {
  display: inline-flex;
  flex-direction: column;
  gap: 0.5rem;
  min-width: max-content;
}

.feed-filter-tray__row {
  display: flex;
  gap: 0.5rem;
  width: max-content;
}

.feed-filter-tray .btn {
  width: max-content;
}

.feed-launch-strip {
  width: 100%;
}

.feed-launch-strip__scroller {
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior: contain;
  padding-bottom: 0.25rem;
  width: 100%;
  -webkit-overflow-scrolling: touch;
}

.feed-launch-strip__row {
  display: inline-flex;
  gap: 0.5rem;
  min-width: max-content;
}

.feed-launch-tile {
  appearance: none;
  border: 1px solid var(--border-primary);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.1rem;
  min-width: 4.9rem;
  padding: 0.25rem 0.65rem;
  text-align: center;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.feed-launch-tile:hover,
.feed-launch-tile--armed {
  transform: translateY(-1px);
}

.feed-launch-tile__emoji {
  font-size: 1rem;
  line-height: 1;
  margin-bottom: 0;
}

.feed-launch-tile__word {
  color: var(--text-secondary);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}

.feed-launch-tile__title {
  font-size: 0.85rem;
  line-height: 1.1;
}

.feed-launch-description {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-top: 0;
  width: 100%;
}

.feed-launch-description-text {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-launch-description-go {
  color: var(--accent-primary);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.feed-launch-tile__description {
  color: var(--text-tertiary);
  font-size: 0.75rem;
  line-height: 1.2;
  gap: 0.5rem;
}

.feed-launch-tile__go-text {
  color: var(--accent-primary);
  font-weight: 700;
  white-space: nowrap;
}

/* Clickable cards */
.clickable-card {
  cursor: pointer;
  transition: all var(--transition-base);
}

.clickable-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-lg);
}

/* Fill grid row height: body grows so the stats/deadline row (mt-auto) sits on the bottom panel */
.card.compact-event-card {
  display: flex;
  flex-direction: column;
}

.card.compact-event-card > .card-body {
  flex: 1 1 auto;
  min-height: 0;
}

.compact-event-card__footer {
  margin-top: auto;
  width: 100%;
}

/* Compact event cards (home + events index): white title + chevron affordance for “view event” */
.compact-event-card__title-link {
  padding-bottom: 0.25rem;
}

.compact-event-card__title-link .card-title {
  color: var(--text-primary);
  transition: color var(--transition-fast);
  white-space: normal;
  overflow-wrap: break-word;
}

.compact-event-card__title-view-chevron {
  color: var(--text-tertiary);
  font-size: 1.25rem;
  font-weight: 300;
  line-height: 1.2;
  margin-top: 0.05rem;
  transition: color var(--transition-fast);
}

.compact-event-card:hover .compact-event-card__title-link .compact-event-card__title-view-chevron {
  color: var(--text-secondary);
}

.compact-event-card__deadline {
  font-variant-numeric: tabular-nums;
}

.compact-event-card__status-chip {
  color: var(--text-tertiary);
  font-size: var(--font-xs);
  font-weight: 500;
}

.compact-event-card__new-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1;
  z-index: 4;
}

.compact-event-card__result-description {
  background: var(--bg-tertiary);
  border-left: 2px solid var(--border-secondary);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: var(--font-xs);
  line-height: 1.4;
  padding: var(--space-2) var(--space-3);
}

.compact-event-card__footer-stats {
  font-size: var(--font-sm);
  color: var(--text-tertiary);
}

/* Link wraps the strip; block avoids inline box quirks next to the card */
.compact-event-recent-comment-link {
  display: block;
}

/* Strip stays under the card (z-index below card) so it tucks flush—no lifted “gap”.
   Extra top padding + slight translate on the text nudges the line down in the visible pill. */
.compact-event-recent-comment {
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-primary);
  border-radius: 0 0 12px 12px;
  bottom: -1.45rem;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
  box-sizing: border-box;
  color: var(--text-secondary);
  display: flex;
  font-size: var(--font-xs);
  gap: 0.35rem;
  justify-content: flex-start;
  left: 0.75rem;
  line-height: 1.35;
  min-height: 1.85rem;
  padding: 0.32rem 0.65rem 0.16rem;
  position: absolute;
  right: 0.75rem;
  z-index: 1;
}

.compact-event-recent-comment__author,
.compact-event-recent-comment__text {
  line-height: 1.35;
  transform: translateY(2px);
}

.compact-event-recent-comment__author {
  color: var(--text-primary);
  flex-shrink: 0;
  font-weight: 600;
}

.compact-event-recent-comment__text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Mobile cards */
@media (max-width: 768px) {
  .card {
    margin-bottom: var(--space-4);
  }
  
  .card-header,
  .card-body {
    padding: var(--space-4);
  }
  
  .card-footer {
    padding: var(--space-3) var(--space-4);
  }
}
