/* RMIT University Vietnam
  Course: COSC2430 Web Programming
  Semester: 2023A
  Assessment: Assignment 1
  Author: Do Le Long An
  ID: s3963207
  Acknowledgement: 
  MDN Web Docs, RMIT Canvas (HTML, CSS learning materials)
  shapedivider.app (For wavy divider svg), 
  sketchfab.com (For the 3D background)
  unplash.com (For quality images)
  flaticon.com, fontawesome.com (For icons and fonts)
  dribble.com, canva.com, Codepen.com (For design idea inspiration) */

.search-container {
  position: relative;
  margin: 0 auto;
  z-index: 500;
}
.search-container .search {
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 20px;
  left: 0;
  width: 10%;
  height: 50px;
  background: var(--primary-color);
  border-radius: 27px;
  transition: all 1s;
  z-index: 4;
  box-shadow: 0 0 25px 0 rgba(0, 0, 0, 0.4);
}
.search-container .search:hover {
  cursor: pointer;
}
.search-container .search::before {
  content: "";
  position: absolute;
  margin: auto;
  top: 22px;
  right: 0;
  bottom: 0;
  left: 22px;
  width: 12px;
  height: 2px;
  background: white;
  transform: rotate(45deg);
  transition: all 0.5s;
}
.search-container .search::after {
  content: "";
  position: absolute;
  margin: auto;
  top: -5px;
  right: 0;
  bottom: 0;
  left: -5px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  border: 2px solid white;
  transition: all 0.5s;
}
.search-container input {
  font-family: var(--inconsolata);
  position: absolute;
  margin: auto;
  top: 0;
  right: 0;
  bottom: 20px;
  left: 0;
  width: 50px;
  height: 50px;
  outline: none;
  border: none;
  background: var(--primary-color);
  color: white;
  text-shadow: 0 0 10px var(--primary-color);
  padding: 0 80px 0 20px;
  border-radius: 30px;
  box-shadow: 0 0 25px 0 var(--primary-color), 0 20px 25px 0 rgba(0, 0, 0, 0.2);
  transition: all 1s;
  opacity: 0;
  z-index: 5;
  font-weight: bolder;
  letter-spacing: 0.1em;
}
.search-container input:hover {
  cursor: pointer;
}
.search-container input:focus {
  width: 300px;
  opacity: 1;
  cursor: text;
}
.search-container input:focus ~ .search {
  right: -250px;
  background: #151515;
  z-index: 6;
}
.search-container input:focus ~ .search::before {
  top: 0;
  left: 0;
  width: 25px;
}
.search-container input:focus ~ .search::after {
  top: 0;
  left: 0;
  width: 25px;
  height: 2px;
  border: none;
  background: white;
  border-radius: 0%;
  transform: rotate(-45deg);
}
.search-container input::placeholder {
  color: white;
  opacity: 0.5;
  font-weight: bolder;
}
