
/* ==========================================
   T20Sim - World League Team Picker
   Used on signup.php and account.php
   ========================================== */

/* Hide the original select only after
   JavaScript has built the custom picker */
.world-league-select.wlp-ready {
  display: none;
}

/* Main picker container */
.wlp {
  position: relative;
  width: 100%;
  font-family: inherit;
}

/* Main selection button */
.wlp-trigger {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 54px;
  gap: 12px;
  padding: 10px 15px;
  background: #172235;
  color: #ffffff;
  border: 1px solid rgba(150, 160, 180, 0.35);
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: border-color .2s, box-shadow .2s;
}

.wlp-trigger:hover {
  border-color: #f2c200;
}

.wlp-trigger:focus-visible {
  outline: none;
  border-color: #f2c200;
  box-shadow: 0 0 0 3px rgba(242, 194, 0, .18);
}

/* Team logo */
.wlp-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

/* Selected team name */
.wlp-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Gold dropdown arrow */
.wlp-arrow {
  width: 10px;
  height: 10px;
  flex-shrink: 0;
  border-right: 2px solid #f2c200;
  border-bottom: 2px solid #f2c200;
  transform: rotate(45deg);
  margin-right: 5px;
  margin-top: -5px;
  transition: transform .2s;
}

.wlp.open .wlp-arrow {
  transform: rotate(225deg);
  margin-top: 5px;
}

/* Dropdown panel */
.wlp-panel {
  display: none;
  position: absolute;
  z-index: 9999;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  padding: 10px;
  background: #172235;
  border: 1px solid rgba(242, 194, 0, .35);
  border-radius: 12px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, .4);
}

.wlp.open .wlp-panel {
  display: block;
}

/* Search box */
.wlp-search {
  box-sizing: border-box;
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  margin: 0 0 10px;
  background: #0e1829;
  color: #ffffff;
  border: 1px solid rgba(150, 160, 180, .35);
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
}

.wlp-search:focus {
  outline: none;
  border-color: #f2c200;
}

.wlp-search::placeholder {
  color: #aab4c4;
}

/* Scrollable team list */
.wlp-list {
  max-height: 300px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Individual team option */
.wlp-option {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  gap: 12px;
  padding: 9px 12px;
  margin: 0;
  background: transparent;
  color: #ffffff;
  border: 0;
  border-radius: 8px;
  font: inherit;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.wlp-option:hover,
.wlp-option:focus-visible {
  background: rgba(242, 194, 0, .12);
  outline: none;
}

.wlp-option.selected {
  background: rgba(242, 194, 0, .18);
  color: #f2c200;
  font-weight: 700;
}

.wlp-option .wlp-logo {
  width: 36px;
  height: 36px;
}

/* Message when search finds nothing */
.wlp-empty {
  display: none;
  padding: 15px;
  text-align: center;
  color: #aab4c4;
  font-size: 14px;
}

/* Scrollbar */
.wlp-list::-webkit-scrollbar {
  width: 7px;
}

.wlp-list::-webkit-scrollbar-thumb {
  background: #46536a;
  border-radius: 8px;
}

/* Mobile */
@media (max-width: 600px) {
  .wlp-trigger {
    min-height: 50px;
    padding: 8px 12px;
  }

  .wlp-panel {
    padding: 8px;
  }

  .wlp-list {
    max-height: 250px;
  }

  .wlp-logo {
    width: 32px;
    height: 32px;
  }
}
