.handicap-search-module {
  position: relative;
  width: 100%;
  max-width: 520px;
}

.handicap-search-module input[type="search"] {
  width: 100%;
  padding: 14px 20px 14px 48px;
  font-size: 16px;
  font-family: inherit;
  color: #263238;
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  outline: none;
  background-color: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239e9e9e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 16px center;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
}

.handicap-search-module input[type="search"]:focus {
  border-color: #1565c0;
  box-shadow: 0 0 0 4px rgba(21, 101, 192, 0.12);
}

.handicap-search-module input[type="search"]::placeholder {
  color: #9e9e9e;
}

.handicap-search-module input[type="search"]::-webkit-search-cancel-button,
.handicap-search-module input[type="search"]::-webkit-search-decoration {
  -webkit-appearance: none;
}

/* Dropdown  */

.handicap-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 999999;
  max-height: 450px;
  overflow-y: auto;
  display: none;
  font-family: inherit;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}

.handicap-dropdown[style*="display: block"] {
  animation: hb-fade-in 0.12s ease-out;
}

@keyframes hb-fade-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0);    }
}

/* Items */

.hb-item {
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  transition: background-color 0.15s ease;
}

.hb-item:last-child {
  border-bottom: none;
}

.hb-item:hover,
.hb-item.hb-selected {
  background-color: #f0f4fa;
}

/* Info principal */

.hb-info {
  flex: 1;
  min-width: 0;
}

.hb-name {
  font-weight: 700;
  font-size: 15px;
  color: #263238;
  margin-bottom: 4px;
  line-height: 1.3;
  white-space: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hb-name mark {
  background: #fff59d;
  color: #000;
  font-weight: 600;
  padding: 0 1px;
  border-radius: 1px;
}

.hb-meta {
  font-size: 12px;
  color: #546e7a;
  line-height: 1.4;
  margin-bottom: 2px;
}

.hb-licence {
  color: #1565c0;
  font-weight: 600;
}

.hb-federation {
  color: #546e7a;
}

.hb-club {
  font-size: 12px;
  color: #78909c;
  white-space: wrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 6px;
}

/* Badges row */

.hb-badges-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.hb-badge {
  display: inline-block;
  font-size: 10px;
  color: #fff;
  border-radius: 3px;
  padding: 2px 6px;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.3px;
}

.hb-badge.hb-amateur {
  background: #424242;
}

.hb-badge.hb-pro {
  background: #1565c0;
}

.hb-badge.hb-category {
  background: #eceff1;
  color: #455a64;
}

.hb-updated {
  font-size: 11px;
  color: #9e9e9e;
  font-style: italic;
}

/* Handicap circle */

.hb-handicap-wrap {
  text-align: center;
  flex-shrink: 0;
  padding-top: 2px;
}

.hb-handicap-circle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #102a43;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: -0.5px;
}

.hb-handicap-circle.hb-no-handicap {
  background: #eceff1;
  color: #78909c;
  font-size: 13px;
  font-weight: 700;
}

.hb-handicap-label {
  font-size: 10px;
  color: #78909c;
  margin-top: 5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* Estados  */

.hb-loading,
.hb-empty,
.hb-error {
  padding: 20px 16px;
  text-align: center;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
}

.hb-loading {
  color: #78909c;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.hb-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid #e0e0e0;
  border-top-color: #1565c0;
  border-radius: 50%;
  animation: hb-spin 0.65s linear infinite;
}

@keyframes hb-spin {
  to { transform: rotate(360deg); }
}

.hb-empty {
  color: #9e9e9e;
}

.hb-error {
  color: #c62828;
}

/* Responsive */

@media (max-width: 480px) {
  .handicap-search-module input[type="search"] {
    font-size: 16px;
    padding: 13px 16px 13px 44px;
    background-position: 14px center;
  }

  .hb-item {
    padding: 12px 14px;
    gap: 10px;
  }

  .hb-handicap-circle {
    width: 44px;
    height: 44px;
    font-size: 13px;
  }

  .hb-name {
    font-size: 14px;
  }

  .hb-updated {
    font-size: 10px;
  }
}