/* Overrides: badge sizing and feature highlights responsive layout */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: auto;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap; /* keep badge compact with its content */
}

/* When .badge is inside a column flex container it may stretch; ensure it sizes to content */
.badge { align-self: flex-start; max-width: none; }

.feature-highlights {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap; /* allow items to wrap neatly on narrow widths */
  margin: 0.9rem 0 0 0;
  padding: 0;
  list-style: none;
}

.feature-highlights li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex: 0 0 auto; /* size to content by default */
}

@media (max-width: 520px) {
  .feature-highlights {
    flex-direction: column; /* stack items on small screens */
    align-items: flex-start;
    gap: 0.5rem;
  }

  .feature-highlights li {
    width: 100%;
  }

  .badge {
    white-space: normal; /* allow wrapping if badge text is very long on tiny screens */
  }
}

/* Meeting sidebar tweaks */
.sidebar-card .meeting-range,
.sidebar-card .meeting-time {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* add space between the section divider under "افراد حاضر" and the first participant */
.participant-list { margin-top: 8px; }

@media (max-width: 768px) {
  .meeting-shell,
  .meeting-main,
  .meeting-sidebar,
  .grid-card,
  .grid-scroll {
    min-width: 0;
  }

  .meeting-shell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-inline: 0;
  }

  .meeting-main {
    order: 2;
  }

  .meeting-sidebar {
    order: 1;
  }

  .meeting-main .card,
  .meeting-sidebar .sidebar-card {
    margin-inline: 0;
  }

  .topbar {
    width: 100vw;
    max-width: 100vw;
    margin-inline: calc(50% - 50vw);
    padding-inline: 12px;
  }

  .page-wrap {
    padding-inline: 12px;
  }
}

/* Participant block visibility: desktop vs mobile */
.participant-card-desktop { display: block; }
.participant-card-mobile { display: none; }

@media (max-width: 768px) {
  .participant-card-desktop { display: none; }
  .participant-card-mobile { display: block; }
}

@media (max-width: 480px) {
  .topbar {
    padding-inline: 10px;
  }

  .page-wrap {
    padding-inline: 10px;
  }
}
