/* ===== Map Section ===== */

section[data-section="map"] {
  width: 100%;
  background: var(--map-bg, #fff);
  padding: 0;
  overflow: hidden;
}

section[data-section="map"] .wrap {
  width: 100%;
  max-width: 1900px;
  margin: 0 auto;
  padding: 0;
}

section[data-section="map"] .map-frame {
  width: 100%;
  overflow: hidden;
  background: #eee;
  border-radius: 12px;
}

section[data-section="map"] .map-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

section[data-section="map"] .map-placeholder {
  width: 100%;
  height: 100%;
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #777;
  background: #f1f1f1;
  font-size: 18px;
}

section[data-section="map"] .map-placeholder-btn {
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 12px 22px;
  font-family: Kanit, Arial, sans-serif;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
}

section[data-section="map"] .map-edit-action {
  text-align: center;
  padding: 10px 0 18px;
}

section[data-section="map"] .map-edit-action button {
  border: 1px solid #111;
  background: #fff;
  color: #111;
  border-radius: 6px;
  padding: 7px 12px;
  font-family: Kanit, Arial, sans-serif;
  cursor: pointer;
}

section[data-section="map"] .map-edit-action button:hover {
  background: #111;
  color: #fff;
}

/* ===== Map Popup ===== */

#pxthMapModal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.55);
  padding: 20px;
}

#pxthMapModal.is-open {
  display: flex !important;
}

#pxthMapModal .pxth-map-modal-box {
  width: min(720px, 96vw);
  background: #fff;
  color: #111;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
  padding: 18px;
  font-family: Kanit, Arial, sans-serif;
}

#pxthMapModal .pxth-map-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

#pxthMapModal .pxth-map-modal-head strong {
  font-size: 17px;
}

#pxthMapModal .pxth-map-modal-close {
  border: 0;
  background: transparent;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

#pxthMapModal textarea {
  width: 100%;
  min-height: 230px;
  border: 2px solid #111;
  border-radius: 8px;
  padding: 10px;
  font-family: monospace;
  font-size: 13px;
  resize: vertical;
}

#pxthMapModal .pxth-map-modal-row {
  margin-top: 12px;
}

#pxthMapModal .pxth-map-modal-row label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

#pxthMapModal input {
  width: 100%;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 8px;
}

#pxthMapModal .pxth-map-modal-hint {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-top: 10px;
}

#pxthMapModal .pxth-map-modal-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

#pxthMapModal .pxth-map-modal-save {
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 8px;
  padding: 9px 16px;
  cursor: pointer;
  font-family: Kanit, Arial, sans-serif;
}

@media (max-width: 767px) {
  section[data-section="map"] .map-frame {
    height: 360px !important;
  }

  #pxthMapModal .pxth-map-modal-box {
    padding: 14px;
  }

  #pxthMapModal textarea {
    min-height: 200px;
  }
}
