/* General styles */
body {
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

/* Home styles */
.home {
  padding-top: 20px;
  padding-bottom: 20px;
  box-sizing: border-box;
}

.home-item {
  margin-bottom: 20px;
}

/* Card styles */
.a-card {
  border-radius: 0;
  overflow: hidden;
}

.a-radio-group {
  margin-bottom: 6px;
  padding: 12px 0 0 16px;
  display: flex;
  flex-wrap: wrap;
}

.a-radio-button {
  margin-right: 4px;
  margin-bottom: 4px;
  border-radius: 4px;
  border: 1px solid #d9d9d9;
  min-width: 100px;
  text-align: center;
  padding: 6px;
  font-size: 13px;
  cursor: pointer;
}

.a-radio-button-checked {
  background: #1677ff;
  color: #fff;
  border-color: #1677ff;
}

.a-dropdown {
  position: relative;
  display: inline-block;
}

.a-row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -8px;
  margin-left: -8px;
}

.a-col {
  /* flex: 0 0 33.333333%;
  max-width: 33.333333%; */
  flex: 0 0 25%;
  max-width: 25%;
  padding-right: 8px;
  padding-left: 8px;
  box-sizing: border-box;
}

/* LiveHistory styles */
.history {
  overflow: hidden;
}

.history .desktop {
  display: none;
}

.history .game-title1,
.history .game-title2,
.history .game-title3,
.history .game-title4 {
  font-weight: bold;
  color: white;
  padding: 0.5rem;
  border-radius: 8px;
  font-size: 16px;
}

.history .game-title1 {
  background-color: #a6611a;
}

.history .game-title2 {
  background-color: teal;
}

.history .game-title3 {
  background-color: blue;
}

.history .game-title4 {
  background-color: darkmagenta;
}

/* CardHistory styles */

.menu-items {
  width: 100%;
  overflow-x: auto;
  display: flex;
  align-items: center;
  white-space: nowrap;
  gap: 8px;
}

.menu-item {
  height: 23px;
  padding: 3px 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 0.5px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.menu-item-active {
  height: 23px;
  padding: 3px 12px;
  display: flex;
  align-items: center;
  background: #1677ff;
  color: white;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

.item-check {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  border: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.item-check svg {
  display: none;
}

.item-check-active {
  width: 13px;
  height: 13px;
  border-radius: 2px;
  border: 1px solid #1677ff;
  background-color: #1677ff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 6px;
}

.item-check-active svg {
  display: block;
}

.filter-item {
  display: flex;
  align-items: center;
  padding-right: 6px;
  margin-top: 4px;
  border-radius: 4px;
  cursor: pointer;
}

/* Filter items container */
.filter-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
  position: relative;
  z-index: 1; /* Lower than the dropdown */
}

/* Table styles */
table.table-history {
  width: 100%;
  border-collapse: collapse;
}

table.table-history thead {
  background: #015caa;
  color: white;
}

table.table-history th,
table.table-history td {
  text-align: center;
  border: 1px solid #b6b6b6;
  padding: 3px;
}

table.table-history tr:nth-child(even) {
  background: #fafafa;
}

.table-history .date-item {
  font-size: 0.9rem;
}

.table-history .ball-item {
  font-size: 0.9rem;
  font-weight: bold;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  margin: 0px auto;
  display: flex;
  justify-content: center;
  align-items: center;
  background-position: center;
  background-size: cover;
}
.table-history .ball-item span {
  margin-top: -4px;
}

.ball-item--label {
  text-align: center;
  font-size: 12px;
}

/* Colors */
.text-red {
  color: red;
}

.text-blue {
  color: blue;
}

.text-green {
  color: green;
}

.opacity-disable {
  opacity: 0.2;
}

.opacity-enable {
  opacity: 1;
}

/* Game-specific table headers */
.history-1 table.table-history thead {
  background-color: #a6611a;
}

.history-2 table.table-history thead {
  background-color: teal;
}

.history-3 table.table-history thead {
  background-color: blue;
}

.history-4 table.table-history thead {
  background-color: darkmagenta;
}

/* Spacer */
.spacer {
  height: 64px;
}

/* Pagination styles */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  padding: 10px 0;
  border-top: 1px solid #eee;
}

.pagination-btn {
  background-color: #f0f0f0;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
  background-color: #1677ff;
  color: white;
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  margin: 0 15px;
  font-size: 14px;
  color: #666;
}

/* Year dropdown styles */
.year-dropdown {
  margin-left: auto;
  position: relative;
  display: inline-block;
  z-index: 1000; /* Even higher z-index value */
}

.year-dropdown-content {
  position: fixed; /* Change to fixed position so it doesn't scroll with content */
  display: none;
  background-color: #f9f9f9;
  min-width: 76px;
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
  z-index: 1001; /* Higher z-index to ensure it's above everything */
  border-radius: 4px;
  margin-top: 2px;
}

.year-dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: center;
}

.year-dropdown-content a:hover {
  background-color: #f1f1f1;
}

/* Remove hover display rule and handle via JS instead */
.year-dropdown-active .year-dropdown-content {
  display: block;
}

.year-dropdown .menu-item span:after {
  padding-left: 5px;
  content: "▼";
  font-size: 10px;
  vertical-align: middle;
  display: inline-block;
}

/* Year select dropdown styles */
.year-select {
  height: 29px;
  padding: 3px 25px 3px 12px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border: 0.5px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  background-color: #fff;
  margin-left: auto;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='5'><path d='M0 0 L10 0 L5 5 Z' fill='%23333'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.year-select:focus {
  outline: none;
  border-color: #1677ff;
}

/* Responsive layout for mobile and tablet */
@media screen and (max-width: 1023px) {
  .a-col {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .a-col:not(.active-col) {
    display: none;
  }

  .section-switcher {
    display: flex;
    justify-content: start;
    margin-bottom: 15px;
    gap: 5px;
  }

  .section-button {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.3s ease;
  }

  .section-button.active {
    background-color: #1677ff;
    color: white;
    border-color: #1677ff;
  }
}

@media screen and (min-width: 1024px) {
  .section-switcher {
    display: none;
  }
}
