/* Layout for search container */
.search {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.js .search {
	position: fixed;
	z-index: 1000;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	opacity:0;
	visibility: hidden;
}

.js .search::before {
	content: '';
	position: absolute;
	top: 0;
	right: 0;
	width: 100%;
	height: 100%;
	background: rgba(255,255,255,0.94);
	
}

.btn--search-close {
	color:#5c5c5c;
	font-size: 1em;
	position: absolute;
	top: 4.7em;
	right: 1.25em;
	display: none;
	cursor: pointer;
	width: 16px;
    height: 22px;

}
.btn--search-close::before {
	transition: all .3s ease;
	-webkit-transition: all .3s ease;
	position: absolute;
	top: 0px;
	left:4px;
}

.btn--search-close:hover::before{
	transform: rotate(-90deg);
	-webkit-transform: rotate(-90deg);
	-moz-transform: rotate(-90deg);
}

.js .btn--search-close {
	display: block;
}

.search__form {
	position: relative;
	margin: 1em 0 2em;
	width: 96%;
	
}

.search__form-inner {
	position: relative;
	z-index: 10;
	overflow: hidden;
	font-family: "ThaiSansNeue-Regular";
}

.js .search__form-inner::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0%;
	width: 100%;
	height: 105%;
	background: #942977;
}

/* .wrap-searchinput{
	height: 2em;
	-webkit-box-shadow: 0 0 23px -8px rgba(0,0,0,.75);
    -moz-box-shadow: 0 0 23px -8px rgba(0,0,0,.75);
	box-shadow: 0 0 23px -8px rgba(0,0,0,.75);
	width: 100%;
	background: #999;

} */

.search__input {
	font-family: inherit;
	font-size: 1.6em;
	line-height: 1;
	display: inline-block;
	box-sizing: border-box;
	width: 78%;
	padding: .5em;
	text-align: center;
	color: #5c5c5c;
	border: none;
	background: #ffffff;
	border-radius: 26px 0px 0 26px;
	-webkit-border-radius: 26px 0px 0 26px;
	-moz-border-radius: 26px 0px 0 26px;
	opacity: 0;
	-webkit-box-shadow: 0 0px 23px -8px rgba(0,0,0,.75);
    -moz-box-shadow: 0 0px 23px -8px rgba(0,0,0,.75);
    box-shadow: 0 0px 23px -8px rgba(0,0,0,.75);
	
}


@-moz-document url-prefix() { 

	.search__input {
		padding: .65em;
	}
  }


.search__input:focus {
	outline: none;
}

.search__input::-webkit-input-placeholder {
	/* WebKit, Blink, Edge */
	color: #545454;
}

.search__input::-moz-placeholder {
	opacity: 1;
	/* Mozilla Firefox 19+ */
	color: #181c4d;
}

.search__input:-ms-input-placeholder {
	/* Internet Explorer 10-11 */
	color: #181c4d;
}

.search__input::-webkit-search-cancel-button,
.search__input::-webkit-search-decoration {
	-webkit-appearance: none;
}

.search__input::-ms-clear {
	display: none;
}

.search__info {
	font-size: 90%;
	font-weight: bold;
	position: relative;
	z-index: 9;
	display: block;
	width: 100%;
	padding: 0.85em 0;
	color: #eaba82;
}

.search__related {
	width: 25%;
	pointer-events: none;
}

.search__suggestion h3 {
	font-size: 1.35em;
	margin: 0;
}

.search__suggestion h3::before {
	content: '\21FE';
	display: inline-block;
	padding: 0 0.5em 0 0;
}

.search__suggestion p {
	font-size: 1.15em;
	line-height: 1.4;
	margin: 0.75em 0 0 0;
}

.texttitle{
	font-size: 1.8em;
	color:#5c5c5c;
	margin-bottom: 14px;
}

.text-search {
	border: 0;
    color: #fff;
    display: inline-block;
    width: 20%;
    border-radius: 0 26px 26px 0;
    -webkit-border-radius: 0 26px 26px 0;
    background-color: #942977;
    font-size: 1.3em;
    text-align: center;
	padding: 14px 6px 12px;
	position: relative;
	left: -5px;
	top:-1px;
	opacity: 0;
	transition: opacity 0.4s;
	
}

.js .search--open .text-search{
	opacity: 1;
	transition: opacity 0s 0.4s;
}

.text-search>.text {
    position: relative;
    top: 2px;
}

/************************/
/* Transitions 			*/
/************************/

.js .main-wrap {
	position: relative;
	transition: transform 0.4s, opacity 0.4s;
	transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.js .main-wrap--move {
	opacity: 0;
	transform: scale3d(0.9,0.9,1);
}

.js .main-wrap--move .btn--search {
	pointer-events: none;
	opacity: 0;
}

.js .search {
	pointer-events: none;
}

.js .search--open {
	pointer-events: auto;
	opacity: 1;
	visibility: visible;
}

.js .search::before {
	opacity: 0;
	transition: opacity 0.4s;
}

.js .search--open::before {
	opacity: 1;
}

/* Close button */
.btn--search-close {
	opacity: 0;
	transition: opacity 0.4s;
}

.search--open .btn--search-close {
	opacity: 1;
}

/* Search form with input and description */
.search__suggestion,
.search__info {
	opacity: 0;
	transform: translate3d(0, -50px, 0);
	transition: opacity 0.4s, transform 0.4s;
}

.search--open .search__suggestion,
.search--open .search__info {
	opacity: 1;
	transform: translate3d(0, 0, 0);
	transition-delay: 0.4s;
	transition-timing-function: ease-out;
}

.js .search__form-inner::after {
	opacity: 0;
	transform-origin: 50% 0;
}

.js .search--open .search__form-inner::after {
	animation: scaleUpDown 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes scaleUpDown {
	0% {
		opacity: 1;
		transform: scale3d(1,0,1);
	}
	50% {
		transform: scale3d(1,1,1);
		transform-origin: 50% 0;
		transition-timing-function: ease-out;
	}
	50.1% {
		transform-origin: 50% 100%;
		transition-timing-function: ease-out;
	}
	100% {
		opacity: 1;
		transform: scale3d(1,0,1);
		transform-origin: 50% 100%;
		transition-timing-function: ease-out;
	}
}

.js .search__form-inner {
	transform: translate3d(0,-50px,0);
	transition: transform 0.4s;
}

.js .search--open .search__form-inner {
	transform: translate3d(0,0,0);
	transition: none;
	overflow: visible;
}

.js .search__input {
	opacity: 0;
	transition: opacity 0.4s;
}

.js .search--open .search__input {
	opacity: 1;
	transition: opacity 0s 0.4s;
}

@media screen and (max-width: 40em) {
	.btn--search-close {
		font-size: 1em;
	}
	.search__form {
		margin: 2em 0;
	}
	.search__related {
		font-size: 85%;
		width: 100%;
		padding: 0 1em;
	}
	.search__input,
	.js .search__form-inner::after {
		/* width: 100%; */
		left: 0;
	}
}

@media screen and (min-width: 48em) {

	
	.btn--search-close{
		top: 70.4px;
		right:17.5px;
	}

	.search__form {
		max-width:730px;
	}

	.search__input{
		width: 89%;
		
	}
	.text-search{
		width:10%;
	}

	.texttitle{
		font-size: 2.6em;
	}
}
