* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style: none;
}

#custom-search-loading {
  text-align: center;
  display: none;
}

#custom-search-dialog {
  display: none;
  position: fixed;
  top: 120px;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  max-width: unset;
  padding: 20px;
}

#custom-search-dialog-content {
  height: fit-content;
  width: fit-content;
}

#custom-search-form {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 20px;
  max-width: unset;
}

#custom-search-form select,
#custom-search-form input[type='text'],
#custom-search-form button {
  padding: 10px;
  font-size: 16px;
}

#custom-search-form select {
  max-width: fit-content;
}

.custom-search-group {
  flex: 1;
  display: flex;
  gap: 10px;
}

#keyword {
  flex: 1;
}

#custom-search-results {
  margin-top: 20px;
  max-width: unset;
}

.search-result {
  border: 1px solid #ddd;
  padding: 10px;
  gap: 20px;
  margin-bottom: 10px;
  border-radius: 5px;
  background-color: #f9f9f9;
  display: flex;
  justify-content: space-between;
}

.search-result h3 {
  margin: 0 0 10px;
}

.search-result p {
  margin: 5px 0;
}

.search-result-image {
  cursor: pointer;
}

@media (max-width: 980px) {
  #custom-search-dialog {
    top: 0;
  }
}

@media (max-width: 768px) {
  #custom-search-form {
    flex-direction: column !important;
  }

  #custom-search-form select,
  #custom-search-form input[type='text'],
  #custom-search-form button {
    width: 100%;
    flex: 1;
  }

  .search-result {
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
  }

  #custom-search-dialog {
    padding: 20px 40px;
  }

  #custom-search-dialog-content {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  #custom-search-form select {
    max-width: 100%;
  }
  .custom-search-group {
    flex-direction: column;
  }
}
