/* ==============================================================
   LANGUAGE SELECTOR - Selettore lingua
   ============================================================== */

.language-selector {
  position: relative;
  display: inline-block;
  margin-left: 20px;
  font-family: 'Manrope', sans-serif;
  z-index: 1001;
}

/* Desktop: selettore sempre visibile */
@media (min-width: 1025px) {
  .language-selector {
    display: inline-block !important;
    margin-left: 20px;
  }
  
  .current-lang {
    color: #000 !important;
    background: rgba(255, 255, 255, 0.8) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
  }
  
  .current-lang:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    border-color: rgba(0, 0, 0, 0.2) !important;
  }
}

.current-lang {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 20px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.current-lang:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.3);
}

.current-lang::after {
  content: '▼';
  margin-left: 8px;
  font-size: 10px;
  transition: transform 0.3s ease;
}

.language-selector:hover .current-lang::after {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(20px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  min-width: 140px;
}

.language-selector:hover .lang-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

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

.lang-option:hover {
  background: rgba(189, 196, 49, 0.1);
  color: #3a5935;
}

.lang-option.active {
  background: rgba(189, 196, 49, 0.2);
  color: #3a5935;
  font-weight: 600;
}

.lang-flag {
  display: inline-block;
  width: 24px;
  height: 16px;
  margin-right: 8px;
  background: #f0f0f0;
  border: 1px solid #ddd;
  border-radius: 2px;
  font-size: 10px;
  font-weight: bold;
  text-align: center;
  line-height: 14px;
  color: #666;
}

.lang-name {
  flex: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .language-selector {
    margin-left: 10px;
  }
  
  .current-lang {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .lang-dropdown {
    right: -10px;
    min-width: 120px;
  }
  
  .lang-option {
    padding: 10px 12px;
    font-size: 13px;
  }
}

/* Stile per il tema scuro (se applicabile) */
@media (prefers-color-scheme: dark) {
  .lang-dropdown {
    background: rgba(30, 30, 30, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
  }
  
  .lang-option {
    color: #fff;
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }
  
  .lang-option:hover {
    background: rgba(189, 196, 49, 0.2);
  }
} 