/* generic action card styles */
/* (resources\views\dashboard\generic-action-card.blade.php) */

/* wrapper */
[data-card-wrapper] {
	background: #f5f6fa;
	display: flex;
	justify-content: center;
	align-items: center;
	margin-top: 9px;
}

/* parent card */
[data-card-type="parent"] {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 12px 14px;
	width: 100%;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	transition: all 0.3s ease;
	box-sizing: border-box;
}

[data-card-type="parent"]:hover {
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
	transform: scale(1.02);
}

[data-card-type="parent"].read {
	filter: grayscale(0.8) brightness(0.92);
}

[data-card-icon] {
	width: 40px;
	height: 40px;
	background: #e9efff;
	border-radius: 35%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 18px;
	color: #3b82f6;
}

[data-card-content] {
	flex: 1;
}

[data-card-title] {
	font-weight: 600;
	color: #111827;
	font-size: 15px;
	margin-bottom: 2px;
	display: flex;
	align-items: center;
	gap: 4px;
}

[data-card-bullet] {
	color: #ef4444;
	font-size: 26px;
	line-height: 1;
}

[data-card-type="parent"].read [data-card-bullet] {
	display: none;
}

[data-card-subtitle] {
	color: #6b7280;
	font-size: 13px;
	margin-bottom: 6px;
}

[data-card-date] {
	color: #9ca3af;
	font-size: 12px;
}

/* modal */
[data-modal-type="parent"] {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	justify-content: center;
	align-items: center;
	z-index: 999;
}

[data-modal-content] {
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	width: 50%;
	max-width: 100%; /* never overflow screen horizontally */
	padding: 24px;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	position: relative;
	animation: generic-action-card-zoom-in 0.2s ease-out;
	box-sizing: border-box;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
}

/* zoom animation */
@keyframes generic-action-card-zoom-in {
	from { transform: scale(0.95); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

[data-modal-close-btn] {
	background: none;
	border: none;
	font-size: 30px;
	position: absolute;
	top: 12px;
	right: 16px;
	cursor: pointer;
	transition: color 0.2s ease;
}

[data-modal-close-btn]:hover {
	color: #ef4444;
}

[data-modal-header] {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin-bottom: 12px;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 12px;
}

[data-modal-header] [data-card-icon] {
	width: 46px;
	height: 46px;
	font-size: 20px;
}

[data-modal-header] h3 {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: #111827;
}

[data-modal-body] {
	overflow-y: auto;
	overflow-x: hidden;
	max-width: 100%;
	word-wrap: break-word;
	max-height: calc(80vh - 140px); /* 140px = header + padding */
	padding-right: 8px;
	padding-left: 8px;
}

[data-card-count] {
	background: #ef4444;
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	padding: 2px 7px;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 22px;
}

/* child cards styled like parent cards */
[data-card-type="child"] {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	padding: 12px 14px;
	width: 100%; /* fill modal content */
	box-sizing: border-box; /* include padding/border in width */
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	cursor: pointer;
	transition: all 0.3s ease;
	margin-bottom: 9px;
}

[data-card-type="child"]:first-of-type {
	margin-top: 8px;
}

[data-card-type="child"]:hover {
	box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
	transform: scale(1.02);
	background: #fff;
}

[data-card-type="child"].read {
	filter: grayscale(0.8) brightness(0.92);
}

[data-child-icon] {
	width: 40px;
	height: 40px;
	background: #e9efff;
	border-radius: 35%;
	display: flex;
	justify-content: center;
	align-items: center;
	font-size: 18px;
	color: #3b82f6;
}

[data-child-text] {
	flex: 1;
	font-weight: 600;
	color: #111827;
	font-size: 15px;
	display: flex;
	align-items: center;
	gap: 6px;
}

[data-child-bullet] {
	color: #ef4444;
	font-size: 26px;
	line-height: 1;
}

[data-card-type="child"].read [data-child-bullet] {
	display: none;
}
