/* layout interno del <header> */
.header-wrapper {
  display: flex;
  width: 100%;
}

.cont-logo-search {
  display: flex;
  flex-shrink: 1;
  flex-direction: column;
 
  flex: 1 1 100px;       
  min-width: 0;
  max-width: 360px;
         
}

.logo-container,
.search-container {
  margin-left: auto;
  margin-right: auto;
  max-height: 90px;
}

/* TOP 5 a destra */
.top-five {
  flex: 1;
  display: flex;
  flex-direction: column; /* necessario per mettere header sopra */
  font-family: Courier New, Courier, monospace;
  box-sizing: border-box;
}

.logo-container svg {
    width: 110%;
    height: auto;
    max-height: 110%;   /* scala con il contenitore */
    min-height: 40px;  
}

/*        STILI BARRA RICERCA      */
.search-container {
  flex-shrink: 1;
   position: relative; 
   width: 100%;
   max-width: none;       
   box-sizing: border-box; 
   max-width: 360px;
   flex-shrink: 1;
   min-width: 0;
   font-family: Courier New, Courier, monospace;
   border: 1px #606060 solid;
   border-radius: 5px;
}

.cont-logo-search > * {
    min-width: 0;
}

.search-input::placeholder {
  /* vertical-align non funziona con placeholder, usa line-height e height sull’input */
  text-align: center; /* o center se vuoi orizzontalmente centrato */
  color: #aaa;
  opacity: 1; /* migliora la visibilità */
  font-size: 16px;
  line-height: 36px; /* stesso dell’input */
}

.search-input:focus::placeholder {
  color: transparent;
}

.search-input:focus {
  box-shadow: 0 0 7px 1px #3399cc;
  background-color: #2b3a4a;
}

.search-input {
  flex-shrink: 1;
    width: 100%;
    padding: 4px 10px;      /* ridotto il padding verticale */
    font-size: 16px;
    line-height: 1.2;       /* più compatto verticalmente */
    background-color: #333;
    color: white;
    border-radius: 4px;
    border: none;
    font-family: inherit;
    box-sizing: border-box;
    outline: none;
    transition: box-shadow 0.3s ease;
    min-height: 24px;       /* imposta un’altezza minima più piccola */
}

#search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  width: 100%; /* larghezza stessa del container */
  background: white;
  border: 1px solid #ccc;
  border-top: none; /* evita doppia linea con input */
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  max-height: 200px;
  overflow-y: auto;
  margin: 0;
  padding: 0;
  list-style: none;
  z-index: 1000;
}

#search-suggestions li {
  padding: 8px 12px;
  cursor: pointer;
}

#search-suggestions li:hover,
#search-suggestions li.active {
  background-color: #0077a3;
  color: white;
}

.top-five-header {
  height: 20px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: lightgrey;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border-bottom: 1px solid #696969;
  padding-bottom: 1px;
}

.top-five-body-wrapper {
  position: relative;
  height: 100px;
  display: flex;
}

.top-five-body {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.1s ease;
}

.top-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  box-sizing: border-box;
  overflow: hidden;
  flex: 1 1 0;           /* <-- forza divisione equa */
}

.top-item-img {
  width: 60px;
  height: 60px;
  object-fit: contain;
  display: block;         /* elimina spazio extra sotto img */
  border: 1px #696969 solid;
  border-radius: 5px;
  margin: 0px 0px;

  box-shadow: 0 0 8px rgba(102, 51, 153, 1.95); /* effetto soft viola */
}

/* Testo sopra e sotto l'immagine */
.top-text {
  font-size: 10px;
  color: lightgrey;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-sizing: border-box;
  padding: 3px 5px;
  line-height: 1.2;
  text-align: center;
  display: inline-block;
  max-width: 100%;
}

.top-text-above,
.top-text-below {

  line-height: 18px;            /* fondamentale: centramento verticale */
  display: block;
  align-items: center;          /* centro verticale */
  justify-content: center;      /* centro orizzontale */
  width: 100%;
  overflow: hidden;
}

/* responsive top 5 */
@media (max-width: 600px) {
  .top-five {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .header-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .logo-container,
  .top-five {
    width: 100%;
    text-align: center;
  }
}

@media (max-height: 800px) {
  .top-item-img {
    width: 55px;
    height: 55px;
  }
}
@media (max-height: 550px) {
  .top-item-img {
    width: 35px;
    height: 35px;
  }
}

/* animazione neon good logo */
.flicker {
  animation: flicker 10s infinite alternate;
}

@keyframes flicker {
  0% { opacity: 0; }
  0.5% { opacity: 1; }
  10% { opacity: 1; }
  20% { opacity: 1; }
  23% { opacity: 1; }
  24% { opacity: 0.6; }
  25% { opacity: 1; }
  30% { opacity: 1; }
  40% { opacity: 1; }
  50% { opacity: 1; }
  60% { opacity: 1; }
  70% { opacity: 1; }
  80% { opacity: 1; }
  90% { opacity: 1; }
  100% { opacity: 1; }
}

.neon-soft-expanded {
  text-shadow:
    0 0 8px rgba(255, 102, 0, 0.8),
    0 0 16px rgba(255, 51, 51, 0.6),
    0 0 32px rgba(255, 0, 102, 0.5),
    0 0 48px rgba(255, 0, 153, 0.4),
    0 0 64px rgba(204, 0, 255, 0.3),
    0 0 80px rgba(153, 0, 255, 0.25),
    0 0 100px rgba(102, 0, 255, 0.2),
    0 0 120px rgba(51, 0, 153, 0.15);
}
