/* Backend Currency Selector Styles - Harmonized with Backend Theme */

.navbar-currency-selector {
  position: relative;
  visibility: hidden; /* provisionally hidden */
  margin-left: 15px;
  
  .currency-selector-wrapper {
    position: relative;
    display: inline-block;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    padding: 6px 12px;
    transition: all 0.2s ease;
    
    &:hover {
      background-color: #e9ecef;
      border-color: #dee2e6;
    }
    
    &.loading {
      opacity: 0.6;
      pointer-events: none;
    }
  }
  
  #globalCurrencySelector {
    min-width: 140px;
    height: 28px;
    font-size: 12px;
    font-weight: 500;
    padding: 0 8px;
    border: none;
    border-radius: 0;
    background-color: transparent;
    color: #495057;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    outline: none;
    transition: color 0.2s ease;
    
    &:focus {
      color: #007bff;
    }
    
    &:hover {
      color: #007bff;
    }
    
    option {
      background-color: #ffffff;
      color: #495057;
      padding: 8px 12px;
      font-size: 12px;
      font-weight: 500;
      
      &:hover {
        background-color: #f8f9fa;
      }
      
      &:checked {
        background-color: #007bff;
        color: #ffffff;
      }
    }
  }
  
  .currency-loading {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    color: #6c757d;
    
    i {
      animation: spin 1s linear infinite;
    }
  }
}

/* Message styling - Harmonized with backend theme */
.backend-currency-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  z-index: 10001;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  max-width: 300px;
  word-wrap: break-word;
  
  &.backend-currency-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
  }
  
  &.backend-currency-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .navbar-currency-selector {
    margin-left: 10px;
    
    .currency-selector-wrapper {
      padding: 4px 8px;
    }
    
    #globalCurrencySelector {
      min-width: 120px;
      font-size: 11px;
    }
  }
}

/* Animation keyframes */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
