/* Currency Modal Styles */
.currency-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
}

.currency-modal-content {
  background-color: #fff;
  margin: 10% auto;
  padding: 0;
  border: none;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  animation: modalSlideIn 0.3s ease-out;
}

.currency-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 2rem 1rem;
  border-bottom: 1px solid #e9ecef;
  background-color: #fff;
  border-radius: 12px 12px 0 0;
}

.currency-modal-title {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
}

.currency-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: #95a5a6;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.currency-close:hover {
  background-color: #f8f9fa;
  color: #2c3e50;
}

.currency-modal-body {
  padding: 2rem;
}

.currency-options {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.currency-option {
  padding: 1rem 1.5rem;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fff;
  font-size: 1rem;
  color: #2c3e50;
  position: relative;
  overflow: hidden;
}

.currency-option:hover {
  background-color: #f8f9fa;
  border-color: #24a393;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(36, 163, 147, 0.15);
}

.currency-option.selected {
  background: linear-gradient(135deg, #24a393 0%, #1e8a7a 100%);
  color: white;
  border-color: #24a393;
  box-shadow: 0 4px 12px rgba(36, 163, 147, 0.3);
}

.currency-option.selected strong {
  color: white;
}

.currency-option strong {
  font-weight: 600;
  color: #24a393;
  margin-right: 0.5rem;
}

/* Loading state */
.currency-option.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Success message */
.currency-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  color: #155724;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
  border-left: 4px solid #28a745;
  font-weight: 500;
}

/* Error message */
.currency-error {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  color: #721c24;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  display: none;
  border-left: 4px solid #dc3545;
  font-weight: 500;
}

/* Currency indicator styles */
.currency-indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.currency-badge {
  background: linear-gradient(135deg, #24a393 0%, #1e8a7a 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(36, 163, 147, 0.2);
}

.sidebar-currency-text {
  font-size: 0.9rem;
  color: #666;
}

.sidebar-currency-link {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.sidebar-currency-link:hover {
  text-decoration: none;
  color: inherit;
  transform: translateY(-1px);
}

/* Enhanced Currency Select Styles */
.currency-selector-nav,
.currency-selector-sidebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border: 2px solid transparent;
  border-radius: 8px;
  transition: all 0.3s ease;
  cursor: pointer;
  min-width: 140px;
  position: relative;
  overflow: hidden;
}

.currency-selector-nav:hover,
.currency-selector-sidebar:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
  border-color: #24a393;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(36, 163, 147, 0.15);
}

.currency-selector-nav:focus-within,
.currency-selector-sidebar:focus-within {
  border-color: #24a393;
  box-shadow: 0 0 0 3px rgba(36, 163, 147, 0.1);
}

/* Select element styling */
.currency-select-nav,
.currency-select-sidebar {
  background: transparent !important;
  border: none !important;
  color: #2c3e50 !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  outline: none !important;
  padding: 4px 8px !important;
  border-radius: 4px !important;
  min-width: 100px !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324a393' 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") !important;
  background-repeat: no-repeat !important;
  background-position: right 8px center !important;
  background-size: 16px !important;
  padding-right: 32px !important;
}

.currency-select-nav:focus,
.currency-select-sidebar:focus {
  box-shadow: none !important;
}

/* Option styling */
.currency-select-nav option,
.currency-select-sidebar option {
  background-color: #fff !important;
  color: #2c3e50 !important;
  padding: 8px 12px !important;
  font-size: 0.9rem !important;
}

.currency-select-nav option:hover,
.currency-select-sidebar option:hover {
  background-color: #f8f9fa !important;
}

.currency-select-nav option:checked,
.currency-select-sidebar option:checked {
  background: linear-gradient(135deg, #24a393 0%, #1e8a7a 100%) !important;
  color: white !important;
}

/* Currency icon styling */
.currency-selector-nav svg,
.currency-selector-sidebar svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.currency-selector-nav:hover svg,
.currency-selector-sidebar:hover svg {
  transform: scale(1.1);
}

/* Sidebar specific styles */
.currency-selector-sidebar {
  margin: 8px 0;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 6px;
  padding: 10px 12px;
}

.currency-selector-sidebar:hover {
  background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

/* Navbar specific styles */
.currency-selector-nav {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.9) 0%,
    rgba(248, 249, 250, 0.9) 100%
  );
  backdrop-filter: blur(10px);
  border-radius: 6px;
  padding: 8px 10px;
}

.currency-selector-nav:hover {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(248, 249, 250, 1) 100%
  );
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .currency-selector-nav,
  .currency-selector-sidebar {
    min-width: 120px;
    padding: 6px 8px;
  }

  .currency-select-nav,
  .currency-select-sidebar {
    font-size: 0.85rem !important;
    min-width: 80px !important;
  }

  .currency-selector-nav svg,
  .currency-selector-sidebar svg {
    width: 20px;
    height: 20px;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .currency-modal-content {
    margin: 20% auto;
    width: 95%;
    max-width: 350px;
  }

  .currency-modal-header {
    padding: 1.25rem 1.5rem 0.75rem;
  }

  .currency-modal-body {
    padding: 1.5rem;
  }

  .currency-option {
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
}
