/* =======================================
   Live Post Chat - Inline Dark CelebNews
   ======================================= */

#lpc-chat-wrapper {
  background-color: #111111;
  border: 1px solid #1b1b1b;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 850px;
  margin: 30px auto;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
  font-family: "Roboto", sans-serif;
}

/* -------------------------
   Header Bar (Solid Blue)
   ------------------------- */
#lpc-chat-header {
  background: #27436E;
  color: #ffffff;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 18px;
  text-align: center;
  padding: 14px 0;
  border-bottom: 3px solid #111;
  flex-shrink: 0;
  position: relative;
}

/* 🔴 Live Dot */
.lpc-live-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  background: #ff2b2b;
  border-radius: 50%;
  margin-right: 8px;
  position: relative;
  top: -1px;
  box-shadow: 0 0 8px #ff2b2b;
  animation: pulse 1.3s infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.5);
    opacity: 0.7;
  }
}

/* -------------------------
   Message Area
   ------------------------- */
#lpc-messages-container {
  background: #0e0e0e;
  padding: 15px;
  height: 450px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: #444 #111;
}

#lpc-messages-container::-webkit-scrollbar {
  width: 6px;
}

#lpc-messages-container::-webkit-scrollbar-thumb {
  background-color: #444;
  border-radius: 6px;
}

/* Individual Message */
.lpc-message {
  display: flex;               /* avatar left, message content right */
  align-items: flex-start;     /* top align message with avatar */
  margin-bottom: 10px;
  gap: 10px;                   /* space between avatar and message */
  animation: fadeIn 0.25s ease-in;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Avatar */
.lpc-message img {
  border-radius: 50%;
  width: 32px;
  height: 32px;
  border: 2px solid #27436E;
  flex-shrink: 0;
}

/* Message content wrapper: inline username + message */
.lpc-content {
  display: flex;
  align-items: baseline;   /* username & message on same line */
  gap: 6px;
  flex-wrap: wrap;         /* long messages wrap nicely */
}

/* Username */
.lpc-user {
  color: #bfc8d1;
  font-weight: 700;
}

.lpc-user::after {
  content: ":";
  margin-left: 2px;
  color: #bfc8d1;
}

/* Message text inline with username */
.lpc-text {
  color: #e6e6e6;
  line-height: 1.4;
  word-wrap: break-word;
}

/* Timestamp small and subtle */
.lpc-time {
  color: #777;
  font-size: 11px;
  margin-left: 6px;
}

/* Self message subtle highlight */
.lpc-self .lpc-text {
  color: #fff;
  background: #27436E;
  padding: 4px 8px;
  border-radius: 6px;
}

/* -------------------------
   Input Area
   ------------------------- */
#lpc-input-area {
  display: flex;
  border-top: 1px solid #1e1e1e;
  background: #191919;
  padding: 10px;
  align-items: center;
}

#lpc-input {
  flex: 1;
  background: #0f0f0f;
  color: #eee;
  border: 1px solid #333;
  border-radius: 8px;
  padding: 10px;
  resize: none;
  height: 45px;
  font-size: 14px;
  transition: border 0.3s ease;
}

#lpc-input:focus {
  outline: none;
  border-color: #27436E;
}

#lpc-send {
  background: #27436E;
  color: #fff;
  border: none;
  border-radius: 8px;
  margin-left: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.3s ease;
  font-size: 16px;
}

#lpc-send:hover {
  background: #1f365b;
}

/* -------------------------
   Login Prompt
   ------------------------- */
.lpc-login-prompt {
  background: #1a1a1a;
  text-align: center;
  color: #ccc;
  font-size: 14px;
  padding: 20px;
}

.lpc-login-prompt a {
  color: #DD0000;
  font-weight: 600;
  text-decoration: none;
}

.lpc-login-prompt a:hover {
  text-decoration: underline;
}

/* -------------------------
   Mobile Optimization
   ------------------------- */
@media (max-width: 768px) {
  #lpc-chat-wrapper {
    max-width: 95%;
  }

  #lpc-chat-header {
    font-size: 16px;
    padding: 12px 0;
  }

  #lpc-input {
    height: 40px;
  }

  #lpc-send {
    padding: 8px 14px;
  }

  .lpc-message img {
    width: 28px;
    height: 28px;
  }
}
