/* WhatsApp CRM — opt-in form, popup and button */

.wacrm-optin-button {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #25d366;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 10px 18px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
}
.wacrm-optin-button:hover { background: #1da851; color: #fff; }

/* Themes sometimes force display on buttons, so make the hidden state stick. */
.wacrm-optin-mount[hidden] { display: none !important; }

.wacrm-optin-overlay {
	position: fixed;
	inset: 0;
	background: rgba(11, 20, 26, .55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	z-index: 100000;
}
body.wacrm-optin-open { overflow: hidden; }

.wacrm-optin-dialog,
.wacrm-optin-card {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 12px 40px rgba(0,0,0,.25);
	width: 100%;
	max-width: 380px;
	padding: 20px;
	box-sizing: border-box;
}
.wacrm-optin-card { box-shadow: 0 1px 3px rgba(0,0,0,.12); border: 1px solid #e2e4e7; }

.wacrm-optin-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.wacrm-optin-title { margin: 0 0 12px; font-size: 19px; line-height: 1.3; }
.wacrm-optin-close {
	flex: 0 0 auto;
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: none;
	box-shadow: none;
	width: 32px;
	height: 32px;
	margin: -4px -4px 0 0;
	padding: 0;
	border-radius: 50%;
	font-size: 26px;
	line-height: 1;
	text-align: center;
	cursor: pointer;
	color: #667781;
}
.wacrm-optin-close:hover,
.wacrm-optin-close:focus {
	background: #f0f2f5;
	color: #111b21;
}

.wacrm-optin-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; cursor: pointer; }
.wacrm-optin-input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 400;
	margin: 0 0 12px;
}
/* Themes hide or disable form controls in ways that would reach into the
   dialog. These fields must stay reachable whatever the page around them
   does. */
.wacrm-optin-form .wacrm-optin-input,
.wacrm-optin-consent input {
	pointer-events: auto !important;
	position: static !important;
	opacity: 1 !important;
	visibility: visible !important;
	-webkit-user-select: text;
	user-select: text;
	clip: auto !important;
	clip-path: none !important;
}
.wacrm-optin-input:focus { outline: 2px solid #25d366; outline-offset: 1px; }
.wacrm-optin-hint { font-size: 12px; color: #667781; margin: -8px 0 12px; }

.wacrm-optin-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 13px;
	line-height: 1.4;
	margin-bottom: 4px;
}
.wacrm-optin-consent input { flex: 0 0 auto; margin: 2px 0 0; width: auto; }
.wacrm-optin-consent label { font-size: 13px; font-weight: 400; line-height: 1.4; margin: 0; cursor: pointer; }

.wacrm-optin-submit {
	width: 100%;
	background: #25d366;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 11px 16px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	margin-top: 8px;
}
.wacrm-optin-submit:hover { background: #1da851; }
.wacrm-optin-submit:disabled { opacity: .6; cursor: not-allowed; }

.wacrm-optin-msg { display: block; margin-top: 12px; font-size: 13px; min-height: 18px; }
.wacrm-optin-msg.is-error { color: #a02620; }
.wacrm-optin-msg.is-ok { color: #1a7a45; }

.wacrm-optin-done { font-size: 14px; color: #1a7a45; }
