/**
 * DooFinder Exact Style CSS
 * Birebir aynı tasarım
 */

/* ========================================
   FULLSCREEN OVERLAY - EXACT DOOFINDER
======================================== */

/* Hide backdrop for fullscreen mode (DooFinder has no backdrop) */
.codesws-mode-fullscreen .codesws-backdrop {
	display: none !important;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: auto;
	background: #ffffff;
	z-index: 999999;
	display: flex !important;
	flex-direction: column;
	padding: 0;
	max-height: 100vh;
	overflow-y: auto;
	animation: codesws-slide-down 0.3s ease;
}

/* Search Box - Top Sticky - Exact DooFinder */
.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-search-box {
	position: sticky !important;
	top: 0;
	z-index: 1000000 !important;
	background: #ffffff;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	border-radius: 0;
	margin: 0;
	padding: 16px 20px;
	box-shadow: none;
	display: flex;
	align-items: center;
	gap: 8px;
	max-width: 1400px;
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-input-field {
	flex: 1;
	font-size: 16px;
	padding: 10px 16px;
	height: 44px;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	background: #f5f5f5;
	color: #333333;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-input-field::placeholder {
	color: #999999;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-input-field:focus {
	background: #ffffff;
	border-color: #2196f3;
	outline: none;
	box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-search {
	padding: 10px 12px;
	background: transparent;
	border: none;
	color: #666666;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-search:hover {
	background: #f5f5f5;
	border-radius: 4px;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-voice {
	padding: 10px 12px;
	background: transparent;
	border: none;
	color: #666666;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-voice:hover {
	background: #f5f5f5;
	border-radius: 4px;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-close {
	position: absolute !important;
	top: 16px;
	right: 20px;
	z-index: 1000001 !important;
	width: 32px;
	height: 32px;
	background: transparent;
	border: none;
	color: #666666;
	font-size: 28px;
	line-height: 1;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.2s ease;
	font-weight: 300;
}

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-close:hover {
	color: #333333;
	background: #f5f5f5;
	border-radius: 4px;
}

/* ========================================
   CONTENT CONTAINER - TWO COLUMN LAYOUT
======================================== */

.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-suggestions-container {
	max-width: 1400px;
	margin: 0 auto;
	padding: 30px 20px 40px;
	width: 100%;
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 60px;
	align-items: start;
}

/* ========================================
   LEFT COLUMN - RECENT & POPULAR
======================================== */

.codesws-suggestions-left {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

/* Recent Searches Section */
.codesws-recent-searches {
	margin-bottom: 0;
	display: block;
}

.codesws-recent-searches:empty,
.codesws-recent-searches .codesws-recent-list:empty {
	display: none;
}

.codesws-recent-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 16px;
}

.codesws-recent-header h3 {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #666666;
	margin: 0;
	padding: 0;
}

.codesws-btn-clear-history {
	font-size: 12px;
	color: #f44336 !important;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
	transition: color 0.2s ease;
	font-weight: 400;
}

.codesws-btn-clear-history:hover {
	color: #d32f2f !important;
	text-decoration: underline;
}

.codesws-recent-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Recent Tag - Exact DooFinder Style */
.codesws-recent-item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	background: #f5f5f5;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-size: 13px;
	color: #333333;
	line-height: 1.4;
}

.codesws-recent-item:hover {
	background: #e8e8e8;
	border-color: #d0d0d0;
}

.codesws-recent-item .codesws-term {
	flex: 1;
	user-select: none;
	cursor: pointer;
}

.codesws-recent-item .codesws-remove-tag {
	width: 18px;
	height: 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.08);
	cursor: pointer;
	font-size: 16px;
	line-height: 1;
	margin-left: 4px;
	opacity: 0.6;
	transition: all 0.2s ease;
	flex-shrink: 0;
	color: #333333;
	font-weight: 300;
}

.codesws-recent-item .codesws-remove-tag:hover {
	background: rgba(0, 0, 0, 0.15);
	opacity: 1;
	transform: scale(1.1);
}

/* Popular Searches Section */
.codesws-popular-searches {
	margin-bottom: 0;
	display: block;
}

.codesws-popular-searches:empty,
.codesws-popular-searches .codesws-popular-list:empty {
	display: none;
}

.codesws-popular-searches .codesws-section-header {
	margin-bottom: 16px;
}

.codesws-popular-searches .codesws-section-header h3 {
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	color: #666666;
	margin: 0;
	padding: 0;
}

.codesws-popular-list {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Popular Item - Simple Text Link - Exact DooFinder */
.codesws-popular-item {
	display: block;
	padding: 8px 0;
	background: transparent;
	border: none;
	border-radius: 0;
	font-size: 14px;
	color: #333333;
	cursor: pointer;
	transition: color 0.2s ease;
	text-align: left;
	width: 100%;
	text-decoration: none;
	line-height: 1.6;
	font-weight: 400;
}

.codesws-popular-item:hover {
	color: #2196f3;
	background: transparent;
	text-decoration: none;
}

/* ========================================
   RIGHT COLUMN - RECOMMENDED PRODUCTS
======================================== */

.codesws-suggestions-right {
	display: flex;
	flex-direction: column;
}

.codesws-recommended-products {
	margin-bottom: 0;
	display: block;
}

.codesws-recommended-products:empty,
.codesws-recommended-products .codesws-recommended-grid:empty {
	display: none;
}

.codesws-recommended-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 20px;
}

.codesws-recommended-header h3 {
	font-size: 16px;
	font-weight: 600;
	color: #333333;
	margin: 0;
	padding: 0;
}

.codesws-recommended-nav {
	display: flex;
	gap: 8px;
}

.codesws-nav-btn {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.2s ease;
	color: #666666;
}

.codesws-nav-btn:hover {
	background: #f5f5f5;
	border-color: #d0d0d0;
	color: #333333;
}

.codesws-nav-btn:active {
	background: #e8e8e8;
}

.codesws-nav-btn:disabled {
	opacity: 0.3;
	cursor: not-allowed;
}

.codesws-nav-btn .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

/* Recommended Scroll Container */
.codesws-recommended-scroll {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	padding-bottom: 10px;
	margin: 0 -10px;
	padding-left: 10px;
	padding-right: 10px;
}

.codesws-recommended-scroll::-webkit-scrollbar {
	height: 4px;
}

.codesws-recommended-scroll::-webkit-scrollbar-track {
	background: #f5f5f5;
	border-radius: 2px;
}

.codesws-recommended-scroll::-webkit-scrollbar-thumb {
	background: #cccccc;
	border-radius: 2px;
}

.codesws-recommended-scroll::-webkit-scrollbar-thumb:hover {
	background: #999999;
}

.codesws-recommended-grid {
	display: flex;
	gap: 20px;
	min-width: max-content;
}

/* Recommended Product Card - Exact DooFinder */
.codesws-recommended-item {
	display: flex;
	flex-direction: column;
	text-decoration: none;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 16px;
	transition: all 0.3s ease;
	cursor: pointer;
	flex-shrink: 0;
	width: 240px;
	min-width: 240px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	height: 100%;
}

.codesws-recommended-item:hover {
	border-color: #2196f3;
	box-shadow: 0 4px 12px rgba(33, 150, 243, 0.2);
	transform: translateY(-3px);
}

.codesws-rec-thumb {
	width: 100%;
	height: 200px;
	margin-bottom: 12px;
	border-radius: 6px;
	overflow: hidden;
	background: #fafafa;
	display: flex;
	align-items: center;
	justify-content: center;
}

.codesws-rec-thumb img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 12px;
}

.codesws-no-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	background: #f5f5f5;
	color: #999999;
	font-size: 12px;
}

.codesws-rec-title {
	font-size: 13px;
	font-weight: 400;
	color: #333333;
	margin-bottom: 10px;
	line-height: 1.5;
	overflow: hidden;
	text-overflow: ellipsis;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	min-height: 58px;
}

.codesws-rec-price {
	font-size: 18px;
	font-weight: 600;
	color: #2196f3;
	margin-top: auto;
	line-height: 1.2;
}

/* ========================================
   RESPONSIVE - EXACT DOOFINDER
======================================== */

@media (max-width: 1200px) {
	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-suggestions-container {
		grid-template-columns: 240px 1fr;
		gap: 50px;
		padding: 24px 16px 32px;
	}

	.codesws-recommended-item {
		width: 220px;
		min-width: 220px;
	}

	.codesws-rec-thumb {
		height: 180px;
	}
}

@media (max-width: 1024px) {
	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-suggestions-container {
		grid-template-columns: 1fr;
		gap: 40px;
		padding: 24px 16px 32px;
	}

	.codesws-suggestions-left {
		gap: 32px;
	}

	.codesws-recommended-item {
		width: 200px;
		min-width: 200px;
	}

	.codesws-rec-thumb {
		height: 160px;
	}
}

@media (max-width: 768px) {
	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-search-box {
		padding: 12px 16px;
	}

	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-input-field {
		font-size: 14px;
		padding: 8px 12px;
		height: 40px;
	}

	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-btn-close {
		top: 12px;
		right: 16px;
		width: 28px;
		height: 28px;
		font-size: 20px;
	}

	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-suggestions-container {
		padding: 20px 12px 28px;
		gap: 32px;
	}

	.codesws-suggestions-left {
		gap: 28px;
	}

	.codesws-recommended-item {
		width: 180px;
		min-width: 180px;
	}

	.codesws-rec-thumb {
		height: 150px;
	}

	.codesws-rec-title {
		font-size: 12px;
		min-height: 50px;
	}

	.codesws-rec-price {
		font-size: 16px;
	}

	.codesws-recent-item {
		font-size: 12px;
		padding: 5px 10px;
	}

	.codesws-popular-item {
		font-size: 13px;
		padding: 7px 0;
	}
}

@media (max-width: 480px) {
	.codesws-mode-fullscreen .codesws-overlay-container.is-active .codesws-suggestions-container {
		padding: 16px 10px 24px;
		gap: 24px;
	}

	.codesws-recommended-item {
		width: 160px;
		min-width: 160px;
	}

	.codesws-rec-thumb {
		height: 140px;
	}

	.codesws-rec-title {
		font-size: 11px;
		min-height: 44px;
	}

	.codesws-rec-price {
		font-size: 15px;
	}
}

/* ========================================
   ANIMATIONS
======================================== */

@keyframes codesws-slide-down {
	from {
		transform: translateY(-100%);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

/* ========================================
   HIDE SUGGESTIONS WHEN RESULTS SHOWN
======================================== */

.codesws-results-wrapper.is-visible ~ .codesws-suggestions-container {
	display: none;
}
