/**
 * An-Nashihah Admin Notif — Frontend Styles
 *
 * Red dot indicator & bubble popup untuk shortcode [admin_notif].
 * Semua selector menggunakan prefix .anan- untuk isolasi CSS.
 */

/* ============================================================
 * Wrapper & Trigger Icon
 * ============================================================ */

.anan-notif-wrapper {
	display: inline-block;
	line-height: 0;
}

.anan-notif-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	position: relative;
	color: #1B6FE8;
	text-decoration: none;
	transition: opacity 0.15s;
}

.anan-notif-trigger:hover {
	opacity: 0.75;
}

.anan-notif-trigger .anan-icon-svg {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.anan-notif-trigger .anan-icon-svg svg {
	width: var(--anan-icon-size, 24px);
	height: var(--anan-icon-size, 24px);
	display: block;
}

/* ============================================================
 * Red Dot Indicator
 * ============================================================ */

.anan-red-dot {
	position: absolute;
	top: -2px;
	right: -2px;
	width: 8px;
	height: 8px;
	background-color: #e53935;
	border-radius: 50%;
	border: 1.5px solid #fff;
	pointer-events: none;
	z-index: 1;
	display: none; /* Default hidden, JS shows when new notif exists */
	animation: anan-pulse 2s ease-in-out infinite;
}

@keyframes anan-pulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.2);
		opacity: 0.8;
	}
}

/* ============================================================
 * Bubble Popup
 * ============================================================ */

.anan-notif-popup {
	position: fixed;
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
}

.anan-notif-popup-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	pointer-events: auto;
}

.anan-notif-popup-inner {
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12), 0 1px 4px rgba(0, 0, 0, 0.08);
	padding: 14px 36px 14px 16px;
	max-width: 300px;
	min-width: 200px;
	position: relative;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.anan-notif-datetime {
	font-size: 12px;
	color: #1B6FE8;
	font-weight: 600;
	margin-bottom: 6px;
	letter-spacing: 0.01em;
}

.anan-notif-text {
	font-size: 14px;
	color: #333;
	line-height: 1.5;
	word-wrap: break-word;
}

.anan-notif-close {
	position: absolute;
	top: 8px;
	right: 10px;
	background: none;
	border: none;
	font-size: 18px;
	color: #999;
	cursor: pointer;
	line-height: 1;
	padding: 2px 4px;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.anan-notif-close:hover {
	color: #333;
	background: #f0f0f0;
}

/* ============================================================
 * WhatsApp Icon
 * ============================================================ */

.anan-wa-wrapper {
	display: inline-block;
	line-height: 0;
	margin-left: 8px;
}

.anan-wa-trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #25D366;
	text-decoration: none;
	transition: opacity 0.15s;
}

.anan-wa-trigger:hover {
	opacity: 0.75;
}

.anan-wa-icon svg {
	width: var(--anan-icon-size, 24px);
	height: var(--anan-icon-size, 24px);
	display: block;
}

/* ============================================================
 * WhatsApp Modal
 * ============================================================ */

.anan-wa-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 9999999;
	align-items: center;
	justify-content: center;
}

.anan-wa-modal.anan-wa-modal-visible {
	display: flex;
}

.anan-wa-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
}

.anan-wa-modal-content {
	position: relative;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	padding: 24px;
	max-width: 400px;
	width: 90%;
	max-height: 90vh;
	overflow-y: auto;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.anan-wa-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 22px;
	color: #999;
	cursor: pointer;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 4px;
	transition: color 0.15s, background 0.15s;
}

.anan-wa-modal-close:hover {
	color: #333;
	background: #f0f0f0;
}

.anan-wa-modal-title {
	margin: 0 0 18px 0;
	font-size: 18px;
	font-weight: 700;
	color: #333;
	padding-right: 30px;
}

.anan-wa-form .anan-wa-field {
	margin-bottom: 14px;
}

.anan-wa-form .anan-wa-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #555;
	margin-bottom: 5px;
}

.anan-wa-form .anan-wa-field input,
.anan-wa-form .anan-wa-field textarea {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	font-family: inherit;
	box-sizing: border-box;
	transition: border-color 0.15s;
}

.anan-wa-form .anan-wa-field input:focus,
.anan-wa-form .anan-wa-field textarea:focus {
	outline: none;
	border-color: #25D366;
	box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.15);
}

.anan-wa-form .anan-wa-field textarea {
	resize: vertical;
	min-height: 80px;
}

.anan-wa-submit {
	display: block;
	width: 100%;
	padding: 11px 16px;
	background: #25D366;
	color: #fff;
	border: none;
	border-radius: 6px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s;
	margin-top: 6px;
}

.anan-wa-submit:hover {
	background: #1da851;
}
