/* Currency Selector - Full Width Under Input Field */

.currency-selector-wrapper {
  position: absolute !important;
  top: calc(100% - 1px) !important; /* Точное соединение без зазора (минус 1px для перекрытия границы) */
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 10000 !important;
  overflow: visible !important;
  display: none !important;
  visibility: hidden !important;
  margin-top: 0 !important;
  pointer-events: none !important;
  transform: translateY(-10px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

.currency-selector-wrapper.active {
  display: block !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  pointer-events: auto !important;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Dropdown Styles - тёмная тема */
.currency-dropdown {
  position: relative !important;
  width: 100% !important;
  max-height: 500px !important;
  min-height: 100px !important;
  /* Тёмный фон */
  background: rgba(15, 15, 25, 0.95) !important;
  backdrop-filter: blur(50px) !important;
  -webkit-backdrop-filter: blur(50px) !important;
  /* Скругление только снизу - продолжение окна суммы */
  border-radius: 0 0 var(--radius-md) var(--radius-md) !important;
  /* Тени */
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3) !important;
  /* Границы */
  border: none !important;
  border-left: 1px solid rgba(102, 126, 234, 0.25) !important;
  border-right: 1px solid rgba(102, 126, 234, 0.25) !important;
  border-bottom: 1px solid rgba(102, 126, 234, 0.25) !important;
  /* Убираем верхнюю границу для полного соединения */
  border-top: none !important;
  display: none !important;
  flex-direction: column;
  overflow: hidden;
  z-index: 10001 !important;
  visibility: hidden !important;
  transform: translateY(-10px) scale(0.98);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  opacity: 1 !important;
}

.currency-dropdown.active {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  min-height: 100px !important;
  z-index: 10001 !important;
  transform: translateY(0) scale(1) !important;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
  /* Тёмные тени */
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 8px 24px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(102, 126, 234, 0.1) !important;
}

.currency-dropdown-search {
  display: none; /* Поиск теперь в поле суммы */
}

.currency-dropdown-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px 12px 12px;
  max-height: 400px;
  /* Улучшенная стилизация скроллбара */
  scrollbar-width: thin;
  scrollbar-color: rgba(102, 126, 234, 0.5) rgba(255, 255, 255, 0.05);
}

.currency-section {
  margin-bottom: 16px;
}

.currency-section-title {
  padding: 8px 14px;
  font-size: 0.7rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
  background: rgba(102, 126, 234, 0.15);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 10px;
  margin-bottom: 10px;
  border: 1px solid rgba(102, 126, 234, 0.2);
  box-shadow: none;
}

.currency-dropdown-item {
  padding: 10px 14px;
  /* Тёмный фон */
  background: rgba(25, 25, 40, 0.8) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
  border: 1px solid rgba(102, 126, 234, 0.15);
  box-shadow: none;
  position: relative;
  overflow: hidden;
}

/* Эффект свечения при наведении */
.currency-dropdown-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(102, 126, 234, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.currency-dropdown-item:hover::before {
  left: 100%;
}

.currency-dropdown-item:hover {
  background: rgba(102, 126, 234, 0.2) !important;
  backdrop-filter: blur(25px) !important;
  -webkit-backdrop-filter: blur(25px) !important;
  transform: translateX(6px) scale(1.02);
  border-color: rgba(102, 126, 234, 0.4);
  box-shadow: 0 0 15px rgba(102, 126, 234, 0.2);
}

.currency-dropdown-item:active {
  background: rgba(102, 126, 234, 0.3) !important;
  transform: translateX(4px) scale(0.99);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
}

.currency-item-logo {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-item-logo::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.3), rgba(118, 75, 162, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-logo::before {
  opacity: 1;
}

.currency-item-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(30, 30, 50, 0.8);
  padding: 3px;
  border: 2px solid rgba(102, 126, 234, 0.2);
  position: relative;
  z-index: 1;
  box-shadow: none;
  transition: all 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-logo img {
  transform: scale(1.1);
  box-shadow: 0 0 10px rgba(102, 126, 234, 0.3);
  border-color: rgba(102, 126, 234, 0.5);
}

.currency-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.currency-item-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.98);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  transition: color 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-name {
  color: rgba(255, 255, 255, 1);
  text-shadow: 0 0 8px rgba(102, 126, 234, 0.5);
}

.currency-item-code {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
}

.currency-dropdown-item:hover .currency-item-code {
  color: rgba(102, 126, 234, 0.9);
}

.no-results {
  text-align: center;
  padding: 48px 24px;
  color: rgba(255, 255, 255, 0.6);
}

.no-results p {
  margin: 8px 0;
  font-size: var(--font-size-base);
}

/* Scrollbar Styling */
.currency-dropdown-list::-webkit-scrollbar {
  width: 8px;
}

.currency-dropdown-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 4px;
  margin: 8px 0;
}

.currency-dropdown-list::-webkit-scrollbar-thumb {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.6), rgba(118, 75, 162, 0.6));
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.currency-dropdown-list::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(135deg, rgba(102, 126, 234, 0.8), rgba(118, 75, 162, 0.8));
  box-shadow: 0 0 8px rgba(102, 126, 234, 0.4);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .currency-dropdown {
    max-height: 400px;
  }
  
  .currency-dropdown-list {
    max-height: 380px;
    padding: 10px;
  }
}
