.elementor-widget-cew-loop-search {
    width: 100%;
}

.cew-loop-search {
	display: flex;
    flex-direction: column;
    width: 100%;
}

.cew-loop-search__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding-bottom: 40px;
	border-bottom: 1px solid #DFE0D6;
}

.cew-loop-search__bar {
    position: relative;
    display: flex;
    align-items: center;
    width: 364px;
}

span.cew-loop-search__icon {
    position: absolute;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: auto;
    bottom: 0;
    left: 16px;
}

input[type=search].cew-loop-search__input {
	border: 1px solid #DFE0D6 !important;
	background: #fff;
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	height: 48px;
	padding: 12px 16px 12px 48px;
}

.cew-loop-search__input::placeholder {
    color: #2B2B2A;
}

.cew-loop-search__sort-wrap {
	display: flex;
	align-items: center;
	gap: 32px;
	transition: opacity 0.2s ease;
}

/* Sort dropdown is disabled when the results are 0 or 1 item. */
.cew-loop-search__sort-wrap.is-disabled {
	opacity: 0.2;
	pointer-events: none;
}

.cew-loop-search__sort:disabled {
	cursor: not-allowed;
}

.cew-loop-search__sort-label {
    font-size: 14px;
    font-weight: 400;
    line-height: 24px;
    color: #2B2B2A;
}

.cew-loop-search__sort {
	font: inherit;
	color: #2B2B2A;
	border: 1px solid #DFE0D6;
	padding: 12px 16px;
	background: #fff;
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 24px;
	width: 196px;
	height: 48px;
    border-radius: 0px;
}

.cew-loop-search__sort-field {
	position: relative;
	display: inline-flex;
	align-items: center;
}

.cew-loop-search__sort-field--has-arrow .cew-loop-search__sort {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 44px;
}

.cew-loop-search__sort-arrow {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: auto;
	font-size: 12px;
	line-height: 1;
	color: #2B2B2A;
	pointer-events: none;
}

.cew-loop-search__sort-arrow svg {
	width: 12px;
	height: 12px;
	fill: currentColor;
}

.cew-loop-search__input:focus-visible,
.cew-loop-search__sort:focus-visible{
    box-shadow: none;
    outline: 0;
    outline-offset: 0;
}

.cew-loop-search__title-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 40px;
}

.cew-loop-search__heading {
	display: flex;
	gap: 16px;
	color:  #70706F;
	font-size: 12px;
	font-weight: 600;
	line-height: 16px;
	letter-spacing: 2px;
	text-transform: uppercase;
	white-space: nowrap;
}

/* The searched term inside "Search results for: ..." */
.cew-loop-search__query {
	font-weight: 600;
}

/* Clear Search link + item count, kept together in one row on every screen size. */
.cew-loop-search__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	margin-left: auto;
	width: 100%;
}

.cew-loop-search__clear-link[hidden] {
	display: none !important;
}

.cew-loop-search__count {
	color: #70706F;
	font-size: 14px;
	font-weight: 400;
	line-height: 24px;
	margin-left: auto;
}

.cew-loop-search__clear-link {
	background: none;
	border: 0;
	padding: 0;
	font-size: 13px;
	font-style: normal;
	font-weight: 700;
	line-height: 100%;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #1C8983;
}

.cew-loop-search__clear-link:focus, .cew-loop-search__clear-link:hover {
    background: none;
	border: 0;
	padding: 0;
    color: #1C8983;
}

.cew-loop-search__empty {
	text-align: center;
	padding: 69px 0 0;
}

.cew-loop-search__empty[hidden] {
	display: none;
}

.cew-loop-search__empty-heading {
	margin: 0;
}

.cew-loop-search__empty-text {
	margin: 32px 0 69px;
}

.cew-loop-search__clear-button {
	display: inline-block;
	border: 2px solid #1C7F7A;
	width: 269px;
	padding: 16px 0;
	font-size: 13px;
	font-weight: 700;
	line-height: 13px; /* 13px */
	letter-spacing: 0.5px;
	text-transform: uppercase;
	background-color: #1C7F7A;
	color: #fff;
}

.cew-loop-search--loading .cew-loop-search__bar {
	opacity: 0.7;
}


.cew-loop-search__query {
	font-weight: 700;
    color: #2B2B2A;
}

/* Skeleton shimmer shown on the Loop Grid's existing items while a search request is in flight. */
.is-cew-loading > * {
	position: relative;
	overflow: hidden;
	pointer-events: none;
	opacity: 0.6;
}

.is-cew-loading > *::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.55) 50%, rgba(255, 255, 255, 0) 100%);
	background-size: 200% 100%;
	animation: cew-loop-search-shimmer 1.2s ease-in-out infinite;
}

@keyframes cew-loop-search-shimmer {
	0% {
		background-position: 200% 0;
	}

	100% {
		background-position: -200% 0;
	}
}

@media (max-width: 767px) {
    .cew-loop-search__row {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .cew-loop-search__bar {
        width: 100%;
    }

    .cew-loop-search__sort {
        width: 287px;
    }

    .cew-loop-search__row {
        padding-bottom: 32px;
    }

    .cew-loop-search__title-row {
        margin-top: 24px;
    }

    /* While searching: status text on its own line, then Clear Search + count in one row below. */
    .cew-loop-search--searching .cew-loop-search__title-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 27px;
    }

    .cew-loop-search--searching .cew-loop-search__meta {
        justify-content: space-between;
        margin-left: 0;
    }
    
    .cew-loop-search__empty {
        padding: 48px 0 0;
    }

    .cew-loop-search__empty-heading {
        font-weight: 600 !important;
    }

    .cew-loop-search__empty-text {
        margin: 24px 0 40px;
    }

    .cew-loop-search__clear-button {
        width: 234px;
        padding: 7px 0;
    }
}
