/* Live Messaging & Instant Chat Styles (Pink & White Theme) */
.live-chat-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(28, 24, 36, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.live-chat-modal.open {
  opacity: 1;
  visibility: visible;
}

.chat-box-container {
  width: 100%;
  max-width: 480px;
  height: 82vh;
  max-height: 680px;
  background: #ffffff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 -12px 40px rgba(212, 69, 122, 0.2);
  border: 1px solid #f0dce6;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.live-chat-modal.open .chat-box-container {
  transform: translateY(0);
}

.chat-box-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(135deg, #e8538b 0%, #d4457a 100%);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(212, 69, 122, 0.25);
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-avatar {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: grid;
  place-items: center;
  font-size: 18px;
}

.chat-header-avatar .online-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #2bdd72;
  border: 2px solid #e8538b;
}

.chat-title {
  font-weight: 800;
  font-size: 1rem;
  margin: 0;
  letter-spacing: 0.2px;
}

.chat-subtitle {
  font-size: 0.7rem;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 4px;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.35);
}

.chat-messages-body {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff0f5;
  scrollbar-width: thin;
  scrollbar-color: #d4457a transparent;
}

.chat-msg-row {
  display: flex;
  flex-direction: column;
  max-width: 82%;
}

.chat-msg-row.sent {
  align-self: flex-end;
  align-items: flex-end;
}

.chat-msg-row.received {
  align-self: flex-start;
  align-items: flex-start;
}

.chat-msg-author {
  font-size: 0.65rem;
  color: #7a6070;
  margin-bottom: 2px;
  font-weight: 700;
  padding: 0 4px;
}

.chat-msg-bubble {
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.4;
  word-break: break-word;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.chat-msg-row.sent .chat-msg-bubble {
  background: linear-gradient(135deg, #e8538b 0%, #d4457a 100%);
  color: #ffffff;
  border-bottom-right-radius: 4px;
}

.chat-msg-row.received .chat-msg-bubble {
  background: #ffffff;
  color: #1c1824;
  border: 1px solid #f0dce6;
  border-bottom-left-radius: 4px;
}

.chat-msg-time {
  font-size: 0.58rem;
  color: #9c8090;
  margin-top: 3px;
}

.chat-input-footer {
  padding: 10px 14px;
  background: #ffffff;
  border-top: 1px solid #f0dce6;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chat-input-field {
  flex: 1;
  background: #fff0f5;
  border: 1px solid #f8bbd0;
  color: #1c1824;
  padding: 10px 14px;
  border-radius: 20px;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.chat-input-field:focus {
  border-color: #d4457a;
  box-shadow: 0 0 8px rgba(212, 69, 122, 0.2);
}

.chat-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8538b 0%, #d4457a 100%);
  border: none;
  color: #ffffff;
  font-size: 15px;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 4px 12px rgba(212, 69, 122, 0.3);
  transition: transform 0.15s;
}

.chat-send-btn:active {
  transform: scale(0.92);
}

/* Guest Login Prompt Overlay inside Messenger */
.chat-auth-prompt {
  text-align: center;
  padding: 30px 20px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #f0dce6;
  box-shadow: 0 4px 16px rgba(212, 69, 122, 0.1);
  margin: auto 10px;
}
.chat-auth-prompt h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: #d4457a;
  font-weight: 800;
}
.chat-auth-prompt p {
  font-size: 0.82rem;
  color: #7a6070;
  margin: 0 0 16px;
  line-height: 1.4;
}
.chat-auth-btns {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.chat-auth-btn {
  padding: 10px 18px;
  border-radius: 12px;
  font-weight: 800;
  font-size: 0.8rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.chat-auth-btn.login {
  background: linear-gradient(135deg, #e8538b, #d4457a);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(212, 69, 122, 0.3);
}
.chat-auth-btn.register {
  background: #fff0f5;
  color: #d4457a;
  border: 1px solid #f8bbd0;
}

