/**
 * Country Picker Integration CSS for Argentina V2 Theme
 * Bootstrap 5 Compatible
 */

/* Navigation integration container - positioned next to CONTACTO button */
.country-picker-navigation {
  display: flex;
  align-items: center;
  padding: 0;
  margin-left: 1rem; /* Bootstrap 5 spacing */
}

/* Ensure proper alignment with navigation menu items */
.navbar-collapse .country-picker-navigation {
  align-self: center;
}

/* Bootstrap 5 compatible dropdown styles */
.simple-country-dropdown {
  position: relative;
  display: inline-block;
}

.simple-country-btn {
  background: var(--bs-secondary, #6c757d);
  border: 1px solid var(--bs-secondary, #6c757d);
  border-radius: var(--bs-border-radius, 0.375rem);
  padding: 0.375rem 0.75rem;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  transition: all 0.15s ease-in-out;
  min-width: 70px;
  text-decoration: none;
}

.simple-country-btn:hover {
  background: var(--bs-secondary-hover, #5c636a);
  border-color: var(--bs-secondary-hover, #5c636a);
  color: #fff;
  text-decoration: none;
}

.simple-country-btn.open .dropdown-arrow {
  transform: rotate(180deg);
}

.simple-country-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  z-index: 999999;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 4px;
  min-width: 250px;
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.simple-country-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #eee;
  gap: 8px;
}

.simple-country-item:hover {
  background: #f8f9fa;
  border-left: 3px solid #007bff;
  padding-left: 9px;
}

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

.country-flag, .small-flag {
  width: 18px;
  height: 13px;
  object-fit: cover;
  border-radius: 2px;
}

.country-code, .country-code-small {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  color: #666;
}

.country-name {
  color: #333;
  font-weight: 500;
}

.dropdown-arrow {
  transition: transform 0.3s ease;
  margin-left: auto;
}

/* Integration with Argentina V2 theme styles */
.navbar .country-picker-navigation {
  position: relative;
  z-index: 1000;
}

.mega-menu .country-picker-navigation {
  position: absolute;
  top: 10px;
  right: 20px;
}

/* Bootstrap 5 compatibility */
.country-picker-navigation .btn {
  border: none;
  background: transparent;
}

.country-picker-navigation .dropdown-menu {
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Mobile responsiveness for Argentina V2 */
@media (max-width: 991.98px) {
  .country-picker-navigation {
    margin-top: 1rem;
    margin-left: 0;
    justify-content: center;
    width: 100%;
  }
  
  .simple-country-btn {
    padding: 0.5rem 0.75rem;
    min-width: 80px;
    font-size: 0.875rem;
  }
  
  .simple-country-list {
    min-width: 200px;
    left: 50%;
    transform: translateX(-50%);
  }
}

@media (max-width: 576px) {
  .country-picker-navigation {
    top: 10px;
    right: 15px;
  }
  
  .simple-country-btn {
    padding: 5px 8px;
    min-width: 50px;
    font-size: 10px;
  }
}

/* Argentina V2 specific styling adjustments */
.main-header .country-picker-navigation {
  margin-left: 20px;
}

.main-header .simple-country-btn {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.4);
}

.main-header .simple-country-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Integration with mega menu */
.tb-megamenu .country-picker-navigation {
  position: relative;
  margin-left: auto;
}

/* Ensure proper stacking with other navigation elements */
.country-picker-navigation {
  flex-shrink: 0;
}
