/* Search Sidebar Styles */

/* Search Toggle Button - Now using standard Button block with icon-buttons.css */

/* Search Overlay */
.taxspoc-search-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.5);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	pointer-events: none;
}

.taxspoc-search-overlay.active {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Ensure sidebar is above overlay */
.taxspoc-search-sidebar {
	z-index: 10000;
	position: relative;
}

.taxspoc-search-sidebar.active {
	pointer-events: auto;
	z-index: 10000;
}

@media (max-width: 768px) {
	.taxspoc-search-sidebar.active {
		z-index: 10001;
	}
}

/* Search Sidebar (Left) */
.taxspoc-search-sidebar {
	position: fixed;
	top: 0;
	left: -500px;
	width: 500px;
	max-width: 90vw;
	height: 100vh;
	background-color: #FFFFFF;
	box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
	z-index: 10000;
	overflow-y: auto;
	transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	flex-direction: column;
	pointer-events: auto !important;
	-webkit-overflow-scrolling: touch;
}

.taxspoc-search-sidebar.active {
	left: 0;
}

.taxspoc-search-sidebar[aria-hidden="false"] {
	left: 0;
}

/* Search Header */
.taxspoc-search-header {
	padding: 30px;
	border-bottom: 1px solid #eeeeee;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background-color: #FFFFFF;
	position: sticky;
	top: 0;
	z-index: 10;
}

.taxspoc-search-title {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	color: #404040;
}

.taxspoc-search-close {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	width: 32px;
	height: 32px;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.3s ease;
}

.taxspoc-search-close:hover {
	transform: rotate(90deg);
}

.taxspoc-search-close span {
	display: block;
	width: 24px;
	height: 2px;
	background-color: #404040;
	position: absolute;
	transition: all 0.3s ease;
}

.taxspoc-search-close span:nth-child(1) {
	transform: rotate(45deg);
}

.taxspoc-search-close span:nth-child(2) {
	transform: rotate(-45deg);
}

/* Search Content */
.taxspoc-search-content {
	flex: 1;
	padding: 30px;
	overflow-y: auto;
	pointer-events: auto !important;
	position: relative;
	z-index: 10001 !important;
}

/* Search Form */
.taxspoc-search-form {
	margin-bottom: 30px;
}

.taxspoc-search-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	border: 2px solid #dddddd;
	border-radius: 26px;
	padding: 12px 20px;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
	pointer-events: auto !important;
	z-index: 10002 !important;
}

.taxspoc-search-input-wrapper:focus-within {
	border-color: #ff7043;
	box-shadow: 0 0 0 3px rgba(255, 112, 67, 0.1);
}

.taxspoc-search-input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 18px;
	color: #404040;
	background: transparent;
	padding: 0;
	margin-right: 15px;
	pointer-events: auto !important;
	-webkit-user-select: text !important;
	user-select: text !important;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	min-width: 0;
	cursor: text !important;
}

.taxspoc-search-input::placeholder {
	color: #999999;
}

.taxspoc-search-submit {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ff7043;
	transition: transform 0.3s ease, color 0.3s ease;
}

.taxspoc-search-submit:hover {
	transform: scale(1.1);
	color: #ff5722;
}

/* Search Results */
.taxspoc-search-results {
	min-height: 200px;
}

.taxspoc-search-loading {
	text-align: center;
	padding: 40px 20px;
	color: #666666;
}

.taxspoc-search-spinner {
	border: 3px solid #f3f3f3;
	border-top: 3px solid #ff7043;
	border-radius: 50%;
	width: 40px;
	height: 40px;
	animation: spin 1s linear infinite;
	margin: 0 auto 20px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

.taxspoc-search-results-list {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.taxspoc-search-result-item {
	padding: 20px;
	border: 1px solid #eeeeee;
	border-radius: 12px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.taxspoc-search-result-item:hover {
	border-color: #ff7043;
	box-shadow: 0 4px 12px rgba(255, 112, 67, 0.1);
	transform: translateY(-2px);
}

.taxspoc-search-result-item a {
	text-decoration: none;
	color: inherit;
	display: block;
}

.taxspoc-search-result-title {
	font-size: 20px;
	font-weight: 600;
	color: #404040;
	margin: 0 0 10px 0;
	transition: color 0.3s ease;
}

.taxspoc-search-result-item:hover .taxspoc-search-result-title {
	color: #ff7043;
}

.taxspoc-search-result-excerpt {
	font-size: 14px;
	color: #666666;
	line-height: 1.6;
	margin: 0 0 10px 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.taxspoc-search-result-meta {
	font-size: 12px;
	color: #999999;
	display: flex;
	gap: 15px;
	align-items: center;
}

.taxspoc-search-result-date {
	margin: 0;
}

.taxspoc-search-result-category {
	margin: 0;
}

.taxspoc-search-result-category a {
	color: #ff7043;
	text-decoration: none;
	font-weight: 500;
}

.taxspoc-search-empty {
	text-align: center;
	padding: 60px 20px;
	color: #999999;
}

.taxspoc-search-empty p {
	margin: 0;
	font-size: 16px;
}

/* Body scroll lock when search is open */
body.taxspoc-search-open {
	overflow: hidden;
}

/* Responsive */
@media (max-width: 768px) {
	.taxspoc-search-sidebar {
		width: 100%;
		max-width: 100vw;
		left: -100%;
	}
	
	.taxspoc-search-sidebar.active {
		left: 0;
	}
	
	.taxspoc-search-header {
		padding: 20px;
	}
	
	.taxspoc-search-content {
		padding: 20px;
	}
}

/* Animation for search results */
@keyframes slideInLeft {
	from {
		opacity: 0;
		transform: translateX(-20px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item {
	animation: slideInLeft 0.3s ease forwards;
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item:nth-child(1) {
	animation-delay: 0.1s;
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item:nth-child(2) {
	animation-delay: 0.15s;
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item:nth-child(3) {
	animation-delay: 0.2s;
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item:nth-child(4) {
	animation-delay: 0.25s;
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item:nth-child(5) {
	animation-delay: 0.3s;
}

.taxspoc-search-sidebar.active .taxspoc-search-results-list .taxspoc-search-result-item:nth-child(n+6) {
	animation-delay: 0.35s;
}

