/**
 * Currency Converter Popup Styles
 */

/* Money tag styling */
.money-tag {
  display: inline-block;
  padding: 2px 6px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  cursor: help;
  transition: all 0.3s ease;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 0.95em;
}

.money-tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* Popup container */
.currency-popup {
  position: absolute;
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 0;
  z-index: 9999;
  min-width: 320px;
  max-width: 400px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.currency-popup.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Popup header */
.currency-popup-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 12px 16px;
  font-weight: 700;
  font-size: 14px;
  border-radius: 12px 12px 0 0;
  text-align: center;
  letter-spacing: 0.5px;
}

/* Currency list */
.currency-popup-list {
  padding: 8px;
  max-height: 400px;
  overflow-y: auto;
}

/* Individual currency item */
.currency-item {
  display: grid;
  grid-template-columns: 50px 1fr auto;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 6px;
  transition: background-color 0.2s ease;
  align-items: center;
  font-size: 13px;
}

.currency-item:hover {
  background-color: #f8f9ff;
}

.currency-code {
  font-weight: 700;
  color: #667eea;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 12px;
}

.currency-name {
  color: #666;
  font-size: 12px;
}

.currency-value {
  font-weight: 600;
  color: #333;
  text-align: right;
  font-family: 'Monaco', 'Courier New', monospace;
  white-space: nowrap;
}

/* Scrollbar styling for the popup list */
.currency-popup-list::-webkit-scrollbar {
  width: 6px;
}

.currency-popup-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.currency-popup-list::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 3px;
}

.currency-popup-list::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .currency-popup {
    background: #2d2d2d;
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  }
  
  .currency-item:hover {
    background-color: #3a3a3a;
  }
  
  .currency-name {
    color: #aaa;
  }
  
  .currency-value {
    color: #eee;
  }
  
  .currency-popup-list::-webkit-scrollbar-track {
    background: #1a1a1a;
  }
}

/* Responsive design */
@media (max-width: 480px) {
  .currency-popup {
    min-width: 280px;
    max-width: calc(100vw - 40px);
  }
  
  .currency-item {
    grid-template-columns: 45px 1fr auto;
    font-size: 12px;
  }
  
  .currency-value {
    font-size: 12px;
  }
}

