/* ===========================================
  COUNTRY SELECT - Dropdown custom (bandera + buscador)
=========================================== */

.datos-country {
  position: relative;
}

.datos-country-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  height: 48px;
  padding: 0 0.875rem;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.625rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.9375rem;
  color: var(--gris-oscuro);
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.datos-country-btn:hover {
  border-color: rgba(0, 0, 0, 0.2);
}

.datos-country-btn:focus,
.datos-country--open .datos-country-btn {
  outline: none;
  border-color: var(--p-morado);
  box-shadow: 0 0 0 3px rgba(117, 102, 219, 0.12);
}

.datos-country-flag {
  flex-shrink: 0;
  width: 22px;
  height: 15px;
  object-fit: cover;
  border-radius: 2px;
}

.datos-country-flag-emoji {
  flex-shrink: 0;
  font-size: 1.125rem;
  line-height: 1;
  width: 22px;
  text-align: center;
}

.datos-country-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 500;
}

.datos-country-label--placeholder {
  color: #94a3b8;
}

.datos-country-chevron {
  flex-shrink: 0;
  color: var(--gris);
  transition: transform 0.2s ease;
}

.datos-country--open .datos-country-chevron {
  transform: rotate(180deg);
}

.datos-country-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 50;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.1);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
  overflow: hidden;
}

.datos-country-search-wrapper {
  padding: 0.625rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.07);
}

.datos-country-search {
  width: 100%;
  padding: 0.5rem 0.625rem;
  border: 1.5px solid rgba(0, 0, 0, 0.12);
  border-radius: 0.5rem;
  font-family: 'Montserrat', sans-serif;
  font-size: 0.875rem;
  color: var(--gris-oscuro);
  outline: none;
  transition: border-color 0.2s ease;
}

.datos-country-search:focus {
  border-color: var(--p-morado);
}

.datos-country-list {
  list-style: none;
  margin: 0;
  padding: 0.375rem 0;
  max-height: 240px;
  overflow-y: auto;
}

.datos-country-option {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.datos-country-option:hover,
.datos-country-option--selected {
  background: rgba(117, 102, 219, 0.08);
}

.datos-country-option-name {
  flex: 1;
  font-size: 0.875rem;
  color: var(--gris-oscuro);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.datos-country-option-code {
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--gris);
}

.datos-country-no-results {
  padding: 0.75rem 0.875rem;
  font-size: 0.875rem;
  color: var(--gris);
  text-align: center;
}

.datos-hidden-field,
.datos-hidden-fields {
  display: none !important;
}
