/* Index Page Styles */

/* background override */
#background {
  max-height: 65%;
}

#past-requests-menu {
  /* Auto layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: 2.5rem;
  max-width: 50%;
  overflow-y: hidden;

  background: #FFFFFF;
  border-radius: 8px;

  /* Inside auto layout */
  order: 0;
  flex: 1 0 auto;
}

div#search-bar {
  /* Auto layout */
  display: flex;
  flex-direction: row;
  align-items: center;

  /* Inside auto layout */
  flex: none;
  order: 0;
  align-self: stretch;
  flex-grow: 0;
}

/* Container div allows the
 * title to stretch - h1 won't
 * do it if flex-grow set to 1 
 */
div#past-requests-title {
  display: flex;
  justify-content: center;
  margin-left: 0.25rem;
  
  /* Inside auto layout */
  flex: none;
  order: 0;
  flex-grow: 1;
}

div#search-icon {
  cursor: pointer;
  width: 36px;
  height: 36px;
  margin-right: 0.25rem;
  
  /* Inside auto layout */
  flex: none;
  order: 1;
  flex-grow: 0;
}

#search-input-container {
  display: none;
  width: 100%;
  height: 2.5rem;
  pointer-events: none;
  transition: opacity 0.5s ease-out;
}

.show-search-input #search-input-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  pointer-events: auto;
}

.show-search-input #search-bar {
  padding: 0px;
  justify-content: space-around;
}

.show-search-input #search-icon, .show-search-input #past-requests-title {
  display: none;
}

#search-input {
  flex: auto;
  border-radius: 2rem;
  border: #ddd;
  border-width: 0;
  background-color: #ddd;
  margin: 0.5rem;
  box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  border: none;
  border-radius: 2rem;
  outline-color: #113f71;
  font-size: medium;
}

#search-button {
  border-radius: 2rem;
  border-width: 0;
  background-color: #113f71;
  box-shadow: 0px 0.25rem 0.25rem rgba(0, 0, 0, 0.25);
  padding: 0.5rem;
  margin: 0.5rem;
  font-size: medium;
  color: white;
  cursor: pointer;
  font-weight: 700;
}

div#past-request-zone {
  /* Auto layout */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 24px 29px;
  gap: 20px;

  overflow-y: scroll;
  
  background: #BBBBBB;
  box-shadow: inset 0px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  
  /* Inside auto layout */
  flex: 0 1 auto;
  align-self: stretch;
}

div#history-error {
  display: none;
  background-color: white;
  border-radius: 8px;
  padding: 0 1rem;
  
  flex: 0 0 auto;
  align-self: stretch;
}

.hidden-unless-empty {
  display: none;
}

.loader {
  display: none;
}

#new-request-menu {
  /* Auto layout */
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px;
  gap: 2rem;

  background: #FFFFFF;
  border-radius: 8px;

  /* Inside auto layout */
  /* TODO change to flex: 0 1 45%; for phase 2 */
  flex: 0 1 auto;
  order: 0;
}

.new-request-button {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 11.5rem;
  height: 3.25rem;

  background: #113f71;
  box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
  border-radius: 8px;
  border-width: 0;

  color: #FFFFFF;
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;

  /* Inside auto layout */

  flex: none;
  flex-grow: 0;
}

p#instructions {
  max-width: 50rem;
}

/* Constricted viewport styles */
@media screen and (max-width: 1024px) {
  #side1 {
    flex: 2;
  }

  #side2 {
    gap: 1.5rem;
  }
}

/* Phone and tablet styles */
@media only screen and (min-device-width: 320px) and (max-device-width: 812px) {
  h1#new-request {
    align-self: center;
  }
}