/**
 * Stili per la pagina Trova Parquettista - Google Maps
 * File: trova-parquettista-maps.css
 * Versione: 1.0
 * Data: 21 settembre 2025
 */

/* ===== STILI PRINCIPALI ===== */

/* Stile per la select */
#trova-provincia-select {
	width: 100%;
}

/* Tooltip per provincia richiesta - stesso stile della homepage */
.tooltip-provincia-required {
  background-color: #dc3545;
  color: white !important;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 20px rgba(220, 53, 69, 0.4);
  z-index: 9999 !important;
  position: absolute !important;
  white-space: nowrap;
  border: 2px solid #fff;
  max-width: 300px;
  text-align: center;
}

.tooltip-provincia-required::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -8px;
  border-width: 8px 8px 0;
  border-style: solid;
  border-color: #dc3545 transparent transparent transparent;
}

.tooltip-provincia-required::before {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -10px;
  border-width: 10px 10px 0;
  border-style: solid;
  border-color: #fff transparent transparent transparent;
  z-index: -1;
}

/* Versione del tooltip che appare sotto il pulsante */
.tooltip-provincia-required.tooltip-below::after {
  top: -8px;
  border-width: 0 8px 8px;
  border-color: transparent transparent #dc3545 transparent;
}

.tooltip-provincia-required.tooltip-below::before {
  top: -10px;
  border-width: 0 10px 10px;
  border-color: transparent transparent #fff transparent;
}

/* Stile per pulsante disabilitato */
#trova-parquettisti-btn.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: auto; /* Manteniamo pointer-events per permettere il tooltip */
}

/* Animazione per evidenziare la provincia auto-selezionata */
#trova-provincia-select.auto-selected {
  background-color: #e8f5e8 !important;
  border-color: #28a745 !important;
  animation: pulseGreen 2s ease-in-out;
}

@keyframes pulseGreen {
  0% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(40, 167, 69, 0); }
  100% { box-shadow: 0 0 0 0 rgba(40, 167, 69, 0); }
}

/* Stili per la mappa Google Maps */
.map-container {
	position: relative;
	width: 100%;
	overflow: hidden;
}

#parquettisti-map {
	width: 100% !important;
	height: 650px !important;
	min-height: 400px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Responsive per dispositivi mobili */
@media (max-width: 768px) {
	#parquettisti-map {
		height: 400px !important;
		min-height: 300px;
	}
}

@media (max-width: 480px) {
	#parquettisti-map {
		height: 350px !important;
		min-height: 250px;
	}
}

/* ===== STILI POPUP MARKER ===== */

/* Container principale popup */
.gm-style .gm-style-iw-c {
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.2);
	max-width: 280px !important;
	min-width: 240px !important;
}

/* Freccia del popup */
.gm-style .gm-style-iw-t::after {
	background: linear-gradient(45deg, white 50%, transparent 50%);
}

/* Container contenuto popup */
.gm-style .gm-style-iw-d {
	overflow: hidden !important;
	text-align: center !important;
}

/* ===== CONTENUTO POPUP ===== */

/* Contenuto popup personalizzato */
.gm-style-iw .popup-content {
	padding: 10px 14px !important;
	text-align: center !important;
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
	background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%) !important;
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
}

/* Titolo popup (nome provincia) */
.gm-style-iw .popup-title {
	font-size: 9px !important;
	font-weight: 600 !important;
	color: #2c3e50 !important;
	margin-bottom: 2px !important;
	line-height: 1.0 !important;
	white-space: nowrap !important;
	overflow: hidden !important;
	text-overflow: ellipsis !important;
	width: 100% !important;
	text-align: center !important;
}

/* Conteggio parquettisti disponibili */
.gm-style-iw .popup-count {
	font-size: 8px !important;
	color: #34495e !important;
	margin-bottom: 5px !important;
	font-weight: 500 !important;
	white-space: nowrap !important;
	text-align: center !important;
	width: 100% !important;
}

/* Bottone call-to-action */
.gm-style-iw .popup-button {
	display: inline-block !important;
	background: linear-gradient(135deg, #3498db 0%, #2980b9 100%) !important;
	color: white !important;
	padding: 3px 8px !important;
	border-radius: 12px !important;
	text-decoration: none !important;
	font-weight: 600 !important;
	font-size: 7px !important;
	transition: all 0.3s ease !important;
	border: none !important;
	cursor: pointer !important;
	box-shadow: 0 2px 8px rgba(52, 152, 219, 0.25) !important;
	white-space: nowrap !important;
	text-align: center !important;
	margin: 0 auto !important;
}

/* Effetto hover del bottone */
.popup-button:hover {
	transform: translateY(-1px);
	box-shadow: 0 3px 12px rgba(52, 152, 219, 0.35);
	background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
	color: white;
	text-decoration: none;
}

/* ===== UTILITY CLASSES ===== */

/* Classe per nascondere elementi durante il caricamento */
.loading-maps {
	opacity: 0.6;
	pointer-events: none;
}

/* Classe per contenitori flex centrati */
.maps-center {
	display: flex;
	align-items: center;
	justify-content: center;
}

