/* Recent Searches Dropdown for Agrodrip / BurnEngine */
.tb_recent_searches {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1002;
  display: none;
  width: 100%;
  min-width: 260px;
  max-width: 100%;
  margin: 3px 0 0 0;
  padding: 0;
  background-color: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 4px;
  -webkit-box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  overflow: hidden;
  box-sizing: border-box;
  text-align: left;
}

.tb_recent_header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #ebebeb;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: #717171;
  letter-spacing: 0.5px;
  user-select: none;
}

.tb_recent_header .tb_recent_title {
  display: flex;
  align-items: center;
}

.tb_recent_header .tb_recent_title i {
  margin-right: 6px;
  color: #8c8c8c;
  font-size: 12px;
}

.tb_recent_list {
  max-height: 280px;
  overflow-y: auto;
  padding: 4px 0;
  margin: 0;
  list-style: none;
}

.tb_recent_item {
  display: flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.4;
  color: #333333;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb_recent_item i {
  margin-right: 10px;
  color: #a0a0a0;
  font-size: 12px;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}

.tb_recent_item .tb_recent_query {
  flex-grow: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tb_recent_item .tb_recent_query mark {
  background: transparent;
  color: #b92616;
  font-weight: 700;
  padding: 0;
}

.tb_recent_item:hover,
.tb_recent_item.active {
  background-color: #f2f5f7;
  color: #b92616;
  text-decoration: none;
}

.tb_recent_item:hover i,
.tb_recent_item.active i {
  color: #b92616;
}

.tb_recent_empty {
  padding: 12px 14px;
  font-size: 12px;
  color: #999999;
  font-style: italic;
  text-align: center;
}

/* Responsive adjustment for mobile search */
@media (max-width: 768px) {
  .tb_recent_searches {
    position: absolute;
    width: 100% !important;
    left: 0 !important;
    right: 0 !important;
  }
}
