/* Floating Phone Button */
#openCallPanelBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #1976d2;
  color: white;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  font-size: 24px;
  cursor: pointer;
  z-index: 9999;
  transition: background-color 0.2s, transform 0.2s;
}

#openCallPanelBtn:hover:not(:disabled) {
  background-color: #1565c0;
  transform: scale(1.1);
}

#openCallPanelBtn:focus {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

/* Call Modal Container */
#callModal {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); /* softer shadow */
  background: #ffffff;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  right: 40px;
  bottom: 90px;
  width: 280px;
  z-index: 9998;
  font-family: Arial, sans-serif;
}

#callModal .modal-content {
  background: none;
  padding: 0;
  border-radius: 0;
  width: auto;
  max-width: none;
  box-shadow: none;
  animation: none;
}

/* Modal Header */
#callModal h3 {
  margin: 0 0 10px;
  font-size: 18px;
  color: #333;
}

/* Input Field */
#callModal input[type="text"] {
  width: 100%;
  padding: 6px 8px;
  margin-bottom: 6px;
  font-size: 14px;
  box-sizing: border-box;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: border-color 0.2s;
}

#callModal input[type="text"]:focus {
  border-color: #1976d2;
  outline: none;
}

/* Help Text */
#inviteeHelp {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  display: block;
}

/* Call Buttons */
#callModal button {
  font-size: 14px;
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

#callModal button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

#callModal button:hover:not(:disabled) {
  filter: brightness(90%);
}

#startVoiceCallBtn {
  background-color: #4caf50;
  color: white;
}

#endCallBtn {
  background-color: #f44336;
  color: white;
}

#muteBtn {
  background-color: #ff9800;
  color: white;
  width: 100%;
  margin-top: 6px;
}

#muteBtn.toggled::before {
  content: "🔊 Unmute";
}

/* Call Controls */
.call-controls {
  display: flex;
  gap: 8px;
  margin: 10px 0;
}

/* Call Status */
#callStatus {
  margin-top: 12px;
  font-size: 13px;
  color: #555;
}

/* Incoming Call Notice */
#incomingCallNotice {
  display: none;
  background: #fffae6;
  padding: 10px;
  margin-bottom: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-align: center;
}

/* Call Actions (Accept/Reject Buttons) */
.call-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

#incomingCallNotice button {
  background-color: #1976d2;
  color: white;
}

#incomingCallNotice button:hover:not(:disabled) {
  background-color: #1565c0;
}

/* Error Message */
#callError {
  color: #d32f2f;
  font-size: 13px;
  margin-top: 8px;
  min-height: 20px; /* Reserve space to avoid layout shift */
}

/* Participants Container */
#participantsContainer {
  margin-top: 12px;
}

#callParticipants {
  padding-left: 20px;
  margin: 6px 0 0;
  list-style: disc;
  font-size: 13px;
  color: #333;
}

#participantsContainer:empty {
  display: none;
}

#callParticipants:empty + #participantsContainer {
  display: none;
}

/* === Call Modal Additions and Fixes === */
#callModal {
  background: #fff;
  border-radius: 8px;
  padding: 16px;
  position: fixed;
  right: 40px;
  bottom: 90px;
  width: 280px;
  z-index: 9998;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

/* Ensure consistent spacing */
.call-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.call-controls button {
  flex: 1;
  min-width: 40%;
}

#muteBtn.toggled::before {
  content: "🔊 Unmute";
}

#inviteMoreBtn {
  background-color: #03a9f4;
  color: white;
}

#inviteMoreBtn:hover:not(:disabled) {
  background-color: #0288d1;
}

/* === Participants List Styling === */
#participantsContainer {
  margin-top: 12px;
}

#callParticipants {
  padding-left: 0;
  margin: 6px 0 0;
  list-style: none;
  font-size: 13px;
  color: #333;
}

#callParticipants .participant {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f4f4f4;
  padding: 4px 6px;
  margin-bottom: 4px;
  border-radius: 4px;
}

#callParticipants .participant .name {
  font-weight: 500;
}

#callParticipants .participant .status {
  font-size: 14px;
  color: #777;
}


.chat-panel {
  margin-top: 16px;
  border-top: 1px solid #ddd;
  padding-top: 12px;
  max-height: 240px;
  display: flex;
  flex-direction: column;
}

.chat-header {
  font-weight: bold;
  margin-bottom: 6px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  background: #f9f9f9;
  padding: 8px;
  border: 1px solid #ccc;
  min-height: 120px;
  max-height: 200px;
  margin-bottom: 8px;
  font-size: 14px;
  line-height: 1.4;
}

.chat-message {
  margin-bottom: 6px;
}

.chat-message.self {
  text-align: right;
  color: #0959bf;
}

.chat-message.other {
  text-align: left;
  color: #444;
}

.chat-input-container {
  display: flex;
  gap: 8px;
}

#chatInput {
  flex: 1;
  padding: 6px;
  font-size: 14px;
}

#sendChatBtn {
  padding: 6px 12px;
  font-size: 14px;
  cursor: pointer;
}


.toast-message {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #323232;
  color: white;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 99999;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  font-family: sans-serif;
}
