/* === Stile generale per la mappa === */
body, html {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: 'Inter', sans-serif;
  background: #0b1120;
  color: #f5f5f5;
}

/* Contenitore principale */
#fiv-map-screen {
  display: flex;
  flex-direction: column;
  height: 100vh;
  width: 100%;
  background: #0b1120;
}

/* Header */
.fiv-map-header {
  text-align: center;
  padding: 20px;
  background: #11182a;
  border-bottom: 1px solid #1e2538;
}

.fiv-map-header h1 {
  margin: 0;
  font-size: 1.8rem;
  color: #ffffff;
  font-weight: 600;
}

.fiv-map-header p {
  color: #a0accf;
  margin-top: 4px;
  font-size: 0.95rem;
}

/* Area principale */
.fiv-map-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  position: relative;
}

/* === Mappa visibile e responsive === */
#fiv-map {
  width: 100%;
  height: calc(100vh - 220px); /* Adatta automaticamente sotto l’header */
  border-radius: 14px;
  border: 1px solid #1e2538;
  background: #0b1120;
  opacity: 1; /* Subito visibile */
  transition: opacity 0.6s ease;
}

/* Azioni (pulsanti sopra la mappa) */
.fiv-map-actions {
  position: absolute;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5;
}

.fiv-btn {
  background: #0078ff;
  color: #fff;
  border: none;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.fiv-btn:hover {
  background: #3399ff;
  transform: translateY(-2px);
}

/* Area risultati */
.fiv-map-results {
  background: #141a2f;
  border-top: 1px solid #1e2538;
  padding: 16px 20px;
  min-height: 100px;
  max-height: 220px;
  overflow-y: auto;
  color: #e5e5e5;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* Effetto fade-in */
#fiv-map.loaded {
  opacity: 1;
}

/* === Mobile === */
@media (max-width: 768px) {
  .fiv-map-actions {
    flex-direction: row;
    position: static;
    justify-content: center;
    background: #11182a;
    padding: 10px;
    border-top: 1px solid #1e2538;
  }

  .fiv-map-header h1 {
    font-size: 1.4rem;
  }

  .fiv-btn {
    font-size: 0.9rem;
    padding: 8px 12px;
  }

  #fiv-map {
    height: 60vh; /* più compatta su schermi piccoli */
  }

  .fiv-map-results {
    max-height: 180px;
  }
}
