/* V32 — SEARCH + ADMIN MESSAGE MOBILE ONLY
   Scope is intentionally limited. Bottom navigation/menu selectors are not used. */

/* Mobile search: the entire outer search strip uses exactly the same surface
   as the search input. Only focus adds a visible border/glow. */
@media (max-width:767px){
  .sidebar-menu .search-box-area,
  .sidebar-menu .search-box-area.v3-search-area{
    background:var(--input-bg) !important;
    border:1px solid transparent !important;
    box-shadow:none !important;
    transition:border-color .16s ease, box-shadow .16s ease !important;
  }
  .sidebar-menu .search-box-area:focus-within{
    border-color:var(--primary,#25D366) !important;
    box-shadow:0 0 0 2px color-mix(in srgb,var(--primary,#25D366) 24%,transparent) !important;
  }
  .sidebar-menu .search-box-area .v3-search-input,
  .sidebar-menu .search-box-area .search-input,
  .sidebar-menu .search-box-area #searchInput{
    background:transparent !important;
  }

  :root[data-theme="dark"] .sidebar-menu .search-box-area,
  body[data-theme="dark"] .sidebar-menu .search-box-area,
  :root[data-theme="dark"] .sidebar-menu .search-box-area.v3-search-area,
  body[data-theme="dark"] .sidebar-menu .search-box-area.v3-search-area{
    background:#202c33 !important;
  }

  /* Admin message management: keep message text on one line while reserving
     enough width for every action. */
  body.admin-open #messagesPane .admin-table th,
  body.admin-open #messagesPane .admin-table td{
    padding:6px 2px !important;
  }
  body.admin-open #messagesPane .admin-table th:nth-child(1),
  body.admin-open #messagesPane .admin-table td:nth-child(1){width:12% !important;}
  body.admin-open #messagesPane .admin-table th:nth-child(2),
  body.admin-open #messagesPane .admin-table td:nth-child(2){width:27% !important;}
  body.admin-open #messagesPane .admin-table th:nth-child(3),
  body.admin-open #messagesPane .admin-table td:nth-child(3){width:16% !important;}
  body.admin-open #messagesPane .admin-table th:nth-child(4),
  body.admin-open #messagesPane .admin-table td:nth-child(4){width:8% !important;}
  body.admin-open #messagesPane .admin-table th:nth-child(5),
  body.admin-open #messagesPane .admin-table td:nth-child(5){width:37% !important;}

  body.admin-open #messagesPane .admin-message-content-cell,
  body.admin-open #messagesPane .admin-message-content-cell *,
  body.admin-open #messagesPane .admin-table td:nth-child(2){
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    min-width:0 !important;
  }

  body.admin-open #messagesPane .admin-message-actions{
    display:flex !important;
    flex-wrap:nowrap !important;
    gap:1px !important;
    width:100% !important;
    min-width:0 !important;
    justify-content:space-between !important;
    overflow:visible !important;
  }
  body.admin-open #messagesPane .admin-action-button{
    flex:1 1 0 !important;
    width:auto !important;
    min-width:0 !important;
    height:22px !important;
    min-height:22px !important;
    padding:0 !important;
    font-size:0 !important;
    border-radius:5px !important;
  }
  body.admin-open #messagesPane .admin-action-button::before{
    width:11px !important;
    height:11px !important;
  }
}
