/* Chat Box Styling */
.mr-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: Arial, sans-serif;
}

.mr-chat-btn {
  width: 60px;
  height: 60px;
  background-color: #ffd000;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  outline: none;
  transition: transform 0.3s;
}

.mr-chat-btn:hover {
  transform: scale(1.05);
}

.mr-chat-btn svg {
  fill: #41116F;
  width: 32px;
  height: 32px;
}

.mr-chat-container {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 350px;
  max-width: calc(100vw - 40px);
  height: 500px;
  max-height: calc(100vh - 120px);
  background: rgba(25, 20, 30, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.mr-chat-container.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.mr-chat-header {
  background: #41116F;
  padding: 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: white;
}

.mr-chat-header h3 {
  margin: 0;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.mr-chat-header h3 .live-indicator {
  width: 10px;
  height: 10px;
  background-color: #4CAF50;
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s infinite;
}

.mr-close-btn {
  background: none;
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.mr-chat-messages {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mr-message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.mr-message.received {
  align-self: flex-start;
}

.mr-message.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.mr-message-name {
  font-size: 12px;
  color: #ffd000;
  margin-bottom: 2px;
  font-weight: bold;
}

.mr-message-bubble {
  background: #3a225c;
  color: white;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.mr-message.sent .mr-message-bubble {
  background: #ffd000;
  color: #1a1a1a;
  border-bottom-right-radius: 2px;
}

.mr-message.received .mr-message-bubble {
  border-bottom-left-radius: 2px;
}

.mr-message-time {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.mr-message.sent .mr-message-time {
  color: rgba(255, 255, 255, 0.7);
}

.mr-chat-input-area {
  padding: 12px;
  background: rgba(15, 11, 24, 0.9);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.mr-chat-status {
  color: #ff5252;
  font-size: 13px;
  text-align: center;
  padding: 10px;
  display: none;
}

.mr-input-wrapper {
  display: flex;
  gap: 8px;
}

.mr-chat-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 20px;
  padding: 10px 15px;
  font-size: 14px;
  outline: none;
}

.mr-chat-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.mr-send-btn {
  background: #ffd000;
  color: #41116F;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
}

.mr-send-btn:disabled {
  background: #555;
  color: #222;
  cursor: not-allowed;
}

/* Name prompt overlay */
.mr-name-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(15, 11, 24, 0.95);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  text-align: center;
}

.mr-name-overlay h4 {
  color: white;
  margin-bottom: 10px;
}

.mr-name-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 15px;
  outline: none;
  text-align: center;
}

.mr-name-save-btn {
  background: #ffd000;
  color: #41116F;
  border: none;
  padding: 10px 20px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(76, 175, 80, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(76, 175, 80, 0); }
}

/* Scrollbar styling */
.mr-chat-messages::-webkit-scrollbar {
  width: 6px;
}
.mr-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}
.mr-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.2);
  border-radius: 10px;
}
