/* سرچ بارکد سریع — header icon & scanner modal */

.wbs-header-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	margin: 0 4px;
	border: none;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
	vertical-align: middle;
}

.wbs-header-icon:hover,
.wbs-header-icon:focus {
	background: rgba(0, 0, 0, 0.06);
	outline: none;
}

.wbs-header-icon:active {
	transform: scale(0.96);
}

.wbs-menu-icon-item {
	list-style: none;
	display: inline-flex;
	align-items: center;
}

.wbs-shortcode-wrap {
	text-align: center;
	padding: 24px 0;
}

.wbs-shortcode-trigger {
	width: auto;
	height: auto;
	padding: 12px 20px;
	border-radius: 8px;
	gap: 8px;
	font-size: 15px;
	font-weight: 600;
	background: #2271b1;
	color: #fff;
}

.wbs-shortcode-trigger:hover,
.wbs-shortcode-trigger:focus {
	background: #135e96;
	color: #fff;
}

.wbs-shortcode-trigger span {
	margin-right: 8px;
}

.wbs-modal {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.wbs-modal.is-open {
	opacity: 1;
	visibility: visible;
}

.wbs-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
}

.wbs-modal-panel {
	position: relative;
	width: 100%;
	max-width: 420px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
	overflow: hidden;
	direction: rtl;
}

.wbs-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	border-bottom: 1px solid #eee;
}

.wbs-modal-header h2 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #1d2327;
}

.wbs-modal-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	border-radius: 50%;
	background: transparent;
	font-size: 24px;
	line-height: 1;
	color: #666;
	cursor: pointer;
}

.wbs-modal-close:hover {
	background: #f0f0f0;
}

.wbs-modal-body {
	padding: 16px 20px 20px;
}

.wbs-scanner-wrap {
	position: relative;
	border-radius: 8px;
	overflow: hidden;
	background: #111;
	margin-bottom: 16px;
}

.wbs-video {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
	background: #000;
}

.wbs-scan-hint {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	margin: 0;
	padding: 10px 12px;
	font-size: 13px;
	text-align: center;
	color: #fff;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
}

.wbs-manual {
	display: flex;
	gap: 8px;
	margin-bottom: 8px;
}

.wbs-manual-input {
	flex: 1;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 15px;
	direction: ltr;
	text-align: left;
}

.wbs-manual-input:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.wbs-btn {
	padding: 10px 16px;
	border: none;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.wbs-btn-primary {
	background: #2271b1;
	color: #fff;
}

.wbs-btn-primary:hover {
	background: #135e96;
}

.wbs-btn-primary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.wbs-message {
	margin: 8px 0 0;
	padding: 10px 12px;
	border-radius: 6px;
	font-size: 14px;
	line-height: 1.5;
}

.wbs-message.is-error {
	background: #fce8e8;
	color: #b32d2e;
	border: 1px solid #f5c2c2;
}

.wbs-message.is-info {
	background: #eef6fc;
	color: #2271b1;
	border: 1px solid #c5dff5;
}

.wbs-message[hidden] {
	display: none !important;
}

/* Woodmart header alignment */
.whb-header .wbs-header-icon,
.woodmart-header-links .wbs-header-icon,
.wd-header-search .wbs-header-icon {
	flex-shrink: 0;
}

.wbs-header-icon-fixed {
	position: fixed;
	top: 12px;
	left: 12px;
	z-index: 99990;
	background: #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
	color: #1d2327;
}

body.wbs-modal-open {
	overflow: hidden;
}

@media (max-width: 768px) {
	.wbs-video {
		height: 200px;
	}

	.wbs-manual {
		flex-direction: column;
	}

	.wbs-header-icon-fixed {
		top: auto;
		bottom: 16px;
		left: 16px;
	}
}
