.login-warning {
  background-color: hsl(0, 0%, 98%);
  border: 1px solid #f9f9f9;
  color: #ed1809;
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-weight: 500;
}


.interaction-section {
  margin-top: 60px;   /* space before each section */
  margin-bottom: 60px; /* optional: extra space after each */
}

.entity-popup {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 20px;
  border: 1px solid #ccc;
  z-index: 1000;
}
.popup-content .close {
  float: right;
  font-size: 20px;
  cursor: pointer;
}

.edge-popover{
  position: absolute; 
  z-index: 10000;
  width: 600px;
  background: #fff;
  color: #1c1e21;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.18);
  padding: 10px 12px 12px 12px;
}

.edge-popover__close{
  position: absolute; 
  top: 6px; 
  right: 6px;
  border:none; 
  background: transparent; 
  cursor: pointer;
  font-size: 16px; 
  line-height: 1; 
  padding: 4px; 
  border-radius: 6px;
}

.edge-popover__close:hover{ background: #f1f5f9; }
.edge-popover__row{ margin-bottom: 6px; }
.edge-popover__summary{
  white-space: pre-wrap;
  padding: 8px; 
  background: #f8fafc;
  border: 1px solid #e5e7eb; 
  border-radius:6px;
  font-size:14px; 
  line-height:1.45;
}


.sim-toggle {
  margin: 20px 0;
  display: flex;
  gap: 10px;
}

.sim-section {
  display: none; /* hidden by default, toggled via JS */
  margin-top: 20px;
}

.instruction-text {
  font-style: italic;
  font-weight: bold;
  color: #666;
  margin-bottom: 10px;
}

.selected-actors {
  margin: 5px 0;
  font-weight: bold;
  color: #333;
}

.error-box {
  color: red;
  margin-top: 10px;
}

.result-box {
  margin-top: 20px;
}

.chat-box {
  margin-top: 20px;
  border: 1px solid #ccc;
  padding: 10px;
  height: 300px;
  overflow-y: auto;
  display: none;
}

.continue-form {
  margin-top: 10px;
  display: none;
}

.edge-info {
  margin-top: 20px;
  padding: 10px;
  border: 1px solid #ddd;
  display: none;
}

#run-simulation-btn,
#start-simulation-btn,
#new-simulation-btn,
.sim-toggle-btn {
  margin-top: 10px;
  background-color: #4CAF50; 
  color: white;
  padding: 8px 10px;
  border: 2px solid #4CAF50;
  border-radius: 4px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

#run-simulation-btn:hover,
#start-simulation-btn:hover,
#new-simulation-btn:hover,
.sim-toggle-btn:hover {
  background-color: #165ec7; /* Darker blue on hover */
  transform: translateY(-1px);
}

button:disabled {
  background-color: #ccc;
  border-color: #ccc;
  cursor: not-allowed;
  color: #666;
  transform: none;
}

/* Focus outline for accessibility */
button:focus {
  outline: 2px solid #145dbf;
  outline-offset: 2px;
}

.simulation-result {
  margin-top: 10px;
  padding: 12px;
  border-radius: 8px;
  background: #fafafa;
}

.sim-entry {
  margin-bottom: 8px;
  padding: 8px 12px;
  border-left: 4px solid transparent;
  border-radius: 4px;
}

/* Spoken dialogue */
.sim-entry.speech {
  border-left-color: #3b82f6;
}

/* Thoughts (inner monologue) */
.sim-entry.thought {
  border-left-color: #9ca3af;
  font-style: italic;
  color: #555;
  background: #f3f4f6;
}

/* Feelings (emotions, moods) */
.sim-entry.feeling {
  border-left-color: #f97316;
  font-style: italic;
  color: #703b00;
  background: #fff7ed;
}

/* Physical actions */
.sim-entry.action {
  border-left-color: #10b981;
  font-style: italic;
  color: #064e3b;
  background: #ecfdf5;
}


/* === Responsive for Mobile === */
@media (max-width: 768px) {
  .interaction-section {
    margin-top: 24px;
    margin-bottom: 24px;
  }
  
    .sim-toggle {
    flex-direction: column;   /* stack buttons vertically */
    gap: 5px;
  }


  #new-simulation-btn,
  .sim-toggle-btn {
    padding: 10px 14px;
    font-size: 15px;
    width: 100%; /* full width on mobile for tap comfort */
  }

  #cy {
    height: 400px !important; /* smaller graph on mobile */
  }

  textarea, input, select, button {
    font-size: 16px;          /* improve tap targets */
  }

  .chat-box {
    height: 200px;            /* smaller chat box */
  }

  .entity-popup {
    width: 90%;               /* scale popup to fit mobile */
    max-height: 80%;
    overflow-y: auto;
  }
}
