/*
 * כפתור וואטסאפ צף ותיבת פתיחה.
 * המידות והצבעים נמדדו מהאתר החי ב-25.9.2026: תיבה של 330 פיקסל, כותרת שחורה,
 * שדה של 43 פיקסל עם גבול #666, כפתור ירוק בצורת גלולה, וכפתור צף של 50 פיקסל
 * במרחק 15 פיקסל מהפינה.
 */

.avox-wa {
	--avox-wa-green: #25d366;
	--avox-wa-edge: 15px;

	position: fixed;
	bottom: var(--avox-wa-edge);
	z-index: 99999999;
	display: none;
	font-family: inherit;
}

.avox-wa--right {
	right: var(--avox-wa-edge);
}

.avox-wa--left {
	left: var(--avox-wa-edge);
}

/* מופיע רק אחרי ההשהיה, עם קפיצה קלה מהפינה — כמו במקור */
.avox-wa.is-visible {
	display: block;
	animation: avox-wa-enter 0.9s ease-out both;
}

@keyframes avox-wa-enter {
	0% { transform: translateY(40px) scale(0.6); opacity: 0; }
	55% { transform: translateY(-8px) scale(1.04); opacity: 1; }
	75% { transform: translateY(3px) scale(0.99); }
	100% { transform: none; }
}

@media (min-width: 1025px) {
	.avox-wa--no-desktop { display: none !important; }
}

@media (max-width: 1024px) {
	.avox-wa--no-mobile { display: none !important; }
}

/* ---------- הכפתור הצף ---------- */

.avox-wa .avox-wa__button {
	display: block;
	width: 50px;
	height: 50px;
	padding: 0;
	margin: 0;
	border: 0;
	background: none;
	cursor: pointer;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.avox-wa .avox-wa__button:hover {
	transform: scale(1.08);
}

.avox-wa .avox-wa__button:focus-visible,
.avox-wa .avox-wa__close:focus-visible,
.avox-wa .avox-wa__send:focus-visible {
	outline: 2px solid var(--avox-wa-green);
	outline-offset: 3px;
}

.avox-wa__icon-button {
	display: block;
	width: 50px;
	height: 50px;
}

/* ---------- תיבת הפתיחה ---------- */

.avox-wa__box {
	position: absolute;
	bottom: calc(50px + 18px);
	width: 330px;
	max-width: calc(100vw - 2 * var(--avox-wa-edge));
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
	visibility: hidden;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
	text-align: right;
}

.avox-wa--right .avox-wa__box { right: 0; }
.avox-wa--left .avox-wa__box { left: 0; }

.avox-wa.is-open .avox-wa__box {
	visibility: visible;
	opacity: 1;
	transform: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.avox-wa__head {
	position: relative;
	padding: 12px 19px;
	background: #000;
	color: #fff;
	line-height: 1.4;
}

.avox-wa__title {
	font-size: 17px;
	padding-inline-end: 24px;
}

.avox-wa__subtitle {
	margin-top: 2px;
	font-size: 14px;
	opacity: 0.9;
}

.avox-wa .avox-wa__close {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	padding: 5px;
	border: 0;
	border-radius: 50%;
	background: none;
	color: #d3d3d3;
	cursor: pointer;
}

.avox-wa .avox-wa__close:hover {
	color: #fff;
}

.avox-wa__body {
	margin: 0;
	padding: 18px 19px 5px;
	background: #fff;
	color: #333;
	font-size: 16px;
}

.avox-wa__text {
	margin: 0 0 12px;
	font-size: 16px;
	line-height: 1.5;
}

.avox-wa .avox-wa__input {
	display: block;
	width: 100%;
	height: 43px;
	margin: 0 0 11px;
	padding: 9px;
	box-sizing: border-box;
	border: 1px solid #666;
	border-radius: 4px;
	background: #fff;
	color: #000;
	font: inherit;
	font-size: 16px; /* 16 ומעלה — אחרת ספארי באייפון עושה זום בזמן הקלדה */
}

.avox-wa .avox-wa__input:focus {
	outline: none;
	border-color: var(--avox-wa-green);
	box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.25);
}

.avox-wa .avox-wa__send {
	/* האייקון משמאל לטקסט, כמו במקור — התיבה היא RTL אבל הכפתור כתוב באנגלית */
	direction: ltr;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 254px;
	max-width: 100%;
	height: 36px;
	margin: 0 auto 9px;
	padding: 0 16px;
	border: 0;
	border-radius: 999px;
	background: var(--avox-wa-green);
	color: #fff;
	font: inherit;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	transition: filter 0.2s ease;
}

.avox-wa .avox-wa__send:hover {
	filter: brightness(0.95);
}

.avox-wa__icon-glyph {
	display: block;
	width: 20px;
	height: 20px;
	flex: none;
}

.avox-wa__icon-close {
	display: block;
	width: 18px;
	height: 18px;
}

@media (prefers-reduced-motion: reduce) {
	.avox-wa.is-visible { animation: none; }
	.avox-wa__box, .avox-wa.is-open .avox-wa__box { transition: none; }
}
