/* Dialog surfaces */
.draggableDialog {
	position: absolute;
	z-index: 18;
	top: 52px;
	right: 12px;
	width: 200px;
	display: none;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	background: #f8fafc;
	color: #1f2937;
	box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
	overflow: hidden;
}

#optionsDialog {
	width: 286px;
	right: 224px;
}

.draggableDialog .title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	border-bottom: 1px solid #cbd5e1;
	background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
	color: #1f2937;
	font-weight: 700;
	cursor: move;
}

.draggableDialog .title .dialogClose {
	width: 24px;
	height: 24px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #475569;
	font-size: 14px;
	line-height: 1;
	font-weight: 700;
	padding: 0;
	cursor: pointer;
}

.draggableDialog .title .dialogClose:hover {
	background: #eef2f7;
	color: #0f172a;
}

.draggableDialog table {
	width: calc(100% - 18px);
	margin: 9px;
	border-collapse: separate;
	border-spacing: 4px;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	background: #ffffff;
	padding: 6px;
}

.draggableDialog table th {
	text-align: left;
	color: #475569;
	font-weight: 700;
}

#strokeColorTable td, #strokeSizeTable td, #strokeTypeTable td {
	width: 28px;
	height: 28px;
	border: 1px solid #94a3b8;
	border-radius: 6px;
	cursor: pointer;
}

#strokeSizeTable th,
#strokeTypeTable th {
	text-align: center;
}

#strokeSizeTable td,
#strokeTypeTable td {
	text-align: center;
	vertical-align: middle;
}

#strokeColorTable td.selected, #strokeSizeTable td.selected, #strokeTypeTable td.selected {
	border: 2px solid #334155;
}

#strokeColorTable td img, #strokeSizeTable td img, #strokeTypeTable td img {
	display: block;
}

#strokeTypeTable td img {
	margin: 0 auto;
}

#fontFormatTable select {
	width: 100%;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 4px 6px;
}

#optionsDialog tr td:first-of-type {
	width: 100px;
}

#optionsDialog input[type=range] {
	width: 100%;
	accent-color: #334155;
}

#optionsDialog input[type=checkbox],
#optionsDialog input[type=radio],
#fontFormatTable input[type=checkbox] {
	accent-color: #334155;
}

/* Modal dialogs */
.DataInput {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 24;
	display: none;
	background: rgba(148, 163, 184, 0.36);
}

.DataInput table {
	position: relative;
	margin: auto;
	top: 74px;
	width: min(860px, calc(100% - 48px));
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	overflow: hidden;
	background: #ffffff;
	color: #1f2937;
	box-shadow: 0 20px 36px rgba(15, 23, 42, 0.24);
	border-collapse: collapse;
}

.DataInput table th {
	padding: 11px 14px;
	text-align: left;
	color: #1f2937;
	border-bottom: 1px solid #cbd5e1;
	background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
}

.dialogTitleWithIcon {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.dialogTitleWithIcon img {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

.DataInput table.content tbody td {
	padding: 8px 12px;
}

#ConstructionPropertyArea input[type=text],
#ConstructionPropertyArea textarea,
#FeedbackDialog textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 8px 10px;
	font: inherit;
	color: #1f2937;
	background: #fff;
}

#ConstructionPropertyArea textarea,
#FeedbackDialog textarea {
	min-height: 110px;
	resize: vertical;
}

#FeedbackDialog .aboutContent {
	display: flex;
	align-items: flex-start;
	gap: 32px;
	margin-bottom: 10px;
	padding: 6px 0px;
	line-height: 1.4;
}

#FeedbackDialog .aboutContent p {
	margin: 2px 0;
}

#FeedbackDialog .aboutImage {
	width: 240px;
	height: auto;
	flex-shrink: 0;
}

#FeedbackDialog .aboutLayout {
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	flex: 1;
}

#FeedbackDialog .aboutText {
	flex: 1;
	padding-top: 16px;
}

/* Footer action bar */
.DataInput table tfoot tr:last-of-type td {
	padding: 10px 12px;
	border-top: 1px solid #cbd5e1;
	background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
	overflow: hidden;
}

.DataInput table tfoot tr:last-of-type td::after {
	content: '';
	display: block;
	clear: both;
}

.DataInput table tfoot button {
	border: none;
	background: transparent;
	color: #334155;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.02em;
	padding: 6px 8px;
	cursor: pointer;
	box-shadow: inset 0 -1px 0 transparent;
	transition: color 0.14s ease, box-shadow 0.14s ease;
}

.DataInput table tfoot button.cancel {
	float: left;
}

.DataInput table tfoot button.ok {
	float: right;
	color: #0f172a;
	font-weight: 700;
}

.DataInput table tfoot button.delete {
	float: right;
	margin-right: 10px;
	color: #b42318;
	font-weight: 700;
}

.DataInput table tfoot button:hover,
.DataInput table tfoot button.ok:hover {
	background: transparent;
	color: #0f172a;
	box-shadow: inset 0 -1px 0 #64748b;
}

.DataInput table tfoot button.delete:hover {
	color: #912018;
	box-shadow: inset 0 -1px 0 #b42318;
}

.DataInput table tfoot button[disabled] {
	opacity: 0.45;
	cursor: default;
	box-shadow: none;
}

.DataInput table tfoot button:focus-visible {
	outline: 1px solid #64748b;
	outline-offset: 1px;
}

/* Open list table */
.DataInput table.list {
	background: #f8fbff;
}

.DataInput table.list thead,
.DataInput table.list thead tr,
.DataInput table.list thead th,
.DataInput table.list tbody,
.DataInput table.list tbody tr {
	display: block;
}

.DataInput table.list th,
.DataInput table.list td {
	box-sizing: border-box;
	padding: 9px 10px;
}

.DataInput table.list tr:after {
	content: ' ';
	display: block;
	visibility: hidden;
	clear: both;
}

.DataInput table.list thead tr:last-of-type {
	border-top: 1px solid #dbe5f0;
	border-bottom: 1px solid #dbe5f0;
	background: #edf3fa;
}

.DataInput table.list thead tr:last-of-type th {
	border: none;
	border-radius: 0;
	box-shadow: none;
	background: #edf3fa;
	color: #334155;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.DataInput table.list tbody {
	height: 212px;
	margin-top: 0;
	overflow-y: auto;
	background: #fff;
}

.DataInput table.list tbody tr {
	border-bottom: 1px solid #eef3f8;
	background: #fff;
}

.DataInput table.list tbody tr:hover {
	cursor: pointer;
	background: #f2f8ff;
}

.DataInput table.list tbody tr.selected {
	background: #dbeeff !important;
	box-shadow: inset 3px 0 0 #4d82b7;
}

.DataInput table.list tr:nth-of-type(2) th,
.DataInput table.list td {
	float: left;
}

.DataInput table.list thead tr:nth-of-type(2) th:nth-of-type(1),
.DataInput table.list tbody tr td:nth-of-type(1) {
	width: 34%;
}

.DataInput table.list thead tr:nth-of-type(2) th:nth-of-type(2),
.DataInput table.list tbody tr td:nth-of-type(2) {
	width: 26%;
}

.DataInput table.list thead tr:nth-of-type(2) th:nth-of-type(3),
.DataInput table.list tbody tr td:nth-of-type(3),
.DataInput table.list thead tr:nth-of-type(2) th:nth-of-type(4),
.DataInput table.list tbody tr td:nth-of-type(4) {
	width: 20%;
	text-align: right;
}

.DataInput table.list tfoot td {
	float: none;
}

.DataInput table.content tbody tr td:first-of-type {
	width: 10%;
}

#errorMessageSaveBoard, #errorMessageOpenBoard {
	height: 30px;
	color: #b42318;
	font-weight: 700;
}

#ConfirmDialog {
	z-index: 40;
	background: rgba(15, 23, 42, 0.35);
}

#ConfirmDialog .confirmPanel {
	position: relative;
	margin: auto;
	top: 22%;
	width: min(480px, calc(100% - 32px));
	border: 1px solid #cbd5e1;
	border-radius: 12px;
	background: #ffffff;
	color: #1f2937;
	box-shadow: 0 24px 46px rgba(15, 23, 42, 0.28);
	overflow: hidden;
}

#ConfirmDialog .title {
	padding: 12px 14px;
	border-bottom: 1px solid #cbd5e1;
	background: linear-gradient(180deg, #f8fafc 0%, #e5e7eb 100%);
	font-weight: 700;
}

#ConfirmDialog .message {
	padding: 18px 14px 16px;
	line-height: 1.45;
	color: #0f172a;
	word-break: break-word;
}

#ConfirmDialog .actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 0 14px 14px;
}

#ConfirmDialog .actions button {
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	padding: 7px 12px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	background: #ffffff;
	color: #334155;
}

#ConfirmDialog .actions button.ok {
	background: #1d4ed8;
	border-color: #1d4ed8;
	color: #ffffff;
}

#ConfirmDialog .actions button:hover {
	filter: brightness(0.98);
}

#ConfirmDialog .actions button:focus-visible {
	outline: 2px solid #64748b;
	outline-offset: 1px;
}

@media (max-width: 900px) {
	.draggableDialog {
		right: 10px;
		width: 212px;
	}

	#optionsDialog {
		top: 262px;
		right: 10px;
		width: 240px;
	}

	.DataInput table {
		top: 32px;
		width: calc(100% - 20px);
	}

	.DataInput table.list tbody {
		height: 220px;
	}

	.DataInput table tfoot button.cancel {
		float: left;
	}

	.DataInput table tfoot button.ok {
		float: right;
	}

	#ConfirmDialog .confirmPanel {
		top: 14%;
	}
}
