/* ============================================
   Sunshine (WoWonder) – Facebook-style mobile UI
   ============================================ */

/* ---- Mobile Bottom Navigation ---- */
.fb-mobile-bottom-nav {
  display: none;
  position: fixed !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 99999 !important;
  height: 56px;
  background: #ffffff !important;
  border-top: 1px solid #ccd0d5;
  box-shadow: 0 -2px 10px rgba(0,0,0,0.12);
  padding-bottom: env(safe-area-inset-bottom, 0);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Poppins', sans-serif;
}

.fb-mobile-bottom-nav ul {
  display: flex;
  align-items: stretch;
  justify-content: space-around;
  height: 56px;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.fb-mobile-bottom-nav li {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
}

.fb-mobile-bottom-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  color: #65676b !important;
  text-decoration: none !important;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
  padding: 6px 2px 4px;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

.fb-mobile-bottom-nav a svg {
  width: 24px;
  height: 24px;
  margin-bottom: 2px;
  flex-shrink: 0;
}

.fb-mobile-bottom-nav a span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.fb-mobile-bottom-nav a.active,
.fb-mobile-bottom-nav a:hover {
  color: #1877f2 !important;
}

.fb-mobile-bottom-nav a.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: #1877f2;
}

/* Center Create button */
.fb-mobile-bottom-nav .nav-create a {
  color: #fff !important;
}
.fb-mobile-bottom-nav .nav-create .create-btn {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #000000;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 12px rgba(0,0,0,0.35);
  margin-top: -12px;
  border: 3px solid #fff;
}
.fb-mobile-bottom-nav .nav-create .create-btn svg {
  width: 22px;
  height: 22px;
  margin: 0;
}
.fb-mobile-bottom-nav .nav-create span { display: none; }

/* Badge */
.fb-mobile-bottom-nav .nav-badge {
  position: absolute;
  top: 2px;
  right: calc(50% - 20px);
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: #e41e3f;
  color: #fff !important;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 0 0 2px #fff;
}

/* Show on mobile / tablet */
@media (max-width: 991px) {
  .fb-mobile-bottom-nav {
    display: block !important;
  }

  body.has-fb-bottom-nav {
    padding-bottom: 70px !important;
  }

  body.has-fb-bottom-nav footer,
  body.has-fb-bottom-nav .footer-wrapper,
  body.has-fb-bottom-nav .second-footer {
    margin-bottom: 60px !important;
  }

  /* Lift chat toggle above bar */
  .chat-container .online-toggle,
  .chat-tab,
  #chat-app {
    bottom: 70px !important;
  }
}

/* Dark mode */
body.night-mode .fb-mobile-bottom-nav,
html[data-theme="dark"] .fb-mobile-bottom-nav,
.dark-mode .fb-mobile-bottom-nav,
body.mode-night .fb-mobile-bottom-nav {
  background: #242526 !important;
  border-top-color: #3a3b3c;
}
body.night-mode .fb-mobile-bottom-nav a,
html[data-theme="dark"] .fb-mobile-bottom-nav a,
.dark-mode .fb-mobile-bottom-nav a {
  color: #b0b3b8 !important;
}
body.night-mode .fb-mobile-bottom-nav a.active,
html[data-theme="dark"] .fb-mobile-bottom-nav a.active,
.dark-mode .fb-mobile-bottom-nav a.active {
  color: #2d88ff !important;
}
body.night-mode .fb-mobile-bottom-nav .nav-create .create-btn,
html[data-theme="dark"] .fb-mobile-bottom-nav .nav-create .create-btn,
.dark-mode .fb-mobile-bottom-nav .nav-create .create-btn {
  border-color: #242526;
}
body.night-mode .fb-mobile-bottom-nav .nav-badge,
html[data-theme="dark"] .fb-mobile-bottom-nav .nav-badge,
.dark-mode .fb-mobile-bottom-nav .nav-badge {
  box-shadow: 0 0 0 2px #242526;
}

/* Hide on messages full-screen if needed */
body.page-messages .fb-mobile-bottom-nav {
  display: none !important;
}

/* ---- Facebook-like feed polish (mobile) ---- */
@media (max-width: 991px) {
  .post,
  .wo_post,
  .wow_content,
  .user-post {
    border-radius: 10px !important;
    margin-bottom: 8px !important;
    overflow: hidden;
  }

  .story-container,
  .user-status-home,
  .stories-wrapper,
  .status-list {
    padding: 10px 0 !important;
  }

  .publisher-box,
  .wo_pubbox {
    border-radius: 12px !important;
  }
}


/* ---- Create (+) dropdown menu ---- */
.fb-mobile-bottom-nav .nav-create {
  position: relative;
}

.fb-create-dropdown {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  min-width: 200px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18), 0 0 0 1px rgba(0,0,0,0.06);
  padding: 8px;
  z-index: 100000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.fb-create-dropdown.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.fb-create-dropdown[hidden] {
  display: none !important;
}

.fb-create-dropdown.open[hidden] {
  display: block !important;
}

.fb-dd-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  border-radius: 10px;
  color: #050505 !important;
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  text-decoration: none !important;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.fb-dd-item:hover,
.fb-dd-item:active {
  background: #f0f2f5;
}

.fb-dd-item svg {
  flex-shrink: 0;
  color: #050505;
}

body.night-mode .fb-create-dropdown,
html[data-theme="dark"] .fb-create-dropdown,
.dark-mode .fb-create-dropdown {
  background: #242526;
  box-shadow: 0 8px 28px rgba(0,0,0,0.45), 0 0 0 1px #3a3b3c;
}

body.night-mode .fb-dd-item,
html[data-theme="dark"] .fb-dd-item,
.dark-mode .fb-dd-item {
  color: #e4e6eb !important;
}

body.night-mode .fb-dd-item:hover,
html[data-theme="dark"] .fb-dd-item:hover,
.dark-mode .fb-dd-item:hover {
  background: #3a3b3c;
}

body.night-mode .fb-dd-item svg,
html[data-theme="dark"] .fb-dd-item svg,
.dark-mode .fb-dd-item svg {
  color: #e4e6eb;
}
