/**
 * @file
 * Google like search box used by the "Home page block Google style" block.
 */

.nv-google-search {
  display: flex;
  flex-direction: column;
  /* Centre the whole content horizontally and vertically. 70vh keeps the box
     centred in the remaining viewport without pushing the page into a
     scrollbar on short screens. */
  justify-content: center;
  align-items: center;
  min-height: 70vh;
  padding: 24px 16px;
}

/* Logo + site name, above the search box. */
.nv-google-search__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 28px;
  text-align: center;
}

.nv-google-search__logo {
  display: block;
  width: auto;
  height: 72px;
  max-width: 100%;
  margin-bottom: 12px;
}

.nv-google-search__site-name {
  color: #202124;
  font-size: 40px;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.nv-google-search__form {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 584px;
  padding: 4px 6px 4px 16px;
  border: 1px solid #dfe1e5;
  border-radius: 24px;
  background: #fff;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.nv-google-search__form:hover {
  border-color: rgba(223, 225, 229, 0);
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.nv-google-search__form:focus-within {
  border-color: rgba(223, 225, 229, 0);
  box-shadow: 0 1px 6px rgba(32, 33, 36, 0.28);
}

.nv-google-search__icon {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  margin-right: 12px;
  color: #9aa0a6;
}

.nv-google-search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: #202124;
  font-size: 16px;
  line-height: 36px;
}

.nv-google-search__input::placeholder {
  color: #9aa0a6;
}

/* Hide the native decoration so the box keeps the Google look. */
.nv-google-search__input::-webkit-search-decoration,
.nv-google-search__input::-webkit-search-results-button,
.nv-google-search__input::-webkit-search-results-decoration {
  display: none;
}

.nv-google-search__button {
  flex: 0 0 auto;
  margin-left: 8px;
  padding: 0 20px;
  height: 36px;
  border: 0;
  border-radius: 18px;
  background: #1a73e8;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.nv-google-search__button:hover,
.nv-google-search__button:focus {
  background: #1765cc;
}

/* Shortcut buttons below the search box, like "Google Search" / "I'm Feeling
   Lucky". */
.nv-google-search__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 20px;
}

.nv-google-search__link {
  display: inline-block;
  padding: 0 18px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: #f8f9fa;
  color: #3c4043;
  font-size: 14px;
  line-height: 34px;
  text-align: center;
  text-decoration: none;
}

.nv-google-search__link:hover,
.nv-google-search__link:focus {
  border-color: #dadce0;
  background: #f8f9fa;
  color: #202124;
  text-decoration: none;
  box-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

@media (max-width: 480px) {
  .nv-google-search__button {
    padding: 0 12px;
  }

  .nv-google-search__logo {
    height: 56px;
  }

  .nv-google-search__site-name {
    font-size: 28px;
  }
}
