/**
 * Estilos modernos para seletor de país
 * Compatível com o tema azul (#2c578a) e branco
 */

/* Container principal do seletor de país */
.country-selector-container {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
}

/* Estilo do label */
.country-selector-label {
  display: flex;
  align-items: center;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #2c578a;
}

.country-selector-label i {
  margin-right: 0.5rem;
  color: #2c578a;
}

/* Estilização do select personalizado */
.country-select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  width: 100%;
  padding: 12px 15px;
  padding-right: 40px;
  background-color: #2c578a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 16px;
}

.country-select:hover {
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.country-select:focus {
  outline: none;
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* Estilização das opções */
.country-select option {
  background-color: #2c578a;
  color: #ffffff;
  padding: 10px;
}

/* Versão com bandeiras */
.country-select-with-flags {
  position: relative;
}

.country-flag {
  width: 24px;
  height: 16px;
  margin-right: 10px;
  vertical-align: middle;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

/* Estilo para o seletor com ícone de globo */
.country-selector-with-icon {
  position: relative;
}

.country-selector-with-icon::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'%3E%3C/circle%3E%3Cline x1='2' y1='12' x2='22' y2='12'%3E%3C/line%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'%3E%3C/path%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  z-index: 1;
}

.country-selector-with-icon .country-select {
  padding-left: 45px;
}

/* Estilo para o seletor com pesquisa */
.country-searchable-container {
  position: relative;
}

.country-search-input {
  width: 100%;
  padding: 12px 15px;
  padding-left: 40px;
  background-color: #2c578a;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px 8px 0 0;
  font-size: 1rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 15px center;
  background-size: 16px;
}

.country-search-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.country-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 250px;
  overflow-y: auto;
  background-color: #2c578a;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: none;
  border-radius: 0 0 8px 8px;
  z-index: 10;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.5) rgba(44, 87, 138, 0.8);
}

.country-dropdown::-webkit-scrollbar {
  width: 6px;
}

.country-dropdown::-webkit-scrollbar-track {
  background: rgba(44, 87, 138, 0.8);
}

.country-dropdown::-webkit-scrollbar-thumb {
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 3px;
}

.country-option {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  color: #ffffff;
}

.country-option:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.country-option.selected {
  background-color: rgba(255, 255, 255, 0.2);
}

.country-option-flag {
  width: 24px;
  height: 16px;
  margin-right: 10px;
  border-radius: 2px;
  box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
}

.country-option-name {
  flex-grow: 1;
}

.country-option-code {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
}

/* Animações */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.country-dropdown {
  animation: fadeIn 0.3s ease;
}

/* Responsividade */
@media (max-width: 768px) {
  .country-select {
    padding: 10px 12px;
    padding-right: 35px;
    font-size: 0.95rem;
  }
  
  .country-option {
    padding: 8px 12px;
  }
}

/* Exemplo de uso com HTML personalizado */
/*
<div class="country-selector-container">
  <label class="country-selector-label">
    <i class="fas fa-globe-americas"></i>
    <span>País</span>
  </label>
  <div class="country-selector-with-icon">
    <select class="country-select">
      <option value="" disabled selected>Selecione seu país</option>
      <option value="BR">Brasil</option>
      <option value="PT">Portugal</option>
      <option value="US">Estados Unidos</option>
      <option value="CA">Canadá</option>
      <option value="ES">Espanha</option>
      <option value="FR">França</option>
      <option value="IT">Itália</option>
      <option value="DE">Alemanha</option>
      <option value="JP">Japão</option>
      <option value="CN">China</option>
    </select>
  </div>
</div>
*/
