@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap");

.live-stream-wrapper {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  background-color: #f8f9fa; /* A very light neutral background */
  padding: 2rem 1.5rem; /* Add horizontal padding */
  text-align: center;
  width: 100%; /* Take full width */
  margin: 2rem 0; /* Margin top and bottom, no horizontal margin */
  box-sizing: border-box; /* Ensure padding is included in the width */
  border-radius: 12px;
}

.live-stream-wrapper h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #2d2d2d; /* Secondary Color */
  margin-bottom: 0.5rem;
  margin-top: 0;
}

.live-stream-wrapper p {
  color: #484848; /* Text Color */
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
  max-width: 600px; /* Keep text lines from becoming too long */
  margin-left: auto;
  margin-right: auto;
}

/* Stream Choice Buttons */
.stream-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.stream-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
  background-color: #4cadc5; /* Primary Color */
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stream-button:hover {
  background-color: #34495e; /* Accent Color on hover */
  transform: translateY(-2px);
}

.stream-button svg {
  fill: #ffffff;
}

/* Player and Loader */
#stream-player-wrapper {
  position: relative;
  min-height: 200px;
  max-width: 800px; /* Set a max-width for the video player for large screens */
  margin: 0 auto;
}

#stream-player iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
}

.stream-loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #4cadc5; /* Primary Color */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 4rem auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Cancel/Switch Button */
.cancel-button {
  display: none; /* Hidden by default */
  margin: 0 auto 1rem;
  padding: 0.5rem 1rem;
  border: 1px solid #dcdfe3;
  background-color: #f0f2f5;
  color: #34495e; /* Accent Color */
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.2s ease;
}

.cancel-button:hover {
  background-color: #e4e6eb;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
  .live-stream-wrapper {
    padding: 1.5rem 1rem;
  }

  .live-stream-wrapper h2 {
    font-size: 1.8rem;
  }

  .stream-buttons {
    flex-direction: column;
    align-items: stretch;
  }
}
