/* -------------------------------- 

Search Form

-------------------------------- */
.cp-search-main {
  position: absolute;
  z-index: 2;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: #fff;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.3s, visibility 0.3s;
  -moz-transition: opacity 0.3s, visibility 0.3s;
  transition: opacity 0.3s, visibility 0.3s;
}

.cp-search-main input[type="text"] {
  width: 100%;
  line-height: 38px;
  height: 40px;
  border: 1px solid var(--color-primary);
  background-color: #f5f5f5;
  border-radius: 40px;
  padding: 0 50px;
}
.cp-search-main input[type="text"]:focus {
  outline: none;
}
.cp-search-main input[type="text"]::-webkit-input-placeholder {
  color: #5c5d6a;
}
.cp-search-main input[type="text"]::-moz-placeholder {
  color: #5c5d6a;
}
.cp-search-main input[type="text"]:-moz-placeholder {
  color: #5c5d6a;
}
.cp-search-main input[type="text"]:-ms-input-placeholder {
  color: #5c5d6a;
}

.cp-search-main form {
  position: relative;
  z-index: 1;
  width: 800px;
  height: 100%;
  margin: 10px auto;
}

.cp-search-main form button[type="submit"] {
  position: absolute;
  top: 0;
  left: 10px;
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
}

.cp-search-main form button[type="submit"] i {
  font-size: 16px;
}

/* close */
.cp-search-main .cp-close {
  display: inline-block;
  position: absolute;
  right: 10px;
  top: 0;
  height: 40px;
  width: 40px;
  -webkit-transform: scale(0);
  -moz-transform: scale(0);
  -ms-transform: scale(0);
  -o-transform: scale(0);
  transform: scale(0);
  -webkit-transition: -webkit-transform 0.3s;
  -moz-transition: -moz-transform 0.3s;
  transition: transform 0.3s;
}

.cp-search-main .cp-close::before,
.cp-search-main .cp-close::after {
  content: "";
  position: absolute;
  height: 15px;
  width: 2px;
  background-color: #666;
  left: 50%;
  top: 50%;
}
.cp-search-main .cp-close::before {
  -webkit-transform: translateX(-50%) translateY(-50%) rotate(-45deg);
  -moz-transform: translateX(-50%) translateY(-50%) rotate(-45deg);
  -ms-transform: translateX(-50%) translateY(-50%) rotate(-45deg);
  -o-transform: translateX(-50%) translateY(-50%) rotate(-45deg);
  transform: translateX(-50%) translateY(-50%) rotate(-45deg);
}
.cp-search-main .cp-close::after {
  -webkit-transform: translateX(-50%) translateY(-50%) rotate(45deg);
  -moz-transform: translateX(-50%) translateY(-50%) rotate(45deg);
  -ms-transform: translateX(-50%) translateY(-50%) rotate(45deg);
  -o-transform: translateX(-50%) translateY(-50%) rotate(45deg);
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
}
.cp-search-main.is-visible {
  opacity: 1;
  visibility: visible;
}

.cp-search-main.is-visible .cp-close {
  -webkit-transform: scale(1);
  -moz-transform: scale(1);
  -ms-transform: scale(1);
  -o-transform: scale(1);
  transform: scale(1);
}
/* suggestions */
.cp-search-suggestions {
  display: block;
  position: absolute;
  top: 60px;
  left: 50%;
  background-color: #fff;
  width: 800px;
  margin-left: -400px;
  padding: 30px;
  max-height: 360px;
  border-radius: 0 0 10px 10px;
  overflow: hidden;
}
.cp-search-suggestions::after {
  clear: both;
  content: "";
  display: table;
}
.cp-search-suggestions .cp-search-hot {
  padding-bottom: 15px;
}
.cp-search-suggestions .cp-search-hot a {
  margin-bottom: 10px;
  margin-right: 10px;
}
.cp-search-suggestions .cp-search-hot i {
  color: var(--color-secondary-red);
}

.cp-search-suggestions h3 {
  text-transform: uppercase;
}
.cp-search-suggestions ul {
  overflow-y: auto;
  height: 240px;
}
.cp-search-suggestions ul li {
  position: relative;
  margin-top: 20px;
}
.cp-search-suggestions ul li:last-of-type {
  margin-bottom: 0;
}

/* animate */

.cp-animate-search .cp-search-main.is-visible {
  -webkit-animation: cd-slide-in 0.3s;
  -moz-animation: cd-slide-in 0.3s;
  animation: cd-slide-in 0.3s;
}

.cp-animate-search .is-visible .cp-search-suggestions {
  -webkit-transform-origin: center top;
  -moz-transform-origin: center top;
  -ms-transform-origin: center top;
  -o-transform-origin: center top;
  transform-origin: center top;
  -webkit-transform: translateZ(0);
  -moz-transform: translateZ(0);
  -ms-transform: translateZ(0);
  -o-transform: translateZ(0);
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-animation: cd-3d-rotation 0.5s 0.3s;
  -moz-animation: cd-3d-rotation 0.5s 0.3s;
  animation: cd-3d-rotation 0.5s 0.3s;
  -webkit-animation-fill-mode: backwards;
  -moz-animation-fill-mode: backwards;
  animation-fill-mode: backwards;
}

/* -------------------------------- 

cp-search-layer

-------------------------------- */
.cp-search-layer {
  display: block;
  position: fixed;
  z-index: 90;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 0.3s, visibility 0.3s;
  -moz-transition: opacity 0.3s, visibility 0.3s;
  transition: opacity 0.3s, visibility 0.3s;
}
.cp-search-layer.search-form-visible {
  opacity: 1;
  visibility: visible;
}

/* @keyframes */

@-webkit-keyframes cd-slide-in {
  0% {
    -webkit-transform: translateY(-100%);
  }
  100% {
    -webkit-transform: translateY(0);
  }
}
@-moz-keyframes cd-slide-in {
  0% {
    -moz-transform: translateY(-100%);
  }
  100% {
    -moz-transform: translateY(0);
  }
}
@keyframes cd-slide-in {
  0% {
    -webkit-transform: translateY(-100%);
    -moz-transform: translateY(-100%);
    -ms-transform: translateY(-100%);
    -o-transform: translateY(-100%);
    transform: translateY(-100%);
  }
  100% {
    -webkit-transform: translateY(0);
    -moz-transform: translateY(0);
    -ms-transform: translateY(0);
    -o-transform: translateY(0);
    transform: translateY(0);
  }
}

@-webkit-keyframes cd-3d-rotation {
  0% {
    -webkit-transform: perspective(1000px) rotateX(-90deg);
  }
  100% {
    -webkit-transform: perspective(1000px) translateY(0);
  }
}
@-moz-keyframes cd-3d-rotation {
  0% {
    -moz-transform: perspective(1000px) rotateX(-90deg);
  }
  100% {
    -moz-transform: perspective(1000px) translateY(0);
  }
}
@keyframes cd-3d-rotation {
  0% {
    -webkit-transform: perspective(1000px) rotateX(-90deg);
    -moz-transform: perspective(1000px) rotateX(-90deg);
    -ms-transform: perspective(1000px) rotateX(-90deg);
    -o-transform: perspective(1000px) rotateX(-90deg);
    transform: perspective(1000px) rotateX(-90deg);
  }
  100% {
    -webkit-transform: perspective(1000px) translateY(0);
    -moz-transform: perspective(1000px) translateY(0);
    -ms-transform: perspective(1000px) translateY(0);
    -o-transform: perspective(1000px) translateY(0);
    transform: perspective(1000px) translateY(0);
  }
}

@media (max-width: 985px) {
  .cp-search-main {
    padding: 0 15px;
  }
  .cp-search-main form {
    width: 100%;
    max-width: 800px;
  }
}

@media (max-width: 768px) {
  .cp-search-main {
    height: 60px;
  }
  .cp-search-main form {
    margin-top: 15px;
  }

  .cp-search-main form button[type="submit"] {
    left: 0;
  }

  .cp-search-main .cp-close {
    right: 0;
  }

  .cp-search-main input[type="text"] {
    padding: 0 40px;
  }

  .cp-search-suggestions {
    top: 60px;
    max-width: 800px;
    width: 100%;
    margin-left: -50%;
    padding: 15px;
    max-height: 560px;
  }
}
