
div.mainmenu.aimewhatsapp {
	background-image: url(/doli24demo/custom/aimewhatsapp/img/aimewhatsapp.png);
	background-size: 28px 28px;  /* Adjust these values to make image larger */
	background-repeat: no-repeat;
	background-position: center;
}
.whatsapp-container {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
	padding: 30px;
	margin-top: 20px;
	gap: 30px;
	font-family: "Open Sans", sans-serif;
}
.whatsapp-steps {
	flex: 1;
	color: #333;
}
.whatsapp-steps h3 {
	color: #075E54;
	margin-bottom: 15px;
}
.whatsapp-steps ol {
	padding-left: 20px;
	margin-bottom: 20px;
}
.whatsapp-steps ol li {
	margin-bottom: 10px;
	line-height: 1.6;
}
.whatsapp-right {
	flex: 1;
	text-align: center;
}
.whatsapp-right img {
	width: 250px;
	height: 250px;
	border-radius: 8px;
	border: 1px solid #ccc;
	background: #f8f9fa;
}
.token-box {
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 10px;
	margin-top: 10px;
	word-break: break-all;
	color: #333;
}
.whatsapp-buttons {
	margin-top: 25px;
	text-align: center;
}
.status-badge {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 20px;
	font-weight: bold;
	color: white;
	background-color: #128C7E;
	margin-bottom: 15px;
}
.status-disconnected { background-color: #d9534f; }

.myclasscss {
	/* ... */
}

/* Always show WhatsApp opt-in field (override "More" collapse) */
.field_options_whatsapp_optin {
	display: table-row !important;
}

/* WhatsApp form preview */
.wa-preview-label {
	font-weight: 600;
	color: #666;
	margin-bottom: 4px;
	font-size: 12px;
	white-space: nowrap;
}
.wa-preview-box {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
	padding: 8px 10px;
	white-space: pre-wrap;
	word-wrap: break-word;
	flex: 1;
	min-height: 150px;
	max-height: 250px;
	overflow-y: auto;
	font-size: 13px;
	color: #333;
}
.wa-message-textarea {
	flex: 1;
	min-height: 150px;
	resize: vertical;
}


/* ============================================================
   WHATSAPP SEND FORM (textarea + preview side by side)
   ============================================================ */

#whatsappform {
	background: #ffffff;
	border: 1px solid #e8ecf1;
	border-radius: 14px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	padding: 22px 26px 26px;
}

#whatsappform table {
	margin: 0;
}

#whatsappform table td {
	padding-top: 10px;
	padding-bottom: 10px;
	vertical-align: top;
}

#whatsappform .fieldrequired,
#whatsappform td.tdtop {
	color: #075E54;
	font-weight: 600;
	font-size: 13px;
	letter-spacing: 0.3px;
}

.wa-form-container {
	display: flex;
	gap: 40px;
}

.wa-form-col {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.wa-form-preview-label {
	font-weight: 600;
	color: #075E54;
	margin-bottom: 6px;
	font-size: 12px;
	white-space: nowrap;
}

.wa-form-preview-box {
	background: #DCF8C6;
	border: 1px solid #c6efad;
	border-radius: 12px 12px 12px 4px;
	padding: 12px 14px;
	white-space: pre-wrap;
	word-wrap: break-word;
	flex: 1;
	min-height: 150px;
	max-height: 250px;
	overflow-y: auto;
	font-size: 13px;
	line-height: 1.5;
	color: #1f2937;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

#whatsappform .wa-form-textarea {
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 13px;
	font-family: inherit;
	background: #fcfcfc;
	flex: 1;
	min-height: 150px;
	resize: vertical;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

#whatsappform .wa-form-textarea:focus {
	outline: none;
	border-color: #25D366;
	background: #fff;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12);
}

#whatsappform input[type="text"],
#whatsappform select {
	border: 1px solid #25D366;
	border-radius: 6px;
	padding: 6px 10px;
	font-size: 13px;
}

#whatsappform input[type="text"]:focus,
#whatsappform select:focus {
	outline: none;
	border-color: #1DA851;
	box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.15);
}

/* Select de plantilla con apariencia personalizada */
#whatsappform select#templateid {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23075E54' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	padding: 10px 34px 10px 14px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background-color: #fff;
	font-size: 13px;
	color: #333;
	cursor: pointer;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

#whatsappform select#templateid:hover {
	border-color: #25D366;
}

#whatsappform select#templateid:focus {
	outline: none;
	border-color: #25D366;
	box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.15);
}

#whatsappform input,
#whatsappform select,
#whatsappform textarea {
	border-radius: 6px;
}

.wa-phone-preview {
	font-size: 11px;
	color: #6b7280;
	margin-top: 4px;
	padding-left: 4px;
}

#whatsappform input[type="file"] {
	border: 1px dashed #25D366;
	border-radius: 8px;
	padding: 12px;
	background: #fafff5;
	cursor: pointer;
	width: 100%;
	transition: border-color 0.2s ease, background 0.2s ease;
}

#whatsappform input[type="file"]:hover {
	border-color: #1DA851;
	background: #f2fdea;
}

.wa-form-file-help {
	font-size: 11px;
	color: #6b7280;
	font-style: italic;
}

.wa-char-counter {
	text-align: right;
	font-size: 11px;
	color: #6b7280;
	margin-top: 6px;
}

#char-count {
 	font-weight: 700;
 	color: #075E54;
 }

/* Boton emoji circular */
#whatsappform .emoji-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	transition: background 0.15s ease, transform 0.15s ease;
}

#whatsappform .emoji-toggle:hover {
	background: #e8f5e9;
	transform: scale(1.1);
}

/* Hover suave en filas de adjuntos */
#whatsappform .wa-attachment-row:hover {
	background: #f9fafb;
}

@media (max-width: 640px) {
	#whatsappform {
		padding: 16px 14px;
	}
	#whatsappform table,
	#whatsappform table tbody,
	#whatsappform table tr,
	#whatsappform table td {
		display: block;
		width: 100%;
	}
	#whatsappform table td {
		text-align: left !important;
		padding: 4px 0;
	}
	#whatsappform table td:first-child {
		font-weight: 600;
		padding-top: 10px;
	}
}

#whatsappform .wa-form-textarea,
#whatsappform .wa-form-preview-box {
	transition: opacity 0.2s ease;
}

.wa-form-col:first-child::before {
	content: '';
	display: block;
	height: 20px;
	visibility: hidden;
}

#whatsappform input[type="checkbox"] {
	accent-color: #25D366;
	transform: scale(1.1);
	margin-right: 4px;
	vertical-align: middle;
}

#whatsappform label {
	font-size: 13px;
	color: #333;
	cursor: pointer;
}

#whatsappform label:hover {
	color: #1DA851;
}

.wa-form-btn-send {
	background: linear-gradient(135deg, #25D366 0%, #1DA851 100%);
	color: #fff;
	border: none;
	border-radius: 8px;
	padding: 10px 28px;
	font-weight: 600;
	font-size: 13px;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
	transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.wa-form-btn-send:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
	filter: brightness(1.03);
}

.wa-form-btn-send:active {
	transform: scale(0.97);
}

.wa-form-btn-cancel {
	background: transparent;
	color: #6b7280;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	padding: 10px 28px;
	font-size: 13px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wa-form-btn-cancel:hover {
	background: #f3f4f6;
	border-color: #c0c4cc;
}

.wa-form-save-btn {
	background: #25D366;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 6px 12px;
	cursor: pointer;
	font-size: 14px;
	line-height: 1;
	box-shadow: 0 1px 4px rgba(37, 211, 102, 0.25);
	transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.wa-form-save-btn:hover {
	filter: brightness(1.05);
	box-shadow: 0 2px 8px rgba(37, 211, 102, 0.35);
}

.wa-form-save-btn:disabled {
	opacity: 0.4;
	cursor: not-allowed;
	box-shadow: none;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
	.wa-form-container {
		flex-direction: column;
		gap: 16px;
	}
}


/* ============================================================
   SENDING MODAL (spinner overlay on form submit)
   ============================================================ */

#wa-sending-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.45);
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.wa-sending-box {
	background: #fff;
	border-radius: 16px;
	padding: 36px 52px;
	text-align: center;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.wa-spinner {
	width: 44px;
	height: 44px;
	border: 4px solid #e8e8e8;
	border-top-color: #25D366;
	border-radius: 50%;
	animation: wa-spin 0.6s linear infinite;
	margin: 0 auto 18px;
}

.wa-sending-text {
	font-size: 15px;
	color: #1f2937;
	font-weight: 500;
}

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