/* PSU Trang Search Styles */
@import url("https://fonts.googleapis.com/css2?family=Bai+Jamjuree:wght@200;300;400;500;600;700&display=swap");

* {
  box-sizing: border-box;
}

body,
html {
  height: 100%;
  margin: 0;
  padding: 0;
  background: #fff;
  font-family: "Bai Jamjuree", -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  color: #202124;
  font-size: 14px;
}

.search-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px;
}

.search-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 584px;
  margin-top: -25vh;
}

.logo-container {
  margin-bottom: 35px;
  text-align: center;
}

.search-logo {
  max-width: 250px;
  /* margin-bottom: 20px; */
  filter: none;
}

.search-tagline {
  font-size: 16px;
  color: #4285f4;
  margin-bottom: 8px;
  font-family: "Bai Jamjuree", sans-serif;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.search-subtitle {
  font-size: 13px;
  color: #70757a;
  font-family: "Bai Jamjuree", sans-serif;
  font-weight: 400;
  margin-bottom: 0;
}

.search-box-container {
  position: relative;
  width: 100%;
  max-width: 584px;
}

.search-input-wrapper {
  position: relative;
  width: 100%;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  padding: 0;
  transition: all 0.15s ease-in-out;
  box-shadow: 0 2px 5px 1px rgba(64, 60, 67, 0.16);
  overflow: visible;
}

.search-input-wrapper:hover {
  box-shadow: 0 2px 8px 1px rgba(64, 60, 67, 0.24);
}

.search-input-wrapper.focused {
  box-shadow: 0 2px 8px 1px rgba(64, 60, 67, 0.24);
  border-color: rgba(223, 225, 229, 0);
}

.search-input-wrapper.has-autocomplete {
  border-radius: 24px 24px 0 0;
  box-shadow: 0 2px 8px 1px rgba(64, 60, 67, 0.24);
}

.search-input-group {
  display: flex;
  align-items: center;
  padding: 0 16px;
  height: 44px;
  width: 100%;
}

.search-icon {
  color: #9aa0a6;
  font-size: 16px;
  margin-right: 12px;
  flex-shrink: 0;
}

.search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 16px;
  flex: 1;
  padding: 0;
  color: #202124;
  line-height: 1.5;
  width: 100%;
  font-family: "Bai Jamjuree", sans-serif;
}

.search-input::placeholder {
  color: #9aa0a6;
  font-family: "Bai Jamjuree", sans-serif;
}

.search-buttons {
  display: flex;
  gap: 14px;
  margin-top: 30px;
  justify-content: center;
  flex-wrap: wrap;
}

.search-btn {
  background: #f8f9fa;
  border: 1px solid #f8f9fa;
  border-radius: 4px;
  color: #3c4043;
  cursor: pointer;
  font-size: 14px;
  height: 36px;
  line-height: 27px;
  min-width: 54px;
  padding: 0 16px;
  text-align: center;
  text-decoration: none;
  transition: all 0.15s ease;
  user-select: none;
  white-space: nowrap;
  font-family: "Bai Jamjuree", sans-serif;
  font-weight: 500;
}

.search-btn:hover {
  background: #f1f3f4;
  border: 1px solid #dadce0;
  color: #202124;
  text-decoration: none;
}

.search-btn:focus {
  border: 1px solid #4285f4;
  outline: none;
}

/* Autocomplete Styles */
.ui-autocomplete {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000;
  background: #fff;
  border: 1px solid #dfe1e5;
  border-radius: 0 0 24px 24px;
  border-top: none;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  max-height: 400px;
  overflow-y: auto;
  margin: 0 !important;
  padding: 0;
  list-style: none;
  font-size: 14px;
  box-sizing: border-box;
  margin-top: -1px !important;
}

.ui-autocomplete .ui-menu-item {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
}

.ui-autocomplete .ui-menu-item:last-child {
  border-bottom: none;
  border-radius: 0 0 24px 24px;
}

.ui-autocomplete .ui-menu-item-wrapper {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  color: #202124;
  text-decoration: none;
  border-radius: 0;
}

.ui-autocomplete .ui-menu-item-wrapper:hover,
.ui-autocomplete .ui-state-active {
  background-color: #f8f9fa;
}

.autocomplete-icon {
  color: #70757a;
  font-size: 16px;
  margin-right: 12px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}

.autocomplete-content {
  flex: 1;
  min-width: 0;
}

.autocomplete-main {
  font-size: 14px;
  color: #202124;
  line-height: 1.4;
  margin-bottom: 2px;
  font-family: "Bai Jamjuree", sans-serif;
}

.autocomplete-main .highlight {
  font-weight: 600;
  color: #1a73e8;
  font-family: "Bai Jamjuree", sans-serif;
}

.autocomplete-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #70757a;
  line-height: 1.3;
  font-family: "Bai Jamjuree", sans-serif;
}

.autocomplete-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #f1f3f4;
  padding: 2px 6px;
  border-radius: 12px;
  font-size: 11px;
  color: #5f6368;
  white-space: nowrap;
  font-family: "Bai Jamjuree", sans-serif;
}

.autocomplete-tag i {
  font-size: 10px;
}

.autocomplete-date {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #70757a;
  font-family: "Bai Jamjuree", sans-serif;
}

.autocomplete-date i {
  font-size: 10px;
}

/* Footer */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #f2f2f2;
  border-top: 1px solid #e4e4e4;
  padding: 15px 20px;
  font-size: 14px;
  color: #70757a;
  text-align: center;
  font-family: "Bai Jamjuree", sans-serif;
}

.footer a {
  color: #70757a;
  text-decoration: none;
  font-family: "Bai Jamjuree", sans-serif;
}

.footer a:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
  .search-container {
    margin-top: -30vh;
    padding: 0 20px;
  }

  .search-logo {
    max-width: 120px;
  }

  .search-tagline {
    font-size: 14px;
  }

  .search-subtitle {
    font-size: 12px;
  }

  .search-input-wrapper {
    max-width: 100%;
  }

  .search-buttons {
    margin-top: 25px;
    gap: 10px;
  }

  .search-btn {
    font-size: 13px;
    height: 34px;
    padding: 0 12px;
  }

  .footer {
    font-size: 12px;
    padding: 12px 15px;
  }
}

@media (max-width: 480px) {
  .search-container {
    margin-top: -25vh;
  }

  .search-input-group {
    padding: 0 12px;
  }

  .search-input {
    font-size: 14px;
  }

  .autocomplete-content {
    font-size: 13px;
  }

  .ui-autocomplete .ui-menu-item-wrapper {
    padding: 10px 12px;
  }
}
