/* Main Wrapper */
#plusmagi-search-wrapper {
	position: relative;
	width: 100%;
}

/* Input Styles */
#plusmagi-search-input {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.5;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) inset;
	transition: all 0.2s ease;
	background-color: #fff;
	color: #333;
}

#plusmagi-search-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

/* Results Dropdown */
#plusmagi-search-results {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	margin-top: 4px;

	/* Try to use theme's background color variable, fallback to white */
	background-color: var(--wp--preset--color--background, #ffffff);
	color: var(--wp--preset--color--text, #333333);

	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	z-index: 999999;
	max-height: 350px;
	overflow-y: auto;
	opacity: 1;
}

/* Ensure children inherit transparency or theme color */
#plusmagi-search-results ul,
#plusmagi-search-results li,
#plusmagi-search-results div {
	background-color: inherit;
	color: inherit;
	opacity: 1;
}

/* Tabs Styles */
.plusmagi-search-tabs {
	display: flex;
	border-bottom: 1px solid #ddd;
	background: #f1f1f1;
}

.plusmagi-tab {
	flex: 1;
	padding: 10px;
	text-align: center;
	cursor: pointer;
	border-right: 1px solid #ddd;
	font-size: 13px;
	font-weight: 500;
	color: #555;
	transition: background 0.2s;
}

.plusmagi-tab:last-child {
	border-right: none;
}

.plusmagi-tab:hover {
	background: #e9e9e9;
}

.plusmagi-tab.active {
	background: #fff;
	border-bottom: 1px solid #fff;
	margin-bottom: -1px;
	color: #2271b1;
	font-weight: 600;
}

/* Tab Content */
.plusmagi-tab-content {
	padding: 0;
	/* max-height is handled by the parent container usually */
}

.plusmagi-tab-content ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.plusmagi-tab-content li {
	border-bottom: 1px solid #f0f0f0;
}

.plusmagi-tab-content a {
	display: flex;
	align-items: center;
	padding: 10px 12px;
	text-decoration: none;
	color: #333;
	transition: background-color 0.1s ease;
}

.plusmagi-tab-content a:hover {
	background: #f9f9f9;
}

/* Icons & Details */
.plusmagi-item-icon {
	margin-right: 12px;
	color: #8c8f94;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
}

.plusmagi-item-thumb {
	width: 32px;
	height: 32px;
	object-fit: cover;
	border-radius: 3px;
	border: 1px solid #ddd;
}

.plusmagi-item-details {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.plusmagi-item-title {
	font-weight: 500;
	font-size: 14px;
	line-height: 1.4;
	color: #1d2327;
}

.plusmagi-item-info {
	font-size: 12px;
	color: #646970;
	margin-top: 2px;
}

/* Status Pills */
.plusmagi-search-status-pill {
	display: inline-block;
	padding: 2px 6px;
	font-size: 10px;
	text-transform: uppercase;
	border-radius: 2px;
	background-color: #f0f0f1;
	color: #50575e;
	margin-left: 6px;
	font-weight: 600;
	vertical-align: middle;
}

.no-results,
.error {
	padding: 16px;
	text-align: center;
	color: #646970;
	font-size: 13px;
}