/* ✅ Base Fullscreen Modal (No structural change, only small improvement) */
#processFlowModal.modal {
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  display: none;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

/* ✅ Modal Content - Fullscreen Layout */
#processFlowModal .modal-content.fullscreen {
  background-color: #fff;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: row; 
  position: relative;
  border-radius: 0;
  margin: 0;
  padding: 0;
}

/* ✅ Sidebar (Improved look, no size change) */
#processFlowModal .sidebar {
  width: 280px;
  background-color: #f8f8f8;
  border-right: 1px solid #ccc;
  padding: 15px;
  overflow-y: auto;
  height: 100%;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

#processFlowModal .sidebar h3 {
  margin-top: 0;
  font-size: 18px;
  font-weight: bold;
  color: #333;
  border-bottom: 2px solid #007bff;
  padding-bottom: 5px;
}
#processFlowModal .sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#processFlowModal .sidebar li {
  padding: 8px 10px;
  border-bottom: 1px solid #ddd;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}
#processFlowModal .sidebar li:hover {
  background-color: #e6f0ff;
  color: #007bff;
}

/* ✅ Drawing Panel */
#processFlowModal .drawing {
  flex: 1;
  background-color: #fff;
  overflow: auto;
  position: relative;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* ✅ SVG / Image Full Fit */
#processFlowModal #svgContainer {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}
#processFlowModal #svgContainer img,
#processFlowModal #svgContainer svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ✅ Close Button */
#processFlowModal .close-btn {
  position: absolute;
  top: 50px;
  right: 20px;
  font-size: 30px;
  color: #333;
  cursor: pointer;
  z-index: 10000;
  background: #f8f8f8;
  padding: 5px 10px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  transition: all 0.3s ease-in-out;
}
#processFlowModal .close-btn:hover {
  background: #e60000;
  color: #fff;
}

/* ✅ Show Details Button */
#processFlowModal #showDetailsMsg {
  position: absolute;
  top: 50px;
  left: 10px;
  font-size: 18px;
  color: red;
  font-weight: bold;
  background-color: #fff4f4;
  padding: 10px 15px;
  border: 2px dashed red;
  cursor: pointer;
  animation: blinkShowDetails 1s infinite;
  z-index: 10000;
  border-radius: 4px;
}
@keyframes blinkShowDetails {
  0% { opacity: 1; }
  50% { opacity: 0.1; }
  100% { opacity: 1; }
}

/* ✅ Show Details Popup (Improved, but same structure) */
#detailsModal {
  position: fixed;
  z-index: 100000;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px); /* 🔥 Blur behind */
  border: 2px solid #444;
  border-radius: 10px;
  padding: 20px 25px;
  width: 90vw;
  max-width: 1000px;
  max-height: 85vh;
  overflow: hidden;
  box-shadow: 0 0 25px rgba(0,0,0,0.6);
  display: none;
  animation: popupFade 0.3s ease-in-out;
}

/* ✅ Details Content */
#detailsModal #detailsContent {
  max-height: calc(85vh - 70px);
  overflow-y: auto;
  padding: 15px 20px;
  background: #fff;
  border-radius: 5px;
  font-size: 15px;
  line-height: 1.6;
  box-shadow: inset 0 0 5px rgba(0,0,0,0.1);
}

/* ✅ Close Button (Details Popup) */
#detailsModal .close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  font-weight: bold;
  color: #000;
  cursor: pointer;
  background: #f1f1f1;
  padding: 5px 10px;
  border-radius: 4px;
  transition: all 0.3s ease-in-out;
}
#detailsModal .close-btn:hover {
  background: #e60000;
  color: #fff;
}

@keyframes popupFade {
  0% { opacity: 0; transform: translate(-50%, -45%); }
  100% { opacity: 1; transform: translate(-50%, -50%); }
}
