/**
 * Waiting Players Dialog Styles
 * Used when multiple non-premium players attempt to join a premium room
 * Shows Game Master a list of all waiting players with individual controls
 */

.waiting-players-dialog {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.waiting-players-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
}

.waiting-players-content {
  position: relative;
  background: white;
  border-radius: 12px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.waiting-players-content h2 {
  margin: 0 0 10px 0;
  color: #5bc0de;
  font-size: 24px;
  text-align: center;
}

.waiting-players-content > p {
  margin: 0 0 20px 0;
  color: #666;
  text-align: center;
  font-size: 14px;
}

.waiting-players-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
  max-height: 400px;
  overflow-y: auto;
  padding-right: 5px;
}

/* Scrollbar styling for the list */
.waiting-players-list::-webkit-scrollbar {
  width: 8px;
}

.waiting-players-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.waiting-players-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

.waiting-players-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.waiting-player-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 2px solid #5bc0de;
  border-radius: 8px;
  background: #f8f9fa;
  transition: all 0.2s ease;
}

.waiting-player-card:hover {
  border-color: #46b8da;
  background: #e8f4f8;
}

.player-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.player-name {
  font-weight: bold;
  font-size: 16px;
  color: #333;
}

.player-timer {
  color: #666;
  font-size: 14px;
  font-family: 'Courier New', monospace;
}

.stop-waiting-btn {
  background: #d9534f;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  font-weight: bold;
  transition: all 0.2s ease;
  white-space: nowrap;
  margin-left: 15px;
}

.stop-waiting-btn:hover {
  background: #c9302c;
  transform: scale(1.05);
}

.stop-waiting-btn:active {
  transform: scale(0.98);
}

.stop-all-btn {
  width: 100%;
  margin-top: 20px;
  background: #f0ad4e;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 5px;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.stop-all-btn:hover {
  background: #ec971f;
  transform: scale(1.02);
}

.stop-all-btn:active {
  transform: scale(0.98);
}

/* Empty state */
.waiting-players-empty {
  text-align: center;
  padding: 40px 20px;
  color: #999;
  font-style: italic;
}

/* Animation for new players */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.waiting-player-card {
  animation: slideIn 0.3s ease;
}

/* Responsive design */
@media (max-width: 600px) {
  .waiting-players-content {
    padding: 20px;
    width: 95%;
  }

  .waiting-player-card {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .stop-waiting-btn {
    margin-left: 0;
    width: 100%;
  }

  .player-name {
    font-size: 14px;
  }

  .player-timer {
    font-size: 12px;
  }
}
