/* ═══════════════════════════════════
   Zapefy Lead Tracker — Widget Styles
   ═══════════════════════════════════ */

/* ── Button Base ── */

.gs-lt-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	text-decoration: none;
	font-weight: 600;
	font-size: 16px;
	line-height: 1.4;
	border: none;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
}

.gs-lt-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

.gs-lt-btn:active {
	transform: translateY(0);
}

.gs-lt-btn .gs-lt-icon {
	flex-shrink: 0;
}

.gs-lt-btn.gs-lt-loading {
	opacity: 0.7;
	pointer-events: none;
}

/* ── Wrapper ── */

.gs-lt-whatsapp-wrapper {
	display: inline-block;
	width: 100%;
}

/* ── Form Container (inline) ── */

.gs-lt-form-container {
	margin-top: 12px;
	box-sizing: border-box;
}

.gs-lt-whatsapp-form {
	display: flex;
	flex-direction: column;
}

.gs-lt-whatsapp-form input,
.gs-lt-whatsapp-form textarea {
	width: 100%;
	box-sizing: border-box;
	font-size: 14px;
	line-height: 1.5;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.gs-lt-whatsapp-form input:focus,
.gs-lt-whatsapp-form textarea:focus {
	border-color: #25D366;
	box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.15);
}

.gs-lt-whatsapp-form input.gs-lt-field-error,
.gs-lt-whatsapp-form textarea.gs-lt-field-error {
	border-color: #e74c3c;
	box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.15);
}

.gs-lt-whatsapp-form .gs-lt-submit {
	width: 100%;
	margin-top: 4px;
}

/* ── Floating Button ── */

.gs-lt-floating {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.gs-lt-floating-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	background-color: #25D366;
	color: #ffffff;
	width: 60px;
	height: 60px;
}

.gs-lt-floating-btn svg {
	width: 28px;
	height: 28px;
}

.gs-lt-floating-btn:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ── Pulse Animation ── */

.gs-lt-pulse {
	animation: gs-lt-pulse-anim 2s infinite;
}

@keyframes gs-lt-pulse-anim {
	0% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
	}
	70% {
		box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
	}
}

/* ── Floating Popup ── */

.gs-lt-floating-popup {
	position: absolute;
	bottom: calc(100% + 12px);
	right: 0;
	padding: 16px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.gs-lt-floating[style*="left"] .gs-lt-floating-popup {
	right: auto;
	left: 0;
}

.gs-lt-floating-popup .gs-lt-whatsapp-form {
	gap: 10px;
}

.gs-lt-floating-popup .gs-lt-whatsapp-form input,
.gs-lt-floating-popup .gs-lt-whatsapp-form textarea {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
}

.gs-lt-floating-popup .gs-lt-submit {
	background-color: #25D366;
	color: #fff;
	border: none;
	padding: 10px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.gs-lt-floating-popup .gs-lt-submit:hover {
	background-color: #1da851;
}

/* ── Tooltip ── */

.gs-lt-floating-tooltip {
	position: absolute;
	bottom: calc(100% + 8px);
	right: 0;
	background: #333;
	color: #fff;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translateY(4px);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.gs-lt-floating:hover .gs-lt-floating-tooltip {
	opacity: 1;
	transform: translateY(0);
}

.gs-lt-floating-popup:not([style*="display: none"]) ~ .gs-lt-floating-tooltip {
	display: none;
}

/* ── Popup Overlay Mode ── */

.gs-lt-popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.gs-lt-popup-content {
	background: #ffffff;
	border-radius: 16px;
	padding: 32px 24px 24px;
	width: 90%;
	max-width: 400px;
	position: relative;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
	animation: gs-lt-popup-in 0.25s ease-out;
}

.gs-lt-popup-close {
	position: absolute;
	top: 12px;
	right: 16px;
	background: none;
	border: none;
	font-size: 24px;
	cursor: pointer;
	color: #999;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.gs-lt-popup-close:hover {
	background: #f0f0f0;
	color: #333;
}

.gs-lt-popup-content .gs-lt-form-container {
	display: block !important;
	margin-top: 0;
	background: transparent;
}

@keyframes gs-lt-popup-in {
	from {
		opacity: 0;
		transform: scale(0.9) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

/* ── Float Mode ── */

.gs-lt-float-container {
	position: fixed;
	bottom: 80px;
	right: 20px;
	background: #ffffff;
	border-radius: 16px;
	padding: 32px 20px 20px;
	width: 320px;
	max-width: calc(100vw - 40px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
	z-index: 99998;
	animation: gs-lt-float-in 0.2s ease-out;
}

.gs-lt-float-container .gs-lt-form-container {
	display: block !important;
	margin-top: 0;
	background: transparent;
}

.gs-lt-float-container .gs-lt-popup-close {
	top: 8px;
	right: 12px;
}

.gs-lt-whatsapp-float-mode {
	position: relative;
}

@keyframes gs-lt-float-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Phone Input with Country Selector ── */

.gs-lt-phone-wrapper {
	position: relative;
	display: flex;
	align-items: stretch;
}

.gs-lt-phone-wrapper .gs-lt-phone-input {
	flex: 1;
	border-top-left-radius: 0 !important;
	border-bottom-left-radius: 0 !important;
	min-width: 0;
}

.gs-lt-phone-country {
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 0 10px;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-right: none;
	border-radius: 6px 0 0 6px;
	cursor: pointer;
	white-space: nowrap;
	font-size: 14px;
	user-select: none;
	transition: background-color 0.15s ease;
}

.gs-lt-phone-country:hover {
	background: #eee;
}

.gs-lt-phone-flag {
	font-size: 18px;
	line-height: 1;
}

.gs-lt-phone-dial {
	color: #555;
	font-size: 13px;
	font-weight: 500;
}

.gs-lt-phone-arrow {
	color: #999;
	font-size: 10px;
	margin-left: 2px;
}

.gs-lt-phone-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	z-index: 100;
	margin-top: 4px;
	max-height: 250px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}

.gs-lt-phone-search {
	padding: 10px 12px !important;
	border: none !important;
	border-bottom: 1px solid #eee !important;
	border-radius: 8px 8px 0 0 !important;
	font-size: 13px !important;
	outline: none !important;
	box-shadow: none !important;
}

.gs-lt-phone-list {
	overflow-y: auto;
	max-height: 200px;
}

.gs-lt-phone-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	cursor: pointer;
	font-size: 13px;
	transition: background-color 0.1s ease;
}

.gs-lt-phone-item:hover {
	background: #f5f5f5;
}

.gs-lt-phone-item.active {
	background: #e8f5e9;
}

.gs-lt-phone-item-flag {
	font-size: 16px;
}

.gs-lt-phone-item-name {
	flex: 1;
	color: #333;
}

.gs-lt-phone-item-dial {
	color: #999;
	font-size: 12px;
}

/* ── Mobile ── */

@media (max-width: 767px) {
	.gs-lt-floating-popup {
		width: calc(100vw - 40px) !important;
		right: -10px;
	}

	.gs-lt-floating[style*="left"] .gs-lt-floating-popup {
		left: -10px;
		right: auto;
	}

	.gs-lt-float-container {
		width: calc(100vw - 24px);
		right: 12px;
		bottom: 72px;
	}

	.gs-lt-popup-content {
		width: 95%;
		padding: 28px 16px 16px;
	}
}
