/**
 * WhatsApp Form - front-end styles
 * Namespaced with a `wf-` prefix everywhere to avoid clashing with theme CSS.
 */

.wf-popup-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.25);
	z-index: 999998;
}

.wf-popup-overlay.wf-open {
	display: block;
}

.wf-popup {
	display: none;
	flex-direction: column;
	position: fixed;
	right: 20px;
	bottom: 20px;
	width: 320px;
	max-width: calc(100vw - 24px);
	max-height: 520px !important;
	background: #e5ddd5;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wf-popup.wf-open {
	display: flex;
	animation: wf-fade-in 0.2s ease-out;
}
.wf-field-row input:focus,
.wf-field-row input:hover {
 box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
 border:1px solid #25d366 !important;
}

@keyframes wf-fade-in {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.wf-popup-header {
	display: flex;
	align-items: center;
	gap: 10px;
	background: #075e54;
	color: #fff;
	padding: 12px 14px;
	flex-shrink: 0;
}

.wf-popup-header-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #25d366;
	border-radius: 50%;
	flex-shrink: 0;
}

.wf-popup-header-title {
	flex: 1;
	font-size: 15px;
	font-weight: 600;
}

.wf-popup-close {
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 0 4px;
}

.wf-popup-body {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background-image: radial-gradient(rgba(0,0,0,0.04) 1px, transparent 1px);
	background-size: 14px 14px;
}

.wf-chat-bubble {
	background: #fff;
	border-radius: 8px;
	padding: 10px 12px;
	max-width: 85%;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.wf-chat-bubble p {
	margin: 0 0 4px;
	font-size: 14px;
	color: #111;
}

.wf-chat-time {
	font-size: 11px;
	color: #999;
}

.wf-lead-form {
	margin-top: auto;
	background: #fff;
	border-radius: 8px;
	padding: 10px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wf-field-row {
	margin: 0;
}

.wf-lead-form input,
.wf-lead-form textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #e2e2e2;
	border-radius: 20px !important;
	padding: 9px 15px !important;
	font-size: 13px !important;
	font-family: inherit !important;
	resize: none;
	background: #fafafa !important;
	box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03) !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.wf-lead-form textarea {
	border-radius: 14px;
}

.wf-lead-form input:hover,
.wf-lead-form textarea:hover {
	border-color: #c9c9c9 !important;
}

.wf-lead-form input:focus,
.wf-lead-form textarea:focus {
	outline: none;
	border-color: #25d366;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

.wf-lead-form input::placeholder,
.wf-lead-form textarea::placeholder {
	color: #999;
}

.wf-form-message {
	margin: 0;
	font-size: 12px;
	min-height: 14px;
}

.wf-form-message.wf-error {
	color: #d63638;
}

.wf-form-message.wf-success {
	color: #075e54;
}

.wf-submit-btn {
	align-self: flex-end;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #25d366 !important;
	border: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(37, 211, 102, 0.4);
	transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}
.wf-submit-btn {
	padding:0px !important;
}

.wf-submit-btn svg {
	transition: transform 0.15s ease;
}

.wf-submit-btn:hover {
	background: #22c55e;
	box-shadow: 0 4px 10px rgba(37, 211, 102, 0.45);
	transform: translateY(-1px);
}

.wf-submit-btn:active {
	transform: translateY(0) scale(0.94);
	box-shadow: 0 1px 3px rgba(37, 211, 102, 0.4);
}

.wf-submit-btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.35);
}

.wf-submit-btn:disabled {
	opacity: 0.6;
	cursor: default;
	transform: none;
	box-shadow: none;
}

/* --- Image upload field (shared by both forms) --- */

.wf-image-field-row {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.wf-image-label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 20px;
	border: 1px dashed #cfcfcf;
	background: #fafafa;
	color: #555;
	font-size: 12px;
	cursor: pointer;
	transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
}

.wf-image-label:hover {
	border-color: #25d366;
	color: #075e54;
	background: #f0fdf5;
}

.wf-image-input {
	/* Visually hidden but still keyboard/screen-reader accessible via its <label>. */
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.wf-image-filename {
	font-size: 12px;
	color: #666;
	word-break: break-all;
}

@media (max-width: 480px) {
	.wf-popup {
		right: 12px;
		bottom: 12px;
		left: 12px;
		width: auto;
	}
}