/* Custom Styles for Social Market & Chat (Facebook Style) */
@import url('https://fonts.googleapis.com/css2?family=Segoe+UI:wght@400;500;600;700&display=swap');

:root {
  --fb-primary: #1877f2;
  --fb-primary-hover: #166fe5;
  --fb-bg: #f0f2f5;
  --fb-card: #ffffff;
  --fb-text: #050505;
  --fb-text-muted: #65676b;
  --fb-border: #ced0d4;
  --fb-input-bg: #f0f2f5;
  --fb-hover-bg: #e4e6eb;
  --fb-green: #31a24c;
}

html, body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--fb-bg);
  color: var(--fb-text);
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
}

/* Custom Scrollbar like Facebook */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #bcc0c4;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: #9aa0a6;
}

/* Chat bubble styling */
.chat-bubble-me {
  background-color: #0084ff;
  color: white;
  border-bottom-right-radius: 4px;
}
.chat-bubble-other {
  background-color: #e4e6eb;
  color: #050505;
  border-bottom-left-radius: 4px;
}

/* Pulse animation for online indicator */
.online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background-color: #31a24c;
  border: 2px solid white;
  border-radius: 50%;
}

/* Active navigation tab indicator */
.nav-tab-active {
  color: #1877f2;
  border-bottom: 3px solid #1877f2;
}

/* Truncate text multi-line */
.line-clamp-1 {
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Smooth transition */
.transition-fast {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================= MOBILE RESPONSIVE FIXES ================= */
/* 1. Tuyệt đối ẩn Right Sidebar trên Mobile/Tablet (< 1280px) để không bị bóp nghẹt trang */
@media (max-width: 1279px) {
  #feed-right-sidebar {
    display: none !important;
  }
}

/* 2. Ẩn Left Sidebar trên màn hình < 1024px */
@media (max-width: 1023px) {
  aside:not(#feed-right-sidebar) {
    display: none !important;
  }
}

/* 3. Main container chiếm trọn 100% bề ngang trên Mobile */
@media (max-width: 768px) {
  main {
    width: 100% !important;
    max-width: 100% !important;
    flex: 1 1 100% !important;
  }

  /* Tránh tràn thanh header trên mobile */
  header {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  /* Đệm chân trang để không bị thanh công cụ hoặc badge Netlify che */
  body {
    padding-bottom: 4.5rem !important;
  }

  /* Tối ưu chiều cao và viền bo của Messenger trên mobile */
  #view-messenger {
    height: calc(100vh - 5.5rem) !important;
    border-radius: 1.25rem !important;
  }
}


