/* Talk Card Styles */
.talk-card {
  position: relative;
  background: var(--layer-surface);
  color: var(--on-surface);
  border-radius: var(--radius-medium);
  padding: var(--size-4);
  width: 100%;
  max-width: var(--size-content-3);
  margin-inline: auto;
  margin-block: var(--block-space);
  transition: all 0.2s var(--ease-2);
}

/* Card variants */
.talk-card.outlined {
  border: 1px solid var(--outline-variant);
}

.talk-card.hoverable {
  cursor: pointer;
}

.talk-card.hoverable:hover {
  transform: translateY(-2px);
  box-shadow: var(--elevation-2);
  border-color: var(--outline);
}

.xtalk-card.over {
  opacity: 0.75;
  border-left: 4px solid var(--outline);
}

.talk-card.speaking {
  background-color: rgb(from var(--green-chip) r g b / 0.15) !important;
}
.talk-card.helping {
        background-color: rgb(from var(--blue-chip) r g b / 0.15) !important;
    }
    .talk-card.highlighted {
        background-color: rgb(from var(--yellow-chip) r g b / 0.15) !important;
    }

/* Header section */
.talk-header {
  margin-block-end: var(--size-3);
}

.talk-header .h3,
.talk-header .headline {
  margin: 0;
  line-height: 1.3;
  font-weight: 600;
}

/* Speakers section */
.speakers-section {
  display: flex;
  align-items: center;
  gap: var(--size-3);
  flex-wrap: wrap;
}

/* Description section */
.description-section {
  /* color: var(--on-surface-variant); */
  line-height: 1.4;
}

/* 2x2 Grid Layout */
.talk-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 0;
  margin-block: var(--size-1);
  padding: 0;
  overflow: hidden; /* Ensures border-radius is respected */
}

.talk-grid-item {
  display: flex;
  align-items: center;
  gap: var(--size-2);
  padding: var(--size-1);
  min-height: 3rem;
  border-right: 1px solid var(--outline-variant);
  border-bottom: 1px solid var(--outline-variant);
}

/* Remove borders on right edge and bottom edge */
.talk-grid-item:nth-child(2n) {
  border-right: none;
}

.talk-grid-item:nth-child(3),
.talk-grid-item:nth-child(4) {
  border-bottom: none;
}

.talk-grid-item svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  color: var(--on-surface-variant);
  margin-top: 1px;
}

.grid-item-content {
  flex: 1;
  line-height: 1.3;
  color: var(--on-surface-variant);
}

/* Status styling */
.status-finished,
.status-over {
  color: var(--outline);
  font-weight: 500;
}

.status-active,
.status-live {
  color: var(--success, #2e7d32);
  font-weight: 600;
}

.status-upcoming {
  color: var(--on-surface-variant);
  font-weight: 500;
}

.status-soon,
.status-starting-soon {
  color: var(--warning, #f57c00);
  font-weight: 600;
}


.not-posted {
  color: var(--outline);
  font-style: italic;
}

/* Capacity styling */
.capacity {
  font-weight: 500;
  color: var(--on-surface-variant);
  font-size: 0.85em; /* 85% of normal font size */
}

/* Tags section */
.tags-section {
  display: flex;
  flex-wrap: wrap;
  gap: var(--size-2);
}

/* Coverall link for clickable cards */
.talk-card .coverall {
  position: absolute;
  inset: 0;
  z-index: var(--layer-coverall);
  text-decoration: none;
  border-radius: inherit;
}

.talk-card .coverall:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Ensure interactive elements are above coverall */
.talk-card a:not(.coverall),
.talk-card button {
  position: relative;
  z-index: calc(var(--layer-coverall) + 1);
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .talk-card {
    padding: var(--size-3);
    max-width: none;
  }
  
  .talk-details-grid {
    margin-block: var(--size-2);
  }
  
  .talk-grid-item {
    gap: var(--size-1);
    min-height: 2.5rem;
    padding: var(--size-2);
  }
  
  .talk-grid-item svg {
    width: 14px;
    height: 14px;
  }
  
  .grid-item-content {
    font-size: var(--font-size-body-small);
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .talk-card {
    border: 2px solid var(--outline);
  }
  
  .talk-details-grid {
    border: 2px solid var(--outline);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .talk-card {
    transition: none;
  }
  
  .talk-card.hoverable:hover {
    transform: none;
  }
}