.sos-map-wrap {
	display: flex;
	gap: 16px;
	align-items: stretch;
	width: 100%;
	box-sizing: border-box;
}
.sos-map-sidebar {
	flex: 0 0 240px;
	max-width: 240px;
	font-size: 14px;
	overflow-y: auto;
	max-height: 700px;
}
.sos-map {
	flex: 1 1 auto;
	min-height: 400px;
	border-radius: 6px;
	overflow: hidden;
}
.sos-map-search input[type="search"] {
	width: 100%;
	padding: 6px 8px;
	box-sizing: border-box;
	margin-bottom: 12px;
}
.sos-filter-group { margin-bottom: 16px; }
.sos-filter-group h4 {
	margin: 0 0 6px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #555;
}
.sos-filter-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 2px 0;
	cursor: pointer;
	line-height: 1.3;
}
.sos-dot {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	flex: 0 0 12px;
	border: 1px solid rgba(0,0,0,.2);
}
.sos-count {
	font-size: 12px;
	color: #666;
	margin-top: 12px;
}
.sos-btn {
	background: #1b4965;
	color: #fff;
	border: 0;
	padding: 6px 10px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
}
.sos-btn:hover { background: #163b52; }
.sos-btn.active { background: #d1495b; }
.sos-manage-tools { margin: 12px 0; }

/* Info window */
.sos-iw { font-size: 13px; max-width: 260px; }
.sos-iw h3 { margin: 0 0 6px; font-size: 15px; }
.sos-iw-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.sos-iw-table th {
	text-align: left;
	padding: 2px 8px 2px 0;
	color: #555;
	font-weight: 600;
	white-space: nowrap;
	vertical-align: top;
}
.sos-iw-table td { padding: 2px 0; }
.sos-iw-desc {
	margin: 2px 0 6px;
	padding: 6px 8px;
	background: #f6f8f9;
	border-left: 3px solid #1b4965;
	border-radius: 3px;
	font-size: 12px;
	line-height: 1.4;
	color: #333;
	white-space: pre-wrap;
}
.sos-iw-link { margin: 4px 0 6px; }
.sos-iw-link a { font-weight: 600; color: #1b4965; text-decoration: none; }
.sos-iw-link a:hover { text-decoration: underline; }
.sos-iw-edit { border-top: 1px solid #eee; padding-top: 6px; margin-top: 4px; }
.sos-iw-edit select { max-width: 150px; }
.sos-field { display: block; margin: 4px 0; font-size: 12px; color: #555; }
.sos-field select, .sos-field input, .sos-field textarea { display: block; margin-top: 2px; }
.sos-field input[type="number"] { width: 90px; padding: 3px 4px; }
.sos-field input[type="text"] { width: 100%; box-sizing: border-box; padding: 3px 4px; }
.sos-field textarea { width: 100%; box-sizing: border-box; padding: 3px 4px; resize: vertical; }
.sos-iw-actions { margin: 6px 0; }
.sos-iw-manage { margin-top: 6px; border-top: 1px dashed #eee; padding-top: 6px; }
.sos-btn-link {
	background: none;
	border: 0;
	color: #1b4965;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
	font-size: 13px;
}
.sos-del { color: #b3261e; }
.sos-save-msg, .sos-add-msg { color: #1b7f3b; font-size: 12px; }
.sos-add-form input[type="text"], .sos-add-form select { width: 100%; box-sizing: border-box; padding: 4px; }
.sos-add-coords { font-size: 12px; color: #666; }
.sos-map-error {
	padding: 10px 14px;
	background: #fff3cd;
	border: 1px solid #ffe69c;
	border-radius: 4px;
	color: #664d03;
}

/* Data table below the map */
.sos-table-wrap {
	margin-top: 18px;
	width: 100%;
	overflow-x: auto;
}
.sos-wreck-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}
.sos-wreck-table thead th {
	text-align: left;
	background: #1b4965;
	color: #fff;
	padding: 8px 10px;
	position: sticky;
	top: 0;
	white-space: nowrap;
}
.sos-wreck-table thead th.sos-sortable {
	cursor: pointer;
	user-select: none;
}
.sos-wreck-table thead th.sos-sortable:hover { background: #163b52; }
.sos-wreck-table tbody td {
	padding: 7px 10px;
	border-bottom: 1px solid #e3e6e8;
	vertical-align: top;
}
.sos-wreck-table tbody tr:nth-child(even) { background: #f6f8f9; }
.sos-wreck-table tbody tr:hover { background: #eaf1f5; }
.sos-desc-cell {
	max-width: 280px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.sos-row-locatable { cursor: pointer; }
.sos-row-locatable td:first-child { color: #1b4965; font-weight: 600; }
.sos-row-nocoord td:first-child::after {
	content: " ⚑";
	color: #d1495b;
	font-size: 11px;
}
.sos-table-empty {
	padding: 14px;
	color: #666;
	font-style: italic;
}

@media (max-width: 640px) {
	.sos-map-wrap { flex-direction: column; }
	.sos-map-sidebar { max-width: 100%; flex-basis: auto; max-height: none; }

	/* Stack the table into cards on narrow screens */
	.sos-wreck-table thead { display: none; }
	.sos-wreck-table, .sos-wreck-table tbody, .sos-wreck-table tr, .sos-wreck-table td { display: block; width: 100%; }
	.sos-wreck-table tr { margin-bottom: 10px; border: 1px solid #e3e6e8; border-radius: 6px; overflow: hidden; }
	.sos-wreck-table td { border: none; border-bottom: 1px solid #eee; padding-left: 42%; position: relative; }
	.sos-wreck-table td::before {
		content: attr(data-label);
		position: absolute;
		left: 10px;
		width: 36%;
		font-weight: 600;
		color: #555;
	}
}
