/**
 * Language Selector Styles
 * 
 * Defines styles for the language selection dropdown located in the sidebar.
 * Supports the theme's dark mode and is optimized for mobile environments.
 */

/* Language selector container */
  .lang-selector-wrapper {
    padding: 2rem;
    text-align: left;
  }
  
  /* Dropdown container */
  .lang-dropdown {
    position: relative;
    display: inline-block;
    width: auto;
    min-width: 120px;
    max-width: 100%;
  }
  
  /* Select input element */
  .lang-select {
    /* Basic styles */
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 0.5rem 2rem 0.5rem 1rem;
    
    /* Font and colors */
    font-size: 0.95rem;
    border-color: var(--sidebar-muted-color);
    color: var(--sidebar-muted-color);
    background-color: var(--sidebar-bg);
    
    /* Shape and interaction */
    cursor: pointer;
    transition: all 0.2s ease;
    
    /* Add arrow icon */
    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='8ba1a2' 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");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
  }
  
  /* Flag emoji styles */
  .lang-select option {
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
    padding: 0.35rem;
    font-size: 1rem;
  }
  
  .lang-flag {
    display: inline-block;
    margin-right: 0.5rem;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", sans-serif;
  }
  
  /* Hover state */
  .lang-select:hover {
    color: var(--sidebar-active-color);
    background-color: var(--sidebar-hover-bg);
  }
  
  /* Focus state */
  .lang-select:focus {
    outline: 1px solid var(--sidebar-active-color);
    outline-offset: 0px;
    color: var(--sidebar-active);
  }
  
  /* Firefox browser support */
  .lang-select:-moz-focusring {
    color: transparent;
    text-shadow: 0 0 0 var(--sidebar-muted-color);
  }
  
  /* IE browser support */
  .lang-select::-ms-expand {
    display: none;
  }
  
  /* Dark mode support */
  [data-mode="dark"] .lang-select {
    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='%238ba1a2' 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");
  }
  
  /* Mobile optimization */
  @media (max-width: 768px) {
    .lang-select {
        padding: 0.75rem 2rem 0.75rem 1rem;  /* Larger touch area */
    }
    
    .lang-dropdown {
        min-width: 140px;  /* Wider selection area on mobile */
    }
  }