/* Global Wrapper */
.was-search-form-wrapper {
	position: relative;
	width: 100%;
	max-width: 600px;
	margin: 0 auto;
	box-sizing: border-box;
}

.was-card-link-wrapper:hover {
	text-decoration: none;
}

.was-search-form-wrapper * {
	box-sizing: border-box;
}

/* Base Form */
.was-search-form {
	display: flex;
	align-items: center;
	width: 100%;
}

.was-input-group {
	position: relative;
	width: 100%;
	display: flex;
	align-items: center;
}

/* Input Field */
.was-search-field {
	width: 100%;
	padding: 12px 48px 12px 20px;
	font-size: 16px;
	line-height: 1.5;
	border: 1px solid #e2e8f0;
	border-radius: 50px;
	transition: all 0.3s ease;
	outline: none;
	background: #fff;
	color: #333;
}

.was-search-field:focus {
	border-color: #6366f1;
	/* Indigo 500 */
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Submit Button */
.was-search-submit {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	border-radius: 50%;
	color: #64748b;
	transition: color 0.3s ease, background-color 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.was-search-submit:hover {
	color: #6366f1;
	background-color: #f1f5f9;
}

/* Styles Presets */

/* Minimal */
.was-style-minimal .was-search-field {
	border: none;
	border-bottom: 2px solid #e2e8f0;
	border-radius: 0;
	padding-left: 0;
	padding-right: 40px;
	background: transparent;
}

.was-style-minimal .was-search-field:focus {
	border-bottom-color: #6366f1;
	box-shadow: none;
}

.was-style-minimal .was-search-submit {
	right: 0;
}

/* Glassmorphism */
.was-search-form-wrapper.was-style-glass {
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 16px;
	padding: 8px;
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.was-style-glass .was-search-field {
	background: rgba(255, 255, 255, 0.5);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: #1a202c;
}

.was-style-glass .was-search-field::placeholder {
	color: #4a5568;
}

.was-style-glass .was-search-field:focus {
	background: rgba(255, 255, 255, 0.8);
	box-shadow: none;
}

/* Modern Style (Elementor Design) */
.was-style-modern .was-search-field {
	padding: 40px 120px 40px 60px !important;
	border: none !important;
	border-radius: 12px !important;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08) !important;
	font-size: 18px !important;
	color: #333 !important;
}

.was-style-modern .was-search-field::placeholder {
	color: #999;
}

.was-style-modern .was-search-submit-modern:hover {
	background: #c00511 !important;
}

.was-style-modern .was-live-search-results {
	border-radius: 12px;
	margin-top: 10px;
	border: none;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

/* ============================
   Search Results Grid Styles
   ============================ */

.was-results-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 20px;
	margin-top: 40px;
}

/* New Card Design */
.was-result-card.was-card-design-new {
	border: 1px solid #f1f1f1;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
	transition: all 0.3s ease;
	position: relative;
	padding: 0;
	overflow: visible;
	/* For Badge */
}

.was-result-card.was-card-design-new:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
}

.was-card-link-wrapper {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 24px;
	text-decoration: none;
	color: inherit;
	position: relative;
}

/* Badge */
.was-badge-new {
	position: absolute;
	top: 20px;
	right: -10px;
	/* Overhang slightly */
	background-color: #ffeb3b;
	/* Yellow */
	color: #000;
	font-weight: 800;
	font-size: 0.8rem;
	padding: 4px 12px;
	text-transform: uppercase;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	z-index: 2;
}

.was-card-content {
	flex-grow: 1;
}

.was-card-title {
	font-size: 1.8rem;
	font-weight: 700;
	color: #2d3748;
	margin: 0 0 20px 0;
	line-height: 1.4;
}

/* Meta Data */
.was-card-meta {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.was-meta-row {
	display: flex;
	align-items: center;
	font-size: 16px;
	color: #4a5568;
}

.was-meta-row .was-icon {
	width: 24px;
	color: #e53e3e;
	/* Red Color for icons */
	text-align: center;
	margin-right: 12px;
	font-size: 1.5rem;
}

/* Footer / Heart */
.was-card-footer {
	margin-top: 20px;
	/* Push to bottom */
	display: flex;
	justify-content: flex-end;
}

.was-action-icon {
	font-size: 1.25rem;
	color: #e53e3e;
	transition: transform 0.2s;
}

.was-result-card:hover .was-action-icon {
	transform: scale(1.1);
}

/* Pagination */
.was-pagination {
	grid-column: 1 / -1;
	width: 100%;
	margin-top: 40px;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.was-pagination a,
.was-pagination span {
	padding: 8px 16px;
	border: 1px solid #e2e8f0;
	border-radius: 4px;
	text-decoration: none;
	color: #4a5568;
	background: #fff;
	font-weight: 600;
}

.was-pagination span.current,
.was-pagination a:hover {
	background: #e40429;
	color: #fff;
	border-color: #e40429;
}

/* WooCommerce Fixes */
.was-results-grid.woocommerce ul.products {
	display: contents;
}

/* Live Search Dropdown */
.was-live-search-results {
	scrollbar-width: thin;
	scrollbar-color: #6366f1 #f1f5f9;
}

.was-live-search-results::-webkit-scrollbar {
	width: 6px;
}

.was-live-search-results::-webkit-scrollbar-track {
	background: #f1f5f9;
}

.was-live-search-results::-webkit-scrollbar-thumb {
	background-color: #6366f1;
	border-radius: 10px;
}

.was-live-result-item {
	transition: background-color 0.2s ease, color 0.2s ease;
}

.was-live-result-item:hover {
	background-color: #f8fafc !important;
	color: #6366f1 !important;
}

.was-live-result-item:last-child {
	border-bottom: none !important;
}