.sidebar-menu .mentor-support-sidebar-status {
  display: none;
  float: right;
  align-items: center;
  justify-content: flex-end;
  gap: 0.4rem;
  margin-left: auto;
  padding-left: 0.75rem;
  max-width: 45%;
  flex: 0 0 auto;
  color: #16a34a;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.sidebar-menu .mentor-support-sidebar-status.is-visible {
  display: inline-flex;
}

.sidebar-menu .mentor-support-sidebar-status__dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  animation: mentor-support-sidebar-status-pulse 1.8s infinite;
}

@keyframes mentor-support-sidebar-status-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.45);
  }

  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

@media (max-width: 768px) {
  .sidebar-menu .mentor-support-sidebar-status {
    font-size: 0.72rem;
  }
}
/* Homepage right bento sidebar responsive overrides.
   Requirements:
   - Hide the right sidebar at 1279px and below
   - For 1280px–1700px: show it, but keep it NON-sticky (normal grid column)
   - Above 1700px: allow the theme's fixed/sticky behavior */

/* Default: hidden (covers <=1279px and also acts as a safety net). */
.homepage-bento-sidebar {
  display: none;
}

/* Show only on desktop (>=1280px). */
@media (min-width: 1280px) {
  .homepage-bento-sidebar {
    display: block;
  }
}

/* When the sidebar is hidden (<=1279px), remove any reserved space on the feed. */
@media (max-width: 1279px) {
  .ds-home-dashboard {
    padding-right: 0 !important;
  }
}

/* 1280px–1700px: revert to the original "in-grid" sidebar (not fixed). */
@media (min-width: 1280px) and (max-width: 1700px) {
  .ds-home-dashboard {
    padding-right: 0 !important;
  }

  .ds-home-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .ds-home-feed {
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .ds-home-right {
    position: static !important;
    right: auto !important;
    top: auto !important;
    width: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

/* Mobile: reduce iOS double-tap zoom + input focus zoom
   - Keeps pinch zoom enabled (does NOT use user-scalable=no)
   - Prevents iOS input focus zoom by ensuring font-size >= 16px
*/

@media (max-width: 768px) {
  html,
  body {
    touch-action: manipulation;
  }

  a,
  button,
  input,
  select,
  textarea,
  [role='button'] {
    touch-action: manipulation;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* Mobile reaction picker: make emoji row swipeable instead of overflowing */

@media (max-width: 768px) {
  .post-reaction-trigger {
    /* helps sticky/absolute children positioning */
    max-width: 100%;
  }

  .reaction-picker-popup {
    /* Keep popup within viewport with padding on both sides */
    max-width: calc(100vw - 32px) !important;

    /* swipe / scroll horizontally */
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    touch-action: pan-x;

    /* prevent flex wrapping; allow a single row */
    flex-wrap: nowrap !important;
    white-space: nowrap;

    /* a bit tighter on mobile */
    padding: 10px 12px !important;
    gap: 10px !important;
  }

  /* Center the little caret/arrow for the speech-bubble feel */
  .reaction-picker-popup::after,
  .reaction-picker-popup::before {
    left: 50% !important;
    transform: translateX(-50%) !important;
  }

  .reaction-picker-popup::-webkit-scrollbar {
    display: none;
  }

  .reaction-emoji-btn {
    flex: 0 0 auto;
    /* ~25% smaller than desktop */
    font-size: 1.125rem !important;
    width: 30px !important;
    height: 30px !important;
    padding: 6px !important;
  }

  /* Mobile: active emoji (left Like button) 20% smaller */
  .reaction-active-emoji {
    font-size: 22.4px !important; /* 28px * 0.8 */
    line-height: 1 !important;
    display: inline-block;
  }

  /* Mobile: shrink the reaction count chips (emoji + number) ~20% */
  .reactions-display {
    gap: 6px !important;
  }

  .reactions-display .reaction-item {
    padding: 3px 6px !important; /* was ~py-1 px-2 */
  }

  .reactions-display .reaction-item .text-lg {
    font-size: 0.9rem !important; /* 1.125rem * 0.8 */
    line-height: 1 !important;
  }

  .reactions-display .reaction-item .font-medium {
    font-size: 0.8rem !important;
    line-height: 1 !important;
  }

  /* If other templates use the "reaction-summary" styles, shrink those too */
  .reaction-summary {
    gap: 6px !important;
  }

  .summary-emoji {
    font-size: 0.96rem !important; /* 1.2rem * 0.8 */
  }

  .selected-emoji {
    font-size: 0.9rem !important; /* 1.125rem * 0.8 */
  }

  .selected-count {
    font-size: 0.96rem !important; /* 1.2rem * 0.8 */
  }
}

/* Mobile: shrink feed UI (~25%)
   Targets: avatar + author name/date + share/edit/delete + content + reactions.
   Applies across combined feed + archives (shared class names).
*/

@media (max-width: 768px) {
  /* Card padding/spacing (~25% smaller than p-6) */
  .custom-feed-item {
    padding: 18px !important; /* 24px * 0.75 */
    padding-bottom: 6px !important;
  }

  /* Keep "edge-to-edge" media aligned with the reduced padding */
  .custom-feed-item .-mx-6 {
    margin-left: -18px !important;
    margin-right: -18px !important;
  }

  .custom-feed-item .avatar-img img {
    width: 36px !important; /* 48px * 0.75 */
    height: 36px !important;
  }

  .custom-feed-item .avatar-img {
    margin-right: 12px !important; /* mr-4 (16px) * 0.75 */
  }

  .custom-feed-item > .flex.items-center.mb-4 {
    margin-bottom: 12px !important; /* 16px * 0.75 */
  }

  .custom-feed-item .font-semibold.text-lg.leading-tight {
    font-size: 14px !important; /* 18px * ~0.78 */
    line-height: 1.15 !important;
  }

  .custom-feed-item .text-gray-500.text-sm.mt-1 {
    font-size: 11px !important; /* 14px * 0.78 */
    margin-top: 2px !important;
  }

  /* Top-right tag row (Share + New/Draft) */
  .custom-feed-item .ds-feed-top-tags {
    top: 12px !important; /* top-4 (16px) * 0.75 */
    gap: 5px !important;
    max-width: 85% !important;
  }

  .custom-feed-item .ds-feed-top-tags a,
  .custom-feed-item .ds-feed-top-tags > div {
    font-size: 10px !important; /* 12px * ~0.83 */
    padding: 2px 8px !important;
    gap: 5px !important;
  }

  .custom-feed-item .ds-feed-top-tags .text-base {
    font-size: 12px !important; /* 16px * 0.75 */
    line-height: 1 !important;
  }

  /* Share pill (button + icon) */
  .custom-feed-item .ds-share-btn {
    padding: 4px 8px !important;
    gap: 6px !important;
  }
  .custom-feed-item .ds-share-btn svg {
    width: 14px !important;
    height: 14px !important;
  }
  .custom-feed-item .ds-share-btn-label {
    font-size: 10px !important;
    line-height: 1 !important;
  }

  /* Edit/Delete icons (top-right) */
  .custom-feed-item .absolute.top-4.right-4 {
    top: 12px !important;
    right: 12px !important;
    gap: 6px !important;
  }
  .custom-feed-item .edit-post-btn svg,
  .custom-feed-item .delete-post-btn svg {
    width: 18px !important;
    height: 18px !important;
  }

  /* Post body text */
  .custom-feed-item .annc-content,
  .custom-feed-item .annc-content .prose {
    font-size: 13px !important; /* ~16px * 0.8 (more readable than 12px) */
    line-height: 1.35 !important;
  }
  .custom-feed-item .annc-content p {
    margin-bottom: 0.6em !important;
  }

  /* "See more" button */
  .custom-feed-item .annc-see-more {
    padding: 0.28rem 0.5rem !important;
    font-size: 0.675rem !important;
    line-height: 1 !important;
  }

  /* Reactions row */
  .custom-feed-item .reaction-picker-btn {
    font-size: 0.875rem !important; /* ~18px * 0.78 */
    line-height: 1.1 !important;
    gap: 6px !important;
  }
  .custom-feed-item .reaction-picker-btn svg {
    width: 14px !important;
    height: 14px !important;
  }
  .custom-feed-item .reaction-picker-btn .text-lg {
    font-size: 0.95rem !important;
    line-height: 1 !important;
  }
  .custom-feed-item .reactions-display {
    gap: 6px !important;
    font-size: 12px !important;
  }
  .custom-feed-item .reactions-display .reaction-item {
    padding: 2px 6px !important;
  }
  .custom-feed-item .reactions-display .reaction-item .text-lg {
    font-size: 0.9rem !important;
    line-height: 1 !important;
  }
  .custom-feed-item .reactions-display .reaction-item .font-medium {
    font-size: 0.75rem !important;
    line-height: 1 !important;
  }
}

/* Tablet + down: shrink the "Live training" countdown bento.
   Targets the bento with id `live-webinar-bento` and the countdown shortcode output inside it.
*/

@media (max-width: 1024px) {
  /* Reduce orange bento padding so it doesn't eat vertical space */
  body.home #live-webinar-bento {
    padding-top: 0.6rem !important;
    padding-bottom: 0.6rem !important;
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  /* Layout: keep title + timer on one row */
  body.home #live-webinar-bento .ds-live-webinar-head {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 0.65rem !important;
  }

  /* Title: force "Live Training" onto one line */
  body.home #live-webinar-bento h2 {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.25rem !important;
    margin: 0 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }
  body.home #live-webinar-bento .ds-live-webinar-title-top,
  body.home #live-webinar-bento .ds-live-webinar-title-bottom {
    display: inline !important;
    font-size: 1.15rem !important;
    line-height: 1.05 !important;
    margin: 0 !important;
  }

  body.home #live-webinar-bento .ds-live-webinar-timer {
    flex: 0 0 auto;
    width: auto !important;
  }

  /* Hide the shortcode title (it adds height on some templates) */
  body.home #live-webinar-bento .countdown-title {
    display: none !important;
  }

  /* Remove default wrapper margins from the shortcode */
  body.home #live-webinar-bento .countdown-wrapper {
    margin: 0 !important;
  }

  /* Tighten timer layout */
  body.home #live-webinar-bento .countdown-timer {
    flex-wrap: nowrap !important;
    justify-content: flex-end !important;
    gap: 0.4rem !important;
  }

  body.home #live-webinar-bento .countdown-segment {
    min-width: 48px !important;
    padding: 0.18rem 0.28rem !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  body.home #live-webinar-bento .countdown-segment .value {
    display: block !important;
    font-size: 15px !important;
    line-height: 0.95 !important;
    height: auto !important;
    margin: 0 0 3px 0 !important;
    padding: 0 !important;
  }

  body.home #live-webinar-bento .countdown-segment .label {
    display: block !important;
    font-size: 9px !important;
    line-height: 0.95 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
  }

  /* Live state pill (when the meeting is live) */
  body.home #live-webinar-bento .live-indicator {
    padding: 10px 14px !important;
    border-radius: 9999px !important;
  }
  body.home #live-webinar-bento .live-text {
    font-size: 0.95rem !important;
    letter-spacing: 0.3px !important;
  }
}

/* Mobile: shrink a bit further */
@media (max-width: 768px) {
  body.home #live-webinar-bento .countdown-timer {
    gap: 0.35rem !important;
  }

  body.home #live-webinar-bento .countdown-segment {
    min-width: 44px !important;
    padding: 0.16rem 0.24rem !important;
  }

  body.home #live-webinar-bento .countdown-segment .value {
    font-size: 14px !important;
    margin-bottom: 3px !important;
  }

  body.home #live-webinar-bento .countdown-segment .label {
    font-size: 9px !important;
  }
}


/* Very small phones: keep it compact without wrapping */
@media (max-width: 420px) {
  body.home #live-webinar-bento {
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
  }

  body.home #live-webinar-bento .ds-live-webinar-title-top,
  body.home #live-webinar-bento .ds-live-webinar-title-bottom {
    font-size: 1.05rem !important;
  }

  body.home #live-webinar-bento .countdown-segment {
    min-width: 42px !important;
  }
}

