/* TrueNZ MapBox styling, v26 */

.map-wrapper {
   position: relative;
   width: 100%;
   height: 500px;
   min-height: 400px;
   margin: 20px 0;
   overflow: hidden;
   border: 1px solid #add958;
   box-shadow: 0px 0px 15px rgba(50, 50, 50, .2);
   -moz-box-shadow: 0px 0px 15px rgba(50, 50, 50, .2);
   -webkit-box-shadow: 0px 0px 15px rgba(50, 50, 50, .2);
   border-radius: 6px;
}

#mapBoxDiv {
   width: 100%;
   height: 100%;
}

.map-style-toggle {
   position: absolute;
   top: 10px;
   left: 10px;
   z-index: 99;
   background: #ffffff;
   border: 1px solid #d1d5db;
   border-radius: 6px;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
   overflow: hidden;
   display: flex;
   font-family: sans-serif;
   font-size: 12px;
   font-weight: 600;
}

.map-style-btn {
   padding: 6px 12px;
   cursor: pointer;
   background: #ffffff;
   border: none;
   color: #374151;
   transition: background 0.2s, color 0.2s;
}

.map-style-btn.active {
   background: #2563eb;
   color: #ffffff;
}

.map-style-btn:not(:last-child) {
   border-right: 1px solid #d1d5db;
}

/* Google Maps Style Mobile Toast */
.map-toast {
   position: absolute;
   top: 16px;
   left: 50%;
   transform: translateX(-50%) translateY(-10px);
   background: rgba(0, 0, 0, 0.8);
   color: #fff;
   padding: 8px 16px;
   border-radius: 20px;
   font-size: 13px;
   font-family: sans-serif;
   font-weight: 500;
   pointer-events: none;
   opacity: 0;
   transition: opacity 0.25s ease, transform 0.25s ease;
   z-index: 100;
}

.map-toast.visible {
   opacity: 1;
   transform: translateX(-50%) translateY(0);
}

.map-expand-btn {
   position: absolute;
   top: 10px;
   right: 46px;
   /* Leaves room for Mapbox NavigationControl on top-right */
   z-index: 99;
   padding: 6px 12px;
   cursor: pointer;
   background: #ffffff;
   border: 1px solid #d1d5db;
   border-radius: 6px;
   box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
   font-family: sans-serif;
   font-size: 12px;
   font-weight: 600;
   color: #374151;
   transition: background 0.2s, color 0.2s;
}

.map-expand-btn:hover {
   background: #f3f4f6;
}

.map-wrapper.is-expanded {
   position: fixed;
   inset: 0;
   width: 100vw;
   height: 100vh;
   min-height: 100vh;
   margin: 0;
   z-index: 9999;
   border-radius: 0;
   border: none;
}

body.map-is-expanded {
   overflow: hidden;
}