/*-------------------------------------------------------------------------*/
/* Copyright (c) DELTA X MULTIMEDIA                                        */
/* Tutti i diritti sono riservati - All rights reserved                    */
/* https://www.deltaxmultimedia.it - info@deltaxmultimeida.it              */
/* CSS Document                                                            */
/*-------------------------------------------------------------------------*/
/* Language Dropdown Menu  - v.3.02 October 2025                           */
/*-------------------------------------------------------------------------*/
/* Used for multiple language module                                       */
/*-------------------------------------------------------------------------*/


.language-selector {
  position: relative;
  display: inline-block;
  margin-left: 8px;
  cursor: pointer;
}

.flag-button {
  background: none;
  border: 1px solid #686868;
  border-radius: 4px;
  padding: 4px 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.flag-button:hover {
  border-color: #dfdfdf;
  background-color: #dfdfdf;
  color: #000;
}

.flag-button span {
  font-size: 10px;
}

.flag-icon {
  width: 20px;
  height: auto;
  /* border-radius: 2px;*/
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: -20px;
  overflow: hidden;
  z-index: 9999 !important;
  padding-top: 0px;
  background-color: transparent;


  align-items: center;
  justify-content: center;

}

.dropdown-menu-content {

  border-radius: 8px;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin: 20px;
  border: 1px solid #e9e9e9;


}

.language-selector:hover .dropdown-menu {
  display: inline-flex !important;
  animation: fadeIn 0.2s ease-in-out;
}


.language-selector:hover .flag-button {

  border-color: #dfdfdf;
  background-color: #dfdfdf;
  color: #000;
}

/* .dropdown-menu.show {
            display: block;
            animation: fadeIn 0.2s ease-in-out;
        }*/



.language-option {
  display: flex;
  align-items: center;
  justify-content: space-between; /* opzionale, per sicurezza */
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: background-color 0.2s ease;

}

.language-option:hover {
  background-color: #f8f9fa;

}

.language-option:first-child {
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.language-option:last-child {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

.language-option:only-child {
  border-radius: 8px;
}


.language-option:not(:last-child) {
  border-bottom: 1px solid #f0f0f0;
}

.language-name {
  font-size: 14px;
  color: #333;
}


.language-name img.flag-icon
{
  margin-right:4px;
}



@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}



/* --- MOBILE --- */
@media (max-width: 320px) {
  .language-name {
    font-size: 12px;
  }

  .flag-icon {
    width: 16px;
  }

  .dropdown-menu-content {
    min-width: 120px;
  }  

  .language-option {
    gap: 8px;
    padding: 10px 10px;
  }  

}


@media (max-width: 140px) {
 
  .dropdown-menu-content {
    min-width: 100px;
  } 

  .language-option {
    gap: 8px;
    padding: 8px 8px;
  } 

  .flag-icon {
    min-width: 14px;
  }
  
  .flag-button span {
    display: none;
  }  
}