﻿.container {
	margin: 2rem auto;
	padding: 0 1rem;
	width: fit-content;
	min-width: min(900px, 100%);
	font-family: sans-serif;
}

/* ---- Table ---- */

#plotsTable {
	width: 100%;
	border-collapse: collapse;
	margin-top: 1rem;
}

#plotsTable th,
#plotsTable td {
	padding: 0.6rem 0.9rem;
	text-align: left;
	border-bottom: 1px solid #ddd;
}

#plotsTable thead th {
	background: #f4f4f4;
	font-weight: bold;
	border-bottom: 2px solid #ccc;
}

#plotsTable th[data-sort-col] {
	cursor: pointer;
	user-select: none;
}

#plotsTable th[data-sort-col]:hover {
	background: #e8e8e8;
}

#plotsTable th[data-sort-col]::after {
	content: ' ⇅';
	opacity: 0.4;
	font-size: 0.8em;
}

#plotsTable th.sort-active.sort-asc::after {
	content: ' ▲';
	opacity: 1;
}

#plotsTable th.sort-active.sort-desc::after {
	content: ' ▼';
	opacity: 1;
}

#plotsTable tbody tr.rowOdd {
	background: #fafafa;
}

#plotsTable tbody tr:hover {
	background: #f0f0f0;
}

#plotsTable td a.plotLink {
	color: #0066cc;
	text-decoration: none;
}

#plotsTable td a.plotLink:hover {
	text-decoration: underline;
}

.actionCell {
	white-space: nowrap;
	width: 1%;
}

.actionCell > div {
	display: flex;
	gap: 0.4rem;
	align-items: center;
}

td.ownerColumn {
	font-family: monospace;
	font-size: 0.85em;
	color: #555;
	white-space: nowrap;
}

/* ---- View/manage mode button visibility ---- */

#plotsTable {
	--btn-view-display: inline-block;
	--btn-manage-display: none;
}

#plotsTable.mode-manage {
	--btn-view-display: none;
	--btn-manage-display: inline-block;
}

/* ---- Action button shared base ---- */

.actionBtn {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	border: 1px solid;
	border-radius: 4px;
	font-size: 0.9em;
	font-family: inherit;
	font-weight: normal;
	text-align: center;
	text-decoration: none;
	white-space: nowrap;
	box-sizing: border-box;
	vertical-align: middle;
	cursor: pointer;
}

.editButton {
	display: var(--btn-view-display);
	background: #0055aa;
	color: white;
	border-color: #0044aa;
}

.editButton:hover {
	background: #0044aa;
}

.metadataButton,
.deleteButton {
	display: var(--btn-manage-display);
}

.metadataButton {
	background: #0055aa;
	color: white;
	border-color: #0044aa;
}

.metadataButton:hover {
	background: #0044aa;
}

.deleteButton {
	background: #cc2200;
	color: white;
	border-color: #aa1a00;
}

.deleteButton:hover {
	background: #aa1a00;
}

/* ---- View toggle ---- */

.toggleBar {
	display: flex;
	gap: 1.5rem;
	flex-wrap: wrap;
	margin-bottom: 1rem;
}

.viewToggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1rem;
}

.viewToggleLabel {
	font-weight: bold;
	color: #444;
}

.toggleBtn {
	padding: 0.4rem 1rem;
	border: 1px solid #bbb;
	background: #f4f4f4;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9em;
	transition: background 0.15s, color 0.15s;
}

.toggleBtn:hover {
	background: #e4e4e4;
}

.toggleBtn.active {
	background: #0055aa;
	color: white;
	border-color: #0044aa;
}