/**
 * Modern UI for the admin donor "delete confirmation" modal
 * (rendered from src/js-templates/donor-profile-delete.php into .contentapp).
 */

/* Turn the shared content container into a transparent centring stage so the
   confirmation card floats as a compact dialog instead of a tall white box. */
.contentapp:has(.idonate-delete-modal) {
	min-width: 0;
	min-height: 0;
	max-height: none;
	overflow: visible;
	background: transparent;
	border-radius: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
}

.idonate-delete-modal {
	position: relative;
	width: 100%;
	max-width: 440px;
	margin: 0 auto;
	padding: 36px 32px 28px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
	text-align: center;
	box-sizing: border-box;
	animation: idonate-delete-pop 0.18s ease-out;
}

/* Card-anchored close button at the top-right corner. */
.idonate-delete-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: none;
	background: transparent;
	color: #9ca3af;
	font-size: 24px;
	line-height: 1;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.idonate-delete-modal__close:hover {
	background: #f3f4f6;
	color: #374151;
}

.idonate-delete-modal__close:focus-visible {
	outline: 2px solid rgba(239, 20, 20, 0.5);
	outline-offset: 2px;
}

/* Hide the shared wrapper close button for this modal so we don't show two. */
#donorPanelForm:has(.idonate-delete-modal) .close {
	display: none;
}

@keyframes idonate-delete-pop {
	from {
		opacity: 0;
		transform: translateY(10px) scale(0.97);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.idonate-delete-modal__icon {
	width: 72px;
	height: 72px;
	margin: 0 auto 18px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	color: #ef1414;
	background: #fde6e6;
}

.idonate-delete-modal__title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: #1f2330;
}

.idonate-delete-modal__desc {
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.5;
	color: #6b7280;
}

.idonate-delete-modal__details {
	text-align: left;
	background: #f7f7f9;
	border: 1px solid #ececf0;
	border-radius: 10px;
	padding: 6px 16px;
	margin-bottom: 26px;
}

.idonate-delete-modal__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 0;
}

.idonate-delete-modal__row + .idonate-delete-modal__row {
	border-top: 1px solid #ececf0;
}

.idonate-delete-modal__label {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
}

.idonate-delete-modal__value {
	font-size: 14px;
	font-weight: 600;
	color: #1f2330;
	text-align: right;
	word-break: break-word;
}

/* Override the generic ".contentapp form" padding/background from the base
   admin stylesheet (needs the extra .contentapp prefix to win specificity). */
.contentapp .idonate-delete-modal__actions {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
	background: transparent;
}

.idonate-delete-modal__btn {
	flex: 1 1 0;
	padding: 11px 18px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 10px;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease,
		border-color 0.15s ease, box-shadow 0.15s ease;
}

.idonate-delete-modal__btn--cancel {
	background: #ffffff;
	border-color: #d4d6dd;
	color: #374151;
}

.idonate-delete-modal__btn--cancel:hover {
	background: #f3f4f6;
	border-color: #c3c6cf;
}

.idonate-delete-modal__btn--danger {
	background: #ef1414;
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(239, 20, 20, 0.3);
}

.idonate-delete-modal__btn--danger:hover {
	background: #d10f0f;
	box-shadow: 0 6px 16px rgba(239, 20, 20, 0.38);
}

.idonate-delete-modal__btn:focus-visible {
	outline: 2px solid rgba(239, 20, 20, 0.5);
	outline-offset: 2px;
}

@media (max-width: 520px) {
	.idonate-delete-modal {
		max-width: 92%;
		padding: 28px 20px 22px;
	}
}
