/* 
Currency Selector Component Styles
Dropdown functionality for currency selection with CSS Variables Support
*/

/* Currency Selector Button */
.currency-selector,
.flutter-currency-selector {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 8px 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
  font-weight: 600;
  color: #721e2c;
  min-width: 80px;
  justify-content: center;
  user-select: none;
}

.currency-selector:hover,
.flutter-currency-selector:hover {
  background: #f8f9fa;
  border-color: #721e2c;
}

.currency-selector.open,
.flutter-currency-selector.open {
  background: #f8f9fa;
  border-color: #721e2c;
  box-shadow: 0 0 0 3px rgba(114, 30, 44, 0.1);
}

.currency-text,
.flutter-currency-text {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c1c1e;
}

.currency-symbol,
.flutter-currency-symbol {
  font-size: 0.9rem;
  font-weight: bold;
  color: #e91e63;
  min-width: 18px;
  text-align: left;
  flex-shrink: 0;
}

.dropdown-arrow,
.flutter-dropdown-arrow {
  font-size: 0.7rem;
  color: #8e8e93;
  transition: transform 0.2s ease;
  margin-left: 4px;
}

.currency-selector:hover .dropdown-arrow,
.flutter-currency-selector:hover .flutter-dropdown-arrow {
  color: #721e2c;
}

.currency-selector.open .dropdown-arrow,
.flutter-currency-selector.open .flutter-dropdown-arrow {
  transform: rotate(180deg);
  color: #721e2c;
}

/* Currency Dropdown Menu */
.currency-dropdown,
.currency-dropdown-content {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  position: fixed;
  z-index: 99999;
  overflow: hidden;
  min-width: 120px;
  max-width: 200px;
  animation: dropdownFadeIn 0.2s ease-out;
}

/* Currency Options */
.currency-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #f2f2f7;
  justify-content: flex-start;
}

.currency-option:last-child {
  border-bottom: none;
}

.currency-option:hover {
  background: #f8f9fa;
  cursor: pointer;
}

.currency-option.selected {
  background: rgba(114, 30, 44, 0.1);
  color: #721e2c;
}

.currency-option.selected .currency-symbol {
  color: #721e2c;
}

/* Currency Option Elements */
.currency-option .currency-symbol {
  font-size: 0.9rem;
  font-weight: bold;
  color: #e91e63;
  min-width: 18px;
  text-align: left;
  flex-shrink: 0;
}

.currency-option .currency-code {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1c1c1e;
  min-width: 35px;
  text-align: left;
  flex-shrink: 0;
}

/* Animations */
@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
  .currency-selector,
  .flutter-currency-selector {
    background: #1c1c1e !important;
    border-color: #333333 !important;
    color: #ffffff !important;
  }

  .currency-selector:hover,
  .flutter-currency-selector:hover {
    background: #2c2c2e !important;
    border-color: #444444 !important;
  }

  .currency-selector.open,
  .flutter-currency-selector.open {
    background: #2c2c2e;
    border-color: #007aff;
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.3);
  }

  .currency-text,
  .flutter-currency-text {
    color: #ffffff !important;
  }

  .dropdown-arrow,
  .flutter-dropdown-arrow {
    color: #8e8e93;
  }

  .currency-selector:hover .dropdown-arrow,
  .currency-selector.open .dropdown-arrow,
  .flutter-currency-selector:hover .flutter-dropdown-arrow,
  .flutter-currency-selector.open .flutter-dropdown-arrow {
    color: #ffffff;
  }

  .flutter-currency-symbol {
    color: #007aff !important;
  }

  /* Currency Dropdown Dark Mode */
  .currency-dropdown,
  .currency-dropdown-content {
    background: #1c1c1e !important;
    border-color: #333333 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5) !important;
  }

  .currency-option {
    border-bottom-color: #333333 !important;
    color: #ffffff !important;
  }

  .currency-option:hover {
    background: #2c2c2e !important;
    cursor: pointer;
  }

  .currency-option.selected {
    background: rgba(0, 122, 255, 0.2) !important;
    color: #ffffff !important;
  }

  .currency-option .currency-code {
    color: #ffffff !important;
  }

  .currency-option .currency-symbol {
    color: #007aff !important;
  }

  .currency-option.selected .currency-symbol {
    color: #007aff;
  }
}

/* Additional dark mode selectors for better compatibility */
[data-theme='dark'] .currency-selector,
[data-theme='dark'] .flutter-currency-selector,
body.dark-mode .currency-selector,
body.dark-mode .flutter-currency-selector,
.dark-mode .currency-selector,
.dark-mode .flutter-currency-selector {
  background: #1c1c1e !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

[data-theme='dark'] .flutter-currency-text,
body.dark-mode .flutter-currency-text,
.dark-mode .flutter-currency-text {
  color: #ffffff !important;
}

[data-theme='dark'] .flutter-currency-symbol,
body.dark-mode .flutter-currency-symbol,
.dark-mode .flutter-currency-symbol {
  color: #007aff !important;
}

/* Responsive Design */
@media (max-width: 480px) {
  .currency-selector,
  .flutter-currency-selector {
    padding: 6px 10px;
    min-width: 70px;
  }

  .currency-dropdown-content {
    min-width: 100px;
    max-width: 120px;
  }

  .currency-option {
    padding: 6px 10px;
    gap: 4px;
  }

  .currency-option .currency-symbol {
    font-size: 0.85rem;
    min-width: 16px;
  }

  .currency-option .currency-code {
    font-size: 0.8rem;
    min-width: 30px;
  }
}
