/* Existing styles */

/* Reset some default styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Body styling */
body {
  font-family: Arial, sans-serif;
  background-color: #f4f4f9;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px;
}

code {
  font-family: Consolas, monospace;
  color: chocolate;
}

/* Container for search input and button */
.search-container {
  display: flex;
  width: 100%;
  max-width: 600px;
  margin-bottom: 20px;
}

#search {
  flex: 1;
  padding: 10px 15px;
  border: 1px solid #ccc;
  border-radius: 4px 0 0 4px;
  font-size: 16px;
}

#search:focus {
  outline: none;
  border-color: #007BFF;
}

/* Search button styling */
#search-btn {
  padding: 10px 20px;
  border: none;
  background-color: #007BFF;
  color: white;
  font-size: 16px;
  border-radius: 0 4px 4px 0;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

#search-btn:hover {
  background-color: #0056b3;
}

/* Controls Container */
/* buttons are in row */
.controls-container {
  display: flex;
  flex-flow: row wrap;
  gap: 30px;
  max-width: 600px;
  justify-content: space-between;
  flex-wrap: wrap;
  /* Allow wrapping on smaller screens */
}
.wrapper {
  display: flex;
  flex-direction: row;
  gap: 10px;
}

.toggle-btn {
  padding: 10px 20px;
  border: none;
  background-color: #28A745;
  color: white;
  font-size: 16px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-bottom: 10px;
  /* Space below on small screens */
}

.toggle-btn:hover {
  background-color: #218838;
}

/* Toggle Switch Styling */
.toggle-switch {
  position: relative;
  display: flex;
  align-items: center;
  width: 60px;
  height: 34px;
  margin-bottom: 10px;
  /* Space below on small screens */
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}


/* Main Content Container */
.main-content {
  display: flex;
  width: 100%;
  max-width: 1600px;
  margin-top: 20px;
  gap: 20px;
  flex-direction: row;
  flex-wrap: wrap;
}

/* Tournaments List */
.tournaments-list {
  flex: 1;
  width: 200px;
  min-width: 400px;
  overflow-y: auto;
  /* Adjust as needed */
}

/* Map Container */
.map-container {
  flex: 1;
  height: 60vw;
  width: 100%;
  min-width: 300px;
  min-height: 300px;
  max-height: 600px;
  position: relative;
}


/* Tournament Card */
.tournament {
  background-color: white;
  padding: 15px 20px;
  margin-bottom: 15px;
  border-radius: 6px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tournament.archive {
  background-color: #e8e9ea;
}

.tournament:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Tournament title */
.tournament p {
  font-size: 18px;
  margin-bottom: 8px;
}

.tournament a {
  text-decoration: none;
  color: #007BFF;
}

.tournament a:hover {
  text-decoration: underline;
}

/* Tournament details */
.tournament small {
  color: #666;
}

/* Manual Section */
.manual-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.manual-btn {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 10px;
}

.manual-btn:hover {
  background-color: #0056b3;
}

/* Collapsible Manual Content */
.manual-content {
  display: block;
  transition: all 0.3s ease-in-out;
}

.manual-content-hidden {
  display: none;
}

.manual-content h2,
.manual-content h3 {
  color: #007bff;
}

.manual-content p {
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
}

.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
  background-color: rgba(0, 0, 0, 0.25);
  border-radius: 22px;
  transition: all 0.3s;
}

.switch::after {
  content: '';
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 22px;
  background-color: white;
  top: 1px;
  left: 1px;
  transition: all 0.3s;
}

input[type='checkbox']:checked + .switch::after {
  transform: translateX(22px);
}

input[type='checkbox']:checked + .switch {
  background-color: #28A745;
}

.offscreen {
  position: absolute;
  left: -9999px;
}
