/* Site-wide dialog styles. Used by the generic dialog engine
   (public/js/dialog). Styled to match the site's dark + emerald accent
   visual language while remaining a standalone component that works on any
   page (regular pages and game pages alike). */

.dialog {
	position: fixed;
	inset: 0;
	z-index: 2000;
	display: flex;
	align-items: center;
	justify-content: center;
}

.dialog-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.6);
}

.dialog-box {
	position: relative;
	width: min(420px, 90vw);
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	background: #1a1f2e;
	color: #eee;
	border: 2px solid #50c878;
	border-radius: 8px;
	box-shadow: 0 0 20px rgba(0, 0, 0, 0.6);
}

.dialog-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #333;
}

.dialog-title {
	margin: 0;
	font-size: 18px;
}

.dialog-body {
	padding: 16px;
	overflow-y: auto;
	line-height: 1.5;
}

.dialog-message {
	margin: 0 0 12px;
}

/* Field wrapper + generic field styles. */
.dialog-field-wrap {
	margin-top: 12px;
}

.dialog-field {
	display: block;
}

.dialog-field-label {
	display: block;
	margin-bottom: 4px;
	font-size: 14px;
	color: #ccc;
}

.dialog-field-input {
	width: 100%;
	box-sizing: border-box;
	padding: 8px;
	font-size: 15px;
	font-family: inherit;
	color: #eee;
	background: #0b1020;
	border: 1px solid #555;
	border-radius: 4px;
}

.dialog-field-input:focus {
	outline: none;
	border-color: #50c878;
}

/* Inline validation error. */
.dialog-error {
	margin-top: 10px;
	color: #ff6b6b;
	font-size: 14px;
}

.dialog-error[hidden] {
	display: none;
}

/* Action button row. */
.dialog-footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid #333;
}

.dialog-action {
	padding: 6px 16px;
	font-family: inherit;
	font-size: 14px;
	cursor: pointer;
	border-radius: 4px;
}

.dialog-action-primary {
	background: #50c878;
	color: #0b1020;
	border: 1px solid #3da866;
}

.dialog-action-primary:hover {
	background: #63d98c;
}

.dialog-action-cancel {
	background: #222;
	color: #eee;
	border: 1px solid #555;
}

.dialog-action-cancel:hover {
	background: #333;
}
