/* Request a Quote */

.rfq-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

/* ---------- כפתור בעמוד מוצר ---------- */

.button.rfq-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background-color: var(--fs-color-primary, #000000);
	color: #ffffff;
	border: none;
	font-weight: bold;
	cursor: pointer;
}

.rfq-btn .rfq-icon {
	display: inline-flex;
	align-items: center;
}

.rfq-btn.is-loading,
.rfq-loop-btn.is-loading,
.rfq-submit.is-loading {
	opacity: 0.6;
	pointer-events: none;
	cursor: progress;
}

/* ---------- כפתור בכרטיס מוצר (קטלוג) ---------- */

.box-image,
.product-small .box-image {
	position: relative !important;
}

.rfq-loop-btn-wrapper {
	position: absolute !important;
	top: 10px !important;
	right: 10px !important;
	z-index: 20 !important;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.product-small:hover .rfq-loop-btn-wrapper,
.box:hover .rfq-loop-btn-wrapper,
.box-image:hover .rfq-loop-btn-wrapper,
.rfq-loop-btn-wrapper.is-added,
.rfq-loop-btn-wrapper:focus-within {
	opacity: 1 !important;
	visibility: visible !important;
}

button.rfq-loop-btn,
.rfq-loop-btn {
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px !important;
	max-width: 36px !important;
	min-height: 36px !important;
	max-height: 36px !important;
	box-sizing: border-box !important;
	background-color: var(--fs-color-primary, #000000) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 50% !important;
	cursor: pointer !important;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2) !important;
	transition: background-color 0.2s ease, transform 0.2s ease !important;
	padding: 0 !important;
	margin: 0 !important;
	line-height: 1 !important;
	outline: none !important;
	text-transform: none !important;
}

.rfq-loop-btn:focus-visible {
	box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.9), 0 0 0 5px var(--fs-color-primary, #000000) !important;
}

.rfq-loop-btn:hover {
	filter: brightness(0.9);
	transform: scale(1.08) !important;
}

.rfq-loop-btn.added {
	background-color: #28a745 !important;
}

.rfq-loop-btn .rfq-icon {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	height: 100% !important;
	pointer-events: none;
}

.rfq-loop-btn .rfq-tooltip {
	position: absolute !important;
	top: 50% !important;
	right: calc(100% + 8px) !important;
	transform: translateY(-50%) translateX(6px) !important;
	background-color: #000000 !important;
	color: #ffffff !important;
	font-size: 11px !important;
	font-weight: bold !important;
	white-space: nowrap !important;
	padding: 5px 10px !important;
	border-radius: 4px !important;
	pointer-events: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

.rfq-loop-btn .rfq-tooltip::after {
	content: '' !important;
	position: absolute !important;
	top: 50% !important;
	left: 100% !important;
	transform: translateY(-50%) !important;
	border-width: 5px !important;
	border-style: solid !important;
	border-color: transparent transparent transparent #000000 !important;
}

.rfq-loop-btn:hover .rfq-tooltip {
	opacity: 1 !important;
	visibility: visible !important;
	transform: translateY(-50%) translateX(0) !important;
}

@media (max-width: 1023px) {
	.rfq-loop-btn-wrapper {
		display: none !important;
	}
}

/* ---------- כפתור בהדר ---------- */

.rfq-header-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	color: currentColor;
	vertical-align: middle;
}

.rfq-header-btn svg {
	width: 24px;
	height: 24px;
}

.rfq-header-btn .rfq-count {
	position: absolute;
	top: 1px;
	inset-inline-end: -2px;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	box-sizing: border-box;
	border-radius: 9px;
	background: var(--fs-color-primary, #000000);
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	transform: scale(0);
	transition: transform 0.2s ease;
}

.rfq-header-btn.has-items .rfq-count {
	transform: scale(1);
}

/* ---------- רשימת מוצרים (סיידבר + עמוד) ---------- */

.rfq-items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rfq-item {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 14px 0;
	border-bottom: 1px solid #e2e8f0;
	transition: opacity 0.2s ease;
}

.rfq-item.is-loading {
	opacity: 0.45;
	pointer-events: none;
}

.rfq-item__thumb {
	flex: 0 0 64px;
	display: block;
}

.rfq-item__thumb img {
	display: block;
	width: 64px;
	height: 64px;
	margin: 0;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid #e2e8f0;
}

.rfq-item__info {
	flex: 1 1 auto;
	min-width: 0;
}

.rfq-item__name {
	display: block;
	margin-bottom: 6px;
	color: #000000;
	font-weight: 700;
	line-height: 1.35;
	text-decoration: none;
}

.rfq-item__name:hover {
	text-decoration: underline;
}

.rfq-item__qty {
	display: flex;
	align-items: center;
	gap: 8px;
}

.rfq-item__qty label {
	margin: 0;
	font-size: 0.85em;
	font-weight: normal;
	color: #64748b;
}

.rfq-item__qty input.rfq-qty {
	width: 72px;
	height: 34px;
	margin: 0;
	padding: 4px 6px;
	text-align: center;
	font-size: 0.95em;
}

.rfq-remove-item {
	order: -1;
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: none;
	color: #94a3b8;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.rfq-remove-item:hover,
.rfq-remove-item:focus-visible {
	background: #fee2e2;
	color: #e53e3e;
}

.rfq-items--page .rfq-item__thumb {
	flex-basis: 80px;
}

.rfq-items--page .rfq-item__thumb img {
	width: 80px;
	height: 80px;
}

/* ---------- מצב ריק ---------- */

.rfq-empty {
	padding: 30px 10px;
	text-align: center;
}

.rfq-empty__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin-bottom: 12px;
	border-radius: 50%;
	background: #f1f5f9;
	color: #64748b;
}

.rfq-empty__icon svg {
	width: 30px;
	height: 30px;
}

.rfq-empty p {
	margin-bottom: 18px;
	color: #475569;
}

.rfq-empty .button {
	margin: 0;
}

/* ---------- סיידבר ---------- */

html.rfq-drawer-open {
	overflow: hidden;
}

.rfq-drawer {
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: hidden;
	pointer-events: none;
	transition: visibility 0s linear 0.3s;
}

.rfq-drawer.is-open {
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

.rfq-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.rfq-drawer.is-open .rfq-drawer__overlay {
	opacity: 1;
}

.rfq-drawer__panel {
	position: absolute;
	top: 0;
	bottom: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: 420px;
	max-width: 100%;
	background: #ffffff;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.2);
	outline: none;
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

.rfq-drawer.is-open .rfq-drawer__panel {
	transform: none;
}

.rfq-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 20px;
	border-bottom: 1px solid #e2e8f0;
}

.rfq-drawer__title {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	font-size: 1.15em;
	line-height: 1.3;
}

.rfq-drawer__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 24px;
	height: 24px;
	padding: 0 7px;
	box-sizing: border-box;
	border-radius: 12px;
	background: var(--fs-color-primary, #000000);
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
}

.rfq-drawer.is-empty .rfq-drawer__count {
	display: none;
}

.rfq-drawer__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: none;
	color: #334155;
	cursor: pointer;
}

.rfq-drawer__close:hover,
.rfq-drawer__close:focus-visible {
	background: #f1f5f9;
}

.rfq-drawer__body {
	position: relative;
	flex: 1 1 auto;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 4px 20px;
	transition: opacity 0.2s ease;
}

.rfq-drawer.is-loading .rfq-drawer__body {
	opacity: 0.4;
	pointer-events: none;
}

.rfq-drawer__footer {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px 20px;
	border-top: 1px solid #e2e8f0;
	background: #f8fafc;
}

.rfq-drawer__footer .button,
.rfq-drawer__footer .rfq-more-products__link {
	justify-content: center;
	width: 100%;
	margin: 0;
	box-sizing: border-box;
}

.rfq-drawer.is-empty .rfq-drawer__footer {
	display: none;
}

/* ---------- עמוד הבקשה ---------- */

.rfq-page__grid {
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	align-items: flex-start;
}

.rfq-page__items {
	flex: 1 1 500px;
	min-width: 0;
}

.rfq-page__form-wrap {
	flex: 1 1 350px;
	padding: 25px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #f8fafc;
}

.rfq-page.is-loading .rfq-page__form-wrap,
.rfq-page.is-empty .rfq-page__form-wrap,
.rfq-page.is-sent .rfq-page__grid {
	display: none;
}

.rfq-page__form-wrap h3 {
	margin-top: 0;
	margin-bottom: 20px;
	font-size: 1.3rem;
}

.rfq-form p {
	margin-bottom: 15px;
}

.rfq-form label {
	display: block;
	margin-bottom: 5px;
	font-weight: bold;
}

.rfq-form input,
.rfq-form textarea {
	width: 100%;
	margin: 0;
}

/* שדות שמוקלדים משמאל לימין (דוא"ל, טלפון) – ה-placeholder בעברית נשאר מיושר לימין */
.rfq-form input[dir="ltr"]:placeholder-shown {
	direction: rtl;
	text-align: right;
}

.rfq-required {
	color: #e53e3e;
}

.rfq-form__error {
	margin-bottom: 15px;
	padding: 12px 15px;
	border-radius: 4px;
	background: #fee2e2;
	color: #991b1b;
}

.rfq-form__error[hidden] {
	display: none;
}

.rfq-form .rfq-submit {
	width: 100%;
	margin: 0;
	padding: 12px 25px;
	font-weight: bold;
}

.rfq-more-products {
	margin-top: 15px;
}

.rfq-more-products__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border: 1px solid #cbd5e1;
	background-color: #f1f5f9;
	color: var(--fs-color-secondary);
	font-weight: bold;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.rfq-more-products__link:hover {
	background-color: #e2e8f0;
	color: var(--fs-color-secondary);
}

/* כל הכפתורים של התוסף – רדיוס גלובלי מקובץ הסטייל של התבנית */
.button.rfq-btn,
.rfq-empty .button,
.rfq-drawer__footer .button,
.rfq-more-products__link,
.rfq-form .rfq-submit,
.rfq-success .button,
.rfq-load-error .button {
	border-radius: var(--fs-radius-sm);
}

.rfq-success {
	margin-bottom: 20px;
	padding: 20px;
	border-radius: 4px;
	background: #d4edda;
	color: #155724;
}

.rfq-success p {
	margin-bottom: 15px;
}

.rfq-success .button {
	margin: 0;
}

.rfq-load-error {
	padding: 30px 10px;
	text-align: center;
	color: #475569;
}

/* ---------- טעינה ---------- */

.rfq-loader {
	display: flex;
	justify-content: center;
	padding: 40px 0;
}

.rfq-loader::before {
	content: '';
	width: 32px;
	height: 32px;
	border: 3px solid #e2e8f0;
	border-top-color: var(--fs-color-primary, #000000);
	border-radius: 50%;
	animation: rfq-spin 0.8s linear infinite;
}

@keyframes rfq-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- הודעות קופצות ---------- */

.rfq-toasts {
	position: fixed;
	bottom: 20px;
	left: 50%;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: max-content;
	max-width: calc(100vw - 32px);
	transform: translateX(-50%);
	pointer-events: none;
}

.rfq-toast {
	padding: 12px 18px;
	border-radius: 6px;
	background: #1e293b;
	color: #ffffff;
	font-size: 14px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.rfq-toast--error {
	background: #b91c1c;
}

.rfq-toast.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {
	.rfq-drawer__panel,
	.rfq-drawer__overlay,
	.rfq-toast {
		transition: none;
	}
}

/* Cloudflare Turnstile */
.rfq-turnstile {
	margin: 0 0 1em;
	min-height: 65px;
}

