/* =====================================
   CATTLEMANIA CHAT CENTER
   NEW LAYOUT STYLE
===================================== */

.chat-wrapper {
  display: grid;

  grid-template-columns: 280px 1fr 280px;

  gap: 15px;

  padding: 15px;
}

/* =====================================
   GENERAL PANELS
===================================== */

.user-panel,
.chat-panel,
.private-panel {
  background: linear-gradient(180deg, #111827, #080d18);

  border: 1px solid #273449;

  border-radius: 14px;

  box-shadow: 0 0 20px rgba(0, 0, 0, 0.35);

  overflow: hidden;
}

/* =====================================
   ONLINE USERS
===================================== */

.user-panel h3 {
  margin: 0;

  padding: 15px;

  background: #0f172a;

  color: #38bdf8;

  font-size: 15px;

  border-bottom: 1px solid #273449;
}

/* =====================================
   ONLINE USERS PANEL
===================================== */

.user-panel {
  margin-top: 15px;
}

.user-panel .panel-header {
  background: linear-gradient(135deg, #0f172a, #166534);

  color: white;

  padding: 12px 15px;

  font-weight: bold;

  border-bottom: 1px solid #273449;
}

/* ONLINE COUNT */

.online-stats {
  background: #0b1220;

  padding: 8px 15px;

  color: #94a3b8;

  font-size: 13px;

  border-bottom: 1px solid #273449;
}

/* USER LIST */

.user-list {
  display: flex;

  flex-direction: column;

  gap: 8px;

  padding: 10px;
}

/* USER CARD */

.user-card {
  display: flex;

  align-items: center;

  gap: 10px;

  padding: 10px;

  background: #111827;

  border: 1px solid #273449;

  border-radius: 10px;

  cursor: pointer;

  transition: 0.2s;
}

.user-card:hover {
  background: #172554;

  border-color: #38bdf8;

  transform: translateX(3px);
}

/* GREEN ONLINE DOT */

.user-status {
  width: 10px;

  height: 10px;

  background: #22c55e;

  border-radius: 50%;

  box-shadow: 0 0 8px #22c55e;
}

/* USER INFO */

.user-info {
  display: flex;

  flex-direction: column;
}

.user-name {
  color: white;

  font-weight: bold;

  font-size: 14px;
}

.user-ranch {
  color: #94a3b8;

  font-size: 12px;
}
/* PM GUIDE BUTTON */

.pm-how-link {
  text-align: center;

  padding: 10px;

  color: #38bdf8;

  font-size: 12px;

  cursor: pointer;

  background: #0b1220;
}

.pm-how-link:hover {
  color: white;
}

/* =====================================
   CHAT CENTER
===================================== */

.chat-panel {
  display: flex;

  flex-direction: column;

  min-height: 650px;
}

.chat-header {
  padding: 15px;

  display: flex;

  justify-content: space-between;

  background: #0f172a;

  border-bottom: 1px solid #273449;

  font-weight: bold;
}

#dmStatus {
  color: #38bdf8;
}

/* PINNED MESSAGE */

.pinned-box {
  margin: 15px;

  padding: 12px;

  background: #0b1220;

  border: 1px solid #273449;

  border-radius: 10px;
}

.pinned-title {
  color: #38bdf8;

  font-size: 13px;

  margin-bottom: 8px;
}

.pinned-msg {
  background: #111827;

  padding: 10px;

  border-left: 3px solid #dc2626;

  border-radius: 8px;

  font-size: 13px;
}

/* =====================================
   CHAT MESSAGES
===================================== */

.messages {
  flex: 1;

  padding: 15px;

  overflow-y: auto;
}

.msg {
  max-width: 70%;

  margin-bottom: 12px;

  padding: 12px;

  background: #0f172a;

  border: 1px solid #273449;

  border-radius: 12px;
}

.msg.me {
  margin-left: auto;

  background: #172554;

  border-color: #38bdf8;
}

.msg small {
  display: block;

  margin-top: 5px;

  color: #94a3b8;

  font-size: 11px;
}

/* PRIVATE MESSAGE */

.private-msg {
  background: #172554;

  border: 2px solid #38bdf8;
}

.private-msg::before {
  content: "🔒 Private Message";

  display: block;

  color: #38bdf8;

  font-size: 12px;

  margin-bottom: 5px;
}

/* =====================================
   INPUT AREA
===================================== */

.input-box {
  display: flex;

  gap: 10px;

  padding: 15px;

  background: #0f172a;

  border-top: 1px solid #273449;
}

#chatModeLabel {
  background: #111827;

  padding: 10px;

  border-radius: 8px;

  color: #38bdf8;

  font-size: 12px;
}

.private-mode-label {
  background: #172554 !important;

  border: 1px solid #38bdf8;

  color: white !important;
}

.input-box input {
  flex: 1;

  background: #020617;

  border: 1px solid #273449;

  border-radius: 8px;

  padding: 12px;

  color: white;
}

.input-box button {
  background: #dc2626;

  border: none;

  border-radius: 8px;

  padding: 12px 20px;

  color: white;

  cursor: pointer;
}

.input-box button:hover {
  background: #b91c1c;
}

/* =====================================
   PRIVATE MESSAGE PANEL
===================================== */

.private-panel {
  padding: 15px;
}

.private-header {
  padding: 12px;

  background: #0f172a;

  border-radius: 10px;

  border: 1px solid #273449;

  color: white;

  font-weight: bold;

  margin-bottom: 15px;
}

.private-chat-card {
  background: #111827;

  border: 1px solid #273449;

  border-radius: 10px;

  padding: 12px;

  margin-bottom: 10px;
}

.private-chat-card:hover {
  border-color: #38bdf8;
}

/* =====================================
   MODAL
===================================== */

.pm-modal {
  display: none;

  position: fixed;

  inset: 0;

  background: rgba(0, 0, 0, 0.7);

  z-index: 9999;
}

.pm-modal-box {
  width: 700px;

  max-width: 90%;

  margin: 50px auto;

  background: #0f172a;

  border: 1px solid #38bdf8;

  border-radius: 14px;

  padding: 25px;
}

.pm-modal-box h2 {
  color: #38bdf8;
}

.pm-modal-box button {
  width: 100%;

  padding: 12px;

  margin-top: 15px;

  background: #dc2626;

  border: none;

  color: white;

  border-radius: 8px;
}

/* =====================================
   MOBILE
===================================== */

@media (max-width: 1100px) {
  .chat-wrapper {
    grid-template-columns: 1fr;
  }

  .user-panel {
    height: 200px;
  }

  .chat-panel {
    min-height: 600px;
  }

  .private-panel {
    min-height: 250px;
  }

  .user-list {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (max-width: 600px) {
  .user-list {
    grid-template-columns: repeat(3, 1fr);
  }
  .input-box {
    flex-wrap: wrap;
  }

  #chatModeLabel {
    width: 100%;

    text-align: center;
  }

  .input-box button {
    width: 100%;
  }

  .msg {
    max-width: 90%;
  }
}
.chat-mode-button {
  cursor: pointer;

  user-select: none;
}
.delete-pm-btn {
  background: #dc2626;

  color: white;

  border: none;

  border-radius: 6px;

  padding: 6px 12px;

  cursor: pointer;

  margin-left: 6px;
}

.delete-pm-btn:hover {
  background: #991b1b;
}
.chat-news-panel {
  background: linear-gradient(180deg, #111827, #080d18);

  border: 1px solid #273449;

  border-radius: 14px;

  padding: 15px;

  margin: 15px;
}

.chat-news-header {
  color: #38bdf8;

  font-size: 18px;

  font-weight: bold;

  margin-bottom: 15px;
}
.chat-news-list {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 10px;
}
.chat-news-item {
  background: #0b1220;

  border: 1px solid #273449;

  border-radius: 10px;

  padding: 12px;

  margin-bottom: 10px;
}

.chat-news-title {
  color: white;

  font-weight: bold;
}

.chat-news-message {
  color: #cbd5e1;

  margin-top: 5px;
}

.chat-news-item small {
  color: #94a3b8;
}
@media (max-width: 700px) {
  .chat-news-list {
    grid-template-columns: 1fr;
  }
}

/* =====================================
   CHAT CONTROL PANEL
===================================== */

.chat-control-panel {
  background: linear-gradient(180deg, #111827, #080d18);

  border: 1px solid #273449;

  border-radius: 14px;

  padding: 15px;

  margin: 15px;
}

.chat-control-header {
  color: #38bdf8;

  font-size: 18px;

  font-weight: bold;

  margin-bottom: 15px;
}

/* CONTROL BUTTON GRID */

.chat-control-panel {
  display: grid;

  grid-template-columns: repeat(2, 1fr);

  gap: 10px;
}

/* HEADER SPANS FULL WIDTH */

.chat-control-header {
  grid-column: 1 / -1;
}

/* BUTTON STYLE */

.chat-control-panel a {
  display: flex;

  align-items: center;

  justify-content: center;

  min-height: 55px;

  background: #0b1220;

  border: 1px solid #273449;

  border-radius: 10px;

  color: #cbd5e1;

  text-decoration: none;

  font-weight: 600;

  font-size: 14px;

  transition: 0.25s;
}

/* HOVER */

.chat-control-panel a:hover {
  background: #172554;

  border-color: #38bdf8;

  color: white;

  transform: translateY(-3px);
}

/* INDIVIDUAL COLORS */

.chat-control-panel a:nth-child(2) {
  border-left: 4px solid #22c55e;
}

.chat-control-panel a:nth-child(3) {
  border-left: 4px solid #38bdf8;
}

.chat-control-panel a:nth-child(4) {
  border-left: 4px solid #f59e0b;
}

.chat-control-panel a:nth-child(5) {
  border-left: 4px solid #dc2626;
}

.chat-control-panel a:nth-child(6) {
  border-left: 4px solid #a855f7;
}

/* MOBILE */

@media (max-width: 700px) {
  .chat-control-panel {
    grid-template-columns: 1fr;
  }
}
/* ==========================================
   SHARED CATTLE CHAT CARD
========================================== */

.chat-cattle-card {
  background: linear-gradient(180deg, #111827, #0b1220);

  border: 1px solid #38bdf8;

  padding: 12px;

  margin-top: 10px;

  border-radius: 12px;

  color: white;

  max-width: 280px;

  box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);

  position: relative;

  overflow: hidden;
}

/* TOP ACCENT */

.chat-cattle-card::before {
  content: "";

  position: absolute;

  top: 0;

  left: 0;

  width: 100%;

  height: 3px;

  background: #38bdf8;
}

/* ==========================================
   CATTLE HEADER
========================================== */

.cattle-card-header {
  display: flex;

  flex-direction: column;

  margin-bottom: 10px;
}

.cattle-card-header strong {
  color: #38bdf8;

  font-size: 16px;
}

.cattle-card-header span {
  color: #94a3b8;

  font-size: 13px;

  margin-top: 3px;
}

/* ==========================================
   CATTLE STATS
========================================== */

.cattle-card-stats {
  display: grid;

  grid-template-columns: 1fr;

  gap: 5px;

  background: #020617;

  border: 1px solid #273449;

  border-radius: 8px;

  padding: 8px;

  margin-bottom: 10px;
}

.cattle-card-stats div {
  color: #e5e7eb;

  font-size: 13px;
}

/* ==========================================
   OPTIONAL IMAGE
========================================== */

.chat-cattle-card img {
  width: 100%;

  height: 100px;

  object-fit: cover;

  border-radius: 8px;

  margin-bottom: 10px;
}

/* ==========================================
   ACTION BUTTONS
========================================== */

.chat-cattle-card button {
  display: inline-flex;

  align-items: center;

  justify-content: center;

  width: 31%;

  height: 32px;

  margin: 5px 1% 0 0;

  padding: 0;

  border-radius: 8px;

  cursor: pointer;

  font-size: 11px;

  font-weight: bold;

  white-space: nowrap;

  background: #0f172a;

  color: white;

  border: 1px solid #273449;

  transition: 0.2s;
}

.chat-cattle-card button:last-child {
  margin-right: 0;
}

/* BUTTON HOVER */

.chat-cattle-card button:hover {
  transform: translateY(-2px);

  background: #172554;
}

/* VIEW BUTTON */

.chat-cattle-card button:first-of-type {
  border-color: #22c55e;
}

/* OFFER BUTTON */

.chat-cattle-card button:nth-of-type(2) {
  border-color: #facc15;
}

/* WISHLIST BUTTON */

.chat-cattle-card button:nth-of-type(3) {
  border-color: #f472b6;
}
