/* =====================================================
   MAP FILTER — PAGE-SPECIFIC STYLES ONLY
   (Map layout + region cards + responsive behaviour)
===================================================== */


/* =====================================================
   LAYOUT
===================================================== */

.map-wrapper {
  width: 100%;
  max-width: 1200px;
  margin: 20px auto;
}

/* Leaflet map */
#map {
  width: 100%;
  height: 500px;
  min-height: 500px;
  border: 2px solid var(--accent-border);
}


/* =====================================================
   DETAILS PANEL
===================================================== */

#details-panel {
  width: 100%;
  max-width: 1200px;
  margin: 40px auto;
  padding: 10px 10px;
  background: var(--bg-card);
  color: var(--text-primary);
  text-align: center;
  display: none;
  border: 2px solid var(--accent-border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
}

#details-panel-button {
  background-color: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  padding: 14px 28px;
  border-radius: 6px;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

#details-panel-button:hover {
  background-color: #ffeb3b;
  color: #000000;
  border-color: #ffeb3b;
}


/* =====================================================
   REGION BUTTONS
===================================================== */


#map-region-buttons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: nowrap;
}

/* Region card */
#map-region-buttons .region-btn {
  width: 160px;
  height: 190px;
  background: #e6e6e6;
  border: 2px solid #d0d0d0;
  border-radius: 12px;
  cursor: pointer;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#map-region-buttons .region-btn:hover {
  border-color: #005eb8;
  box-shadow: 0 0 0 2px rgba(0,94,184,0.15);
}

#map-region-buttons .region-btn img {
  max-width: 110px;
  max-height: 110px;
  object-fit: contain;
  margin-bottom: 34px;
}

#map-region-buttons .region-btn span {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #6f6f6f;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  padding: 6px 0;
  border-radius: 0 0 10px 10px;
  pointer-events: none;
}


/* =====================================================
   USER INSTRUCTION CARD
===================================================== */

#UserInstruction {
  max-width: 1200px;
  margin: 32px auto;
  padding: 24px 32px;
  background: var(--bg-card);
  border: 2px solid var(--accent-border);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}

#UserInstruction h2 {
  margin: 0 0 16px;
  color: var(--section-heading);
  font-size: 1.6rem;
  font-weight: 700;
}

#UserInstruction p {
  margin: 0 0 10px;
  font-size: 1.05rem;
  line-height: 1.5;
  color: var(--text-primary);
}

#UserInstruction p:last-child {
  margin-bottom: 0;
}


/* =====================================================
   MAP-SPECIFIC RESPONSIVE TABLE ADJUSTMENTS
   (ONLY column hiding — canonical table styling elsewhere)
===================================================== */

@media (max-width: 768px) {

  .trial-results-table th:nth-child(3),
  .trial-results-table td:nth-child(3),
  .trial-results-table th:nth-child(4),
  .trial-results-table td:nth-child(4) {
    display: none;
  }

  .trial-results-table th:nth-child(1),
  .trial-results-table td:nth-child(1) {
    width: 32%;
    font-weight: 700;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .trial-results-table th:nth-child(2),
  .trial-results-table td:nth-child(2) {
    width: 68%;
    white-space: normal;
    overflow-wrap: anywhere;
    hyphens: none;
  }

  .trial-summary-btn {
    width: 100%;
    white-space: normal;
    line-height: 1.2;
    padding: 10px 12px;
  }

}


/* =====================================================
   ANATOMY SECTION CARD
===================================================== */

.anatomy-card {
  width: 100%;
  max-width: 1200px;
  margin: 60px auto;
  padding: 50px 40px;
  background: var(--bg-card);
  color: var(--text-primary);
  border: 2px solid var(--accent-border);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  text-align: center;
}


/* =====================================================
   MOBILE REGION BUTTON WRAP
===================================================== */

@media (max-width: 900px) {
  #map-region-buttons {
    flex-wrap: wrap;
  }
}

.hidden {
  display: none !important;
}

.map-popup-image {
  width: 300px;
  max-width: 100%;
  margin-top: 6px;
  border-radius: 6px;
}

#anit {
  width: 100%;
  max-width: 1200px;
  margin: 30px auto;
  display: none; /* ✅ hide by default */
}

#anit.visible {
  display: block;
}

#anit.hidden {
  display: none;
}

