@import url('https://fonts.googleapis.com/css2?family=Source+Code+Pro&family=Fira+Mono&display=swap');

/* Modal container */
#infoModal {
  position: fixed;
  width: 800px;
  height: 500px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #222;
  color: white;
  padding: 20px;
  border: 1px solid orange;
  border-radius: 5px;
  display: flex;
  flex-direction: column;
  font-family: Source Code Pro, monospace;
  box-shadow: 
  0 0 10px #FFAA4433,    /* leggermente più diffuso */
  0 0 8px #CC772233,     
  0 0 8px 6px #CC663311, 
  0 0 10px #CCAA5511,    
  0 0 12px #FF993300;
  z-index: 9999;
  overflow: hidden;
}

/* Modal visibility */
#infoModal.show {
  display: flex;
  animation: modalFadeZoomIn 0.3s ease-out forwards;
}
#infoModal.hide {
  animation: modalFadeZoomOut 0.2s ease-in forwards;
}

/* Modal content wrapper */
#infoModalContent {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Body: immagine e info */
.modal-body {
  display: flex;
  gap: 20px;
  margin-bottom: 10px;
  flex-shrink: 0;
}

.modal-left img {
  width: 90px;
  height: 90px;
  border: 1px solid #555;
  border-radius: 5px;
}

.modal-right {
  flex-grow: 1;
  height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  font-size: 0.95em;
}

.modal-right h2 {
  font-size: 1.1em;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.info-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.label {
  color: #999;
  font-weight: 500;
  flex-shrink: 0;
  white-space: nowrap;
}
.value {
  color: linen;
  font-weight: 400;
  text-align: right;
  flex-grow: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Descrizione: altezza fissa e scrollabile */
.modal-description {
  flex-grow: 1;
  color:lightgrey;
  height: 280px; 
  overflow-y: auto;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #444;
  font-size: 0.95em;
  line-height: 1.4em;
  text-align: justify;

  scrollbar-width: thin;
  scrollbar-color: #555 #222;
}
.modal-description::-webkit-scrollbar {
  width: 2px;
}
.modal-description::-webkit-scrollbar-track {
  background: #222;
}
.modal-description::-webkit-scrollbar-thumb {
  background-color: #555;
  border-radius: 3px;
}

/* Footer: sempre visibile */
.modal-footer {
  flex-shrink: 0;
  padding-top: 10px;
  display: flex;
  justify-content: center;
}

.btn-close-modal {
  all: unset;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid #666;
  color: #ccc;
  background-color: #5a6f8f;
  transition: background-color 0.2s ease;
}
.btn-close-modal:hover {
  box-shadow:
  0 8px 24px rgba(90, 111, 143, 0.28),    /* ombra principale più ampia */
  0 0 10px rgba(90, 111, 143, 0.15),      /* alone più morbido */
  0 0 12px rgba(100, 160, 255, 0.2);      /* accento blu neon */
  color: white;
}

/* Overlay */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 998;
}

.overlay.show {
  display: block;
}
.overlay.hide {
  display: none;
}

/* DESCRIPTION styles */

.modal-description a {
  position: relative;
  color: #66b3ff;
  text-decoration: none; /* rimuove l’underline standard */
  transition: color 0.3s ease;
}

/* Pseudo-elemento per la linea animata */
.modal-description a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px; /* posizione della linea sotto il testo */
  width: 0%;
  height: 1px;
  background-color: #66b3ff;
  transition: width 0.3s ease;
}

/* Quando si passa il mouse, la linea si espande da sinistra a destra */
.modal-description a:hover::after {
  width: 100%;
}

/* Effetto colore leggermente più chiaro durante hover */
.modal-description a:hover {
  color: #99ccff;
}

.modal-description i {
  font-family: 'Fira Code', monospace;
  font-style: italic;
  font-weight: 300;
  color: #b1c1dc;
  opacity: 0.95;
}

/* Animazioni */
@keyframes modalFadeZoomIn {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes modalFadeZoomOut {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.8);
  }
}
