/* ========== RESET / BASE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ========== THEME ========== */
:root {
  --bg: #2f3a2f;
  --bg-accent: #263226;
  --text: #f2f4f0;
  --brand: #7fa882;
  --card: rgba(255,255,255,0.06);
}

/* ========== MAP PAGE ========== */
.map-page {
  background:
    radial-gradient(1000px 600px at 80% -10%, rgba(34,211,238,.15), transparent),
    linear-gradient(180deg, var(--bg), var(--bg-accent));
  color: var(--text);
}

/* ========== MAP WRAPPER ========== */
.map-wrapper {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 12px;
}

#divMap {
  width: 100%;
  height: min(85vh, 900px);
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: #FCFFFC;
  touch-action: manipulation;
  border: 2px solid #000;
}

/* ========== OVERLAY UI ========== */
.map-ui {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1000;
}

/* LEFT BUTTON STACK */
.map-controls {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 8px;
  height: calc(100% - 24px);   /* CRITICAL: forces wrapping */
  align-content: flex-start;
  pointer-events: auto;
}

/* RIGHT BUTTON STACK */
.map-actions {
  position: absolute;
  bottom: 50px;
  right: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
}

/* TOP CENTER TEXT */
.map-selected {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(14px, 2vw, 20px);
  text-align: center;
  pointer-events: none;
}

/* BOTTOM CENTER TEXT */
.map-site-name {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: clamp(16px, 2.5vw, 28px);
  font-weight: 500;
  pointer-events: none;
}

/* ========== BUTTONS ========== */
.btnSite {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  border: 3px solid lightgray;
  opacity: 0.6;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s ease;
}

.btnSite:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

.hidden {
  display: none;
}

/* ========== CONTENT ========== */
.content {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  color: #222;
  background: #fff;
  border-radius: 12px;
}

.content h1 {
  font-size: 2rem;
  margin-top: 20px;
}

.content h2 {
  margin-top: 30px;
  font-size: 1.4rem;
}

.content p {
  line-height: 1.6;
}

.lead {
  font-size: 1.1rem;
}

/* ========== FOOTER ========== */
.footer {
  text-align: right;
  opacity: 0.7;
  color: #b2c9b5;
  font-size: 0.8rem;
}

.footer a {
  text-decoration: none;
  color: #b2c9b5;
}

.footer a:hover {
  text-decoration: underline;
}

#btnGoogle {
  border-color: #4285F4;
}

#btnGooglePt {
  border-color: #34A853;
}

.map-site-name,
.map-selected {
  color: #1b2a1f;
  background: rgba(240, 245, 240, 0.7);
  font-weight: 600;
}

.btnSite.active {
  border-color: #34A853;
  opacity: 1;
  border: 6px solid #34A853;
}

#btnGooglePt.active {
  border: 4px solid #ff5252;         /* red = “targeting mode” */
  box-shadow: 0 0 12px rgba(255,82,82,0.7);
}

#divMap.crosshair {
  cursor: crosshair;
}

/* SHORT screens (laptops, split view) */
@media (max-height: 600px) {
  .btnSite {
    width: 45px;
    height: 45px;
  }
}

/* MEDIUM (default already handled at 60px) */

/* TALL screens */
@media (min-height: 900px) {
  .btnSite {
    width: 75px;
    height: 75px;
  }
}

/* VERY tall (optional, feels nice on big monitors) */
@media (min-height: 1100px) {
  .btnSite {
    width: 90px;
    height: 90px;
  }
}