/* This is for MyMap */

/* Modal container */
.modal {
    position: absolute;
    background-color: white;
    padding: 4px 8px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-width: 500px; /* Adjust width */
    width: max-content;
    font-size: 14px;
    text-align: center;
    border: 1px solid #ddd;
    position: absolute; /* Ensure proper positioning */
}

/* Close button */
.modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    position: absolute;
    top: 4px;
    right: 4px;
}

/* Modal title */
.modal-title {
    font-weight: bold;
    margin-bottom: 8px;
    font-size: 14px;
}

/* Container to align buttons in a single row */
.modal-buttons {
    display: flex;
    justify-content: center;
    padding-top: 5px;
    gap: 12px; /* Space between buttons */
    white-space: nowrap; /* Prevent wrapping */
}

/* Text-style buttons */
.modal-button {
    background: none;
    border: none;
    color: black;
    font-size: 14px;
    cursor: pointer;
    padding: 6px 12px;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.modal-button:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Downward-pointing spike */
.modal-spike {
    position: absolute;
    bottom: -10px; /* Move slightly below the modal */
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid white; /* Matches modal background */
    border-bottom: none;
}

/* Spike border shadow */
/* .modal-spike::after {
    content: "";
    position: absolute;
    left: -10px;
    top: -1px;
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid #ddd;
} */

/* Splitter Modal */
.splitter-modal {
    position: absolute;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 16px;
    width: 450px;
    z-index: 1000;
    font-family: Arial, sans-serif;
    display: flex;
  }
  
  /* Left side - Form */
  .splitter-form {
    flex: 1;
    margin-right: 16px;
  }
  
  .form-group {
    margin-bottom: 16px;
  }
  
  .form-label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
  }
  
  .form-input, 
  .form-select {
    width: 100%;
    padding: 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
  }
  
  .form-select {
    background: #fff;
  }
  
  .form-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
  }
  
  .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
  }

  .btn-save {
    background: #28a745; /* Green for save */
    color: white;
  }
  
  .btn-close {
    background: #6b7280;
    color: white;
  }
  
  /* Right side - Connected Lines */
  .connected-lines-panel {
    width: 200px;
    border-left: 1px solid #e5e7eb;
    padding-left: 16px;
  }
  
  .panel-heading {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
  }
  
  .connected-lines-list {
    max-height: 160px;
    overflow-y: auto;
  }
  
 /* Line item layout */
.line-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  width: 100%; /* Ensures full width for proper spacing */
}

/* Line name styling */
.line-name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-right: 8px; /* Space between name and buttons */
}

/* Input in line-item when editing */
.line-item .form-input {
  flex: 1;
  margin-right: 8px; /* Space between input and buttons */
}

  /* Provided styles for edit and delete buttons */
/* .btn-edit {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
 
} */

/* Provided styles for edit and delete buttons */
.btn-edit {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.btn-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  /* Removed display: flex; align-items: center to avoid layout conflicts */
}

  
  .no-lines-message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    padding: 8px 0;
  }

  /* Map Control */
  .map-controls {
    display: flex;
    flex-direction: row; /* Align buttons horizontally */
    align-items: center; /* Center vertically within the container */
    justify-content: center; /* Center horizontally within the container */
    background: white;
    padding: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    gap: 8px; /* Space between buttons */
  }
  
  .map-control-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
  }
  
  .map-control-button:hover .control-tooltip {
    visibility: visible;
    opacity: 1;
  }
  
  .map-control-button svg {
    width: 20px;
    height: 20px;
    fill: #333; /* Icon color */
  }
  
  .control-tooltip {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    transition: opacity 0.2s;
    z-index: 10;
  }

  /* Termination */
  .termination-modal {
    position: absolute;
    background: white;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.15);
    padding: 24px;
    z-index: 1000;
    width: 100%;
    height: 350px;
    box-sizing: border-box;
    border-top: 2px solid #e0e0e0;
  }
  
  .termination-modal-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    height: 100%;
  }
  
  .flow-container {
    height: 80%;
    width: 100%;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
  }
  
  .reactflow {
    background: #f8f9fa;
  }
  
  .reactflow__node {
    padding: 0;
  }
  
  .custom-node {
    width: 180px;
    height: 40px;
    background-color: inherit;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    padding: 0 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .custom-node:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  }
  
  .reactflow__handle {
    background: transparent;
    width: 12px;
    height: 12px;
    border: 1px solid #333;
  }
  
  
  .modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
  }
  
  /* Hide React Flow attribution */
  .reactflow__attribution {
    display: none !important;
  }
  
