/* ========== CLUB CHECKBOX LIST ========== */
.club-checkbox-list,
.friend-checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  padding: 8px 3px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  box-shadow: inset 0 0 5px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
  color: white;
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  margin-bottom: 16px;
}

.friend-checkbox-list {
  height: 150px;
}

.club-checkbox-list {
  height: 300px;
}

.club-checkbox-checkbox,
.friend-checkbox-checkbox {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 4px 6px;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  border-radius: 6px;
  transition: background 0.2s;
  margin: 2px;
}

.club-checkbox-checkbox:hover,
.friend-checkbox-checkbox:hover {
  background: rgba(255, 255, 255, 0.05);
}

/* Unified custom checkbox */
.club-checkbox-checkbox input[type="checkbox"],
.friend-checkbox-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border: 1.5px solid #555;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  position: relative;
  transition: background 0.2s, border 0.2s;
  padding: 0;
  margin: 0;
}

.club-checkbox-checkbox input[type="checkbox"]:checked,
.friend-checkbox-checkbox input[type="checkbox"]:checked {
  background-color: #4caf50;
  border-color: #4caf50;
}

.club-checkbox-checkbox input[type="checkbox"]::after,
.friend-checkbox-checkbox input[type="checkbox"]::after {
  content: "";
  position: absolute;
  display: block;
  width: 3px;
  height: 6px;
  border: solid #fff;
  border-width: 0 1.5px 1.5px 0;
  top: 1.5px;
  left: 5px;
  transform: rotate(45deg) scale(0);
  transition: transform 0.2s ease-in-out;
}

.club-checkbox-checkbox input[type="checkbox"]:checked::after,
.friend-checkbox-checkbox input[type="checkbox"]:checked::after {
  transform: rotate(45deg) scale(1);
}

/* Label text styles */
.club-checkbox-name,
.friend-checkbox-name {
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f0f0f0;
  font-size: 14px;
  height: 15px;
}

.club-list-scroll {
  max-height: 300px;
  overflow-y: auto;
  padding: 3px;
  border-radius: 6px;
  margin-bottom: 0px;
}

.club-count {
  width: 100%;
  display: block;
  text-align: right;
  color: white;
  font-weight: bold;
  font-size: 14px;
  margin-bottom: 8px;
}

.clubs-error {
  color: red;
  font-size: 12px;
  margin-top: 4px;
  margin-bottom: 10px;
  align-self: flex-start;
  min-height: 18px;
}

.friend-list-error,
.clubs-list-error {
  color: #bbb;
  position: relative;
  font-size: 16px;
  font-weight: bold;
  position: absolute;
  top: 46%;
  left: 50%;
  margin-right: -50%;
  transform: translate(-50%, -50%)
}

.club-search {
  position: relative;
  margin-bottom: -18px;
  width: 100%;
}

.club-search input {
  border: 1px solid #ccc;
  border-radius: 6px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;


  height: 29px;
  padding: 6px 10px;
  width: 60%;
  font-size: 14px;
}

.club-search label {
  position: absolute;
  top: 45%;
  left: 5px;
  transform: translateY(-50%);
  color: #aaa;
  font-size: 14px;
  pointer-events: none;
  transition: 0.2s ease all;
  background: transparent;
  padding: 0 3px;
  line-height: 1;
}

.club-search input:focus+label,
.club-search input:not(:placeholder-shown):valid+label,
.club-search input:not(:focus):not(:placeholder-shown):not(:invalid)+label {
  top: -10px;
  /* ⬅️ Move label closer to input */
  left: 4px;
  font-size: 12px;
  /* ⬅️ Slightly smaller label text */
  color: white;
  /* background: rgba(0, 0, 0, 0.9); */
}

.club-search input:focus::placeholder {
  opacity: 0;
}

.club-search input:not(:placeholder-shown):valid::placeholder {
  opacity: 0;
}


/* Mobile */
@media (max-width: 480px) {

  .club-search {
    position: relative;
    margin-bottom: -18px;
    width: 100%;
  }

  .club-checkbox-list {
    height: 25vh;
    max-height: 300px;
    min-height: 180px;
  }

  .friend-checkbox-list {
    height: 90px;
  }


  .club-search input {
    margin-bottom: 2px;
    box-sizing: border-box;
    border-radius: 6px;
    font-size: 12px;
    width: 50%;
  }

  .club-search label {
    position: absolute;
    top: 46%;
    left: 5px;
    transform: translateY(-50%);
    font-size: 12px;
    pointer-events: none;
    transition: 0.2s ease all;
    padding: 0 3px;
    line-height: 1;
  }

  .club-checkbox-checkbox input[type="checkbox"],
  .friend-checkbox-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 14px;
    height: 14px;
    border: 1.5px solid #555;
    border-radius: 3px;
    background: #fff;
    cursor: pointer;
    position: relative;
    transition: background 0.2s, border 0.2s;
    padding: 0;
    margin: 0;
  }

  .club-checkbox-checkbox,
  .friend-checkbox-checkbox {
    font-size: 14px;
    /* or whatever you want */
    line-height: 1;
  }

  .club-checkbox-checkbox input[type="checkbox"]:checked,
  .friend-checkbox-checkbox input[type="checkbox"]:checked {
    background-color: #4caf50;
    border-color: #4caf50;
  }

  .club-checkbox-checkbox input[type="checkbox"]::after,
  .friend-checkbox-checkbox input[type="checkbox"]::after {
    content: "";
    position: absolute;
    display: block;
    width: 3px;
    height: 6px;
    border: solid #fff;
    border-width: 0 1.5px 1.5px 0;
    top: 2px;
    left: 4px;
    transform: rotate(45deg) scale(0);
    transition: transform 0.2s ease-in-out;
  }

  .club-checkbox-checkbox input[type="checkbox"]:checked::after,
  .friend-checkbox-checkbox input[type="checkbox"]:checked::after {
    transform: rotate(45deg) scale(1);
  }

  .club-checkbox-checkbox,
  .friend-checkbox-checkbox {
    gap: 6px;
    align-items: center;
  }

  .club input,
  .club-search input,
  .club-search button,
  .club-search select,
  .club-search textarea {
    font-size: 12px;
  }

  .friend-list-error,
  .clubs-list-error {
    font-size: 14px;
  }
}