/* ════════════════════════════════════════════════════════════════════════════
   SHARED DIALOG (replaces native alert()/confirm()/prompt() site-wide)
   Deliberately self-contained (own color values, "gd-dialog-" prefix) so it
   renders consistently no matter which page's stylesheet is loaded.
   ════════════════════════════════════════════════════════════════════════════ */

.gd-dialog-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 100000;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(2px);
	opacity: 0;
	transition: opacity 0.2s ease;
	padding: 20px;
	box-sizing: border-box;
	font-family: "Poppins", "Segoe UI", Arial, sans-serif;
}

.gd-dialog-overlay.active {
	display: flex;
	opacity: 1;
}

.gd-dialog-box {
	background: #ffffff;
	border-radius: 16px;
	max-width: 440px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
	animation: gd-dialog-slide-up 0.25s ease;
}

@keyframes gd-dialog-slide-up {
	from {
		transform: translateY(20px);
		opacity: 0;
	}
	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.gd-dialog-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 20px 24px;
	background: linear-gradient(135deg, rgb(22, 22, 150), #3b82f6);
	color: #ffffff;
	border-radius: 16px 16px 0 0;
}

.gd-dialog-title {
	font-size: 18px;
	font-weight: 600;
	margin: 0;
	line-height: 1.4;
}

.gd-dialog-close {
	background: rgba(255, 255, 255, 0.2);
	border: none;
	color: #ffffff;
	width: 32px;
	height: 32px;
	min-width: 32px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
	font-size: 18px;
	flex-shrink: 0;
}

.gd-dialog-close:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: rotate(90deg);
}

.gd-dialog-body {
	padding: 22px 24px;
	background: #ffffff;
	font-size: 14px;
	color: #1e293b;
	line-height: 1.6;
}

.gd-dialog-text {
	margin: 0;
	white-space: normal;
}

.gd-dialog-input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	color: #1e293b;
	margin-top: 12px;
	transition: all 0.2s ease;
}

.gd-dialog-input:focus {
	outline: none;
	border-color: rgb(22, 22, 150);
	box-shadow: 0 0 0 3px rgba(22, 22, 150, 0.1);
}

.gd-dialog-warning {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border-radius: 8px;
	background: rgba(239, 68, 68, 0.08);
	color: #ef4444;
	font-size: 14px;
	margin-bottom: 16px;
}

.gd-dialog-warning i {
	font-size: 20px;
	flex-shrink: 0;
}

.gd-dialog-warning p {
	margin: 0;
	color: #1e293b;
}

.gd-dialog-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.gd-dialog-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #f8f9fa;
	font-size: 14px;
	color: #1e293b;
}

.gd-dialog-list li i {
	font-size: 18px;
	color: rgb(22, 22, 150);
	flex-shrink: 0;
}

.gd-dialog-list li.gd-row-danger {
	background: rgba(239, 68, 68, 0.08);
}

.gd-dialog-list li.gd-row-danger i {
	color: #ef4444;
}

.gd-dialog-list li.gd-row-success {
	background: rgba(34, 197, 94, 0.08);
}

.gd-dialog-list li.gd-row-success i {
	color: #22c55e;
}

.gd-dialog-actions {
	display: flex;
	gap: 12px;
	justify-content: flex-end;
	padding: 18px 24px;
	border-top: 1px solid #dee2e6;
	background: #f8f9fa;
	border-radius: 0 0 16px 16px;
	flex-wrap: wrap;
}

.gd-dialog-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: inherit;
}

.gd-dialog-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

.gd-dialog-btn-primary {
	background: linear-gradient(135deg, rgb(22, 22, 150), #3b82f6);
	color: #ffffff;
}

.gd-dialog-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(22, 22, 150, 0.25);
}

.gd-dialog-btn-danger {
	background: #ef4444;
	color: #ffffff;
}

.gd-dialog-btn-danger:hover {
	background: #dc2626;
	transform: translateY(-1px);
	box-shadow: 0 8px 16px rgba(239, 68, 68, 0.3);
}

.gd-dialog-btn-cancel {
	background: #ffffff;
	color: #1e293b;
	border: 1px solid #dee2e6;
}

.gd-dialog-btn-cancel:hover {
	background: #f8f9fa;
	border-color: #1e293b;
}

@media (max-width: 480px) {
	.gd-dialog-header {
		padding: 16px 18px;
	}

	.gd-dialog-title {
		font-size: 16px;
	}

	.gd-dialog-body {
		padding: 18px;
	}

	.gd-dialog-actions {
		padding: 14px 18px;
		flex-direction: column-reverse;
	}

	.gd-dialog-actions .gd-dialog-btn {
		width: 100%;
	}
}
