/* Hide content initially if on detail route to prevent flash */
#main-wrapper {
	opacity: 0;
}
#main-wrapper.loaded {
	opacity: 1;
}
/* Disable smooth scrolling for instant navigation */
html, body {
	scroll-behavior: auto !important;
}
@media all and (max-width: 991px) {
	.spacyrow{
		margin-top: 15px;
		margin-bottom: 15px;
	}
}
.page-header {
	margin-top: 2rem;
	margin-bottom: 1rem;
}
.card {
	margin-bottom: 1rem;
}
.row + .row {
	margin-top: 1rem;
}
.row .row + .row {
	margin-top: 0.5rem;
}
span.label{
	font-size: 100%;
	color: #000;
}
.is-anonymous .edit-control,
.is-not-admin .admin-control,
.is-not-admin .published-doi .edit-control,
.is-not-admin .published-doi .btn-update-doi,
.is-logged-in.is-not-admin .published-doi .nav-edit,
.is-admin .submit-btn-wrapper {
	display: none;
}
.is-not-admin .published-doi .card input,
.is-not-admin .published-doi .card button,
.is-not-admin .published-doi .card select,
.is-anonymous .draft-doi .card input,
.is-anonymous .draft-doi .card button,
.is-anonymous .draft-doi .card select{
	pointer-events: none;
}
.is-not-admin .published-doi .card-body input{
	background-color: lightgrey;
}

#detail-title {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow-y: hidden;
	text-overflow: ellipsis;
}

.btn-documentation[target="_blank"]:after {
	content: "";
	margin: 0;
}

.unified-toolbar .state-dropdown-menu {
	display: none;
	position: absolute;
	min-width: 10rem;
	padding: 0.5rem 0;
	margin: 0.125rem 0 0;
	background-color: #fff;
	border: 1px solid rgba(0,0,0,.15);
	border-radius: 0.25rem;
	box-shadow: 0 0.5rem 1rem rgba(0,0,0,.175);
	list-style: none;
	z-index: 1000;
}
.unified-toolbar .state-dropdown-menu.show {
	display: block;
}
.unified-toolbar .state-dropdown-menu .dropdown-item {
	display: block;
	width: 100%;
	padding: 0.5rem 1rem;
	clear: both;
	font-weight: 400;
	color: #212529;
	text-align: inherit;
	white-space: normal;
	background-color: transparent;
	border: 0;
	cursor: pointer;
	text-decoration: none;
}
.unified-toolbar .state-dropdown-menu .dropdown-item:hover:not(.disabled) {
	background-color: #f8f9fa;
}
.unified-toolbar .state-dropdown-menu .dropdown-item.disabled {
	color: #6c757d;
	cursor: not-allowed;
	opacity: 0.6;
}
.unified-toolbar .state-dropdown-menu .dropdown-item-text {
	display: block;
}
.toc-section {
	scroll-margin-top: var(--sticky-header-height, 130px);
	margin-top: 1rem;
}

.doi-editor-with-sidebar {
	display: flex;
	gap: 2rem;
	align-items: flex-start;
}

.doi-editor-with-sidebar .editor-content {
	flex: 1;
	min-width: 0;
}

.doi-editor-with-sidebar .toc-sidebar-editor {
	position: sticky;
	top: calc(var(--sticky-header-height, 130px) + 20px);
	width: 250px;
	flex-shrink: 0;
	background-color: #fff;
	padding: 1rem;
	max-height: calc(100vh - var(--sticky-header-height, 130px) - 30px);
	overflow-y: auto;
}

.doi-editor-with-sidebar .toc-sidebar-editor .toc-header {
	font-weight: 600;
	margin-bottom: 1rem;
	padding: 0.4rem 0.5rem;
}

.doi-editor-with-sidebar .toc-sidebar-editor .toc-body {
}

.doi-editor-with-sidebar .toc-sidebar-editor .toc-link {
	display: block;
	padding: 0.4rem 0.5rem;
	color: #212529;
	text-decoration: none;
	border-radius: 0.25rem;
	transition: background-color 0.15s ease;
}

.doi-editor-with-sidebar .toc-sidebar-editor .toc-link:hover {
	background-color: #f8f9fa;
}

.doi-editor-with-sidebar .toc-sidebar-editor .toc-section-link {
	font-weight: 600;
}

@media (max-width: 991px) {
	.doi-editor-with-sidebar {
		flex-direction: column;
	}

	.doi-editor-with-sidebar .toc-sidebar-editor {
		position: static;
		width: 100%;
		max-height: none;
	}
}

.state-dot {
	display: inline-block;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	margin-right: 6px;
}
.state-dot-draft {
	background-color: var(--bs-yellow);
}
.state-dot-registered {
	background-color: var(--bs-red);
}
.state-dot-findable {
	background-color: var(--bs-green);
}

/* Sidebar Tabs */
.sidebar-tabs {
	display: flex;
	border-bottom: 2px solid #dee2e6;
	margin-bottom: 1rem;
	gap: 0.5rem;
}

.sidebar-tab {
	flex: 1;
	padding: 0.75rem 1rem;
	background: transparent;
	border: none;
	border-bottom: 2px solid transparent;
	color: #6c757d;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	position: relative;
	margin-bottom: -2px;
}

.sidebar-tab:hover {
	color: #212529;
	background-color: #f8f9fa;
}

.sidebar-tab-active {
	color: #212529;
	border-bottom-color: var(--bs-primary);
}

.error-count-badge {
	display: inline-block;
	background-color: var(--bs-danger);
	color: white;
	border-radius: 10px;
	padding: 0.15rem 0.5rem;
	font-size: 0.75rem;
	font-weight: 600;
	margin-left: 0.25rem;
}

.error-count-badge:empty {
	display: none;
}

/* Error List */
.error-list {
	padding: 0;
	margin: 0;
}

.error-item {
	margin-bottom: 0.75rem;
}

.error-link {
	display: flex;
	gap: 0.75rem;
	padding: 0.75rem;
	background-color: #fff;
	border: 1px solid var(--bs-danger-border-subtle);
	border-left: 4px solid var(--bs-danger);
	border-radius: 0.25rem;
	text-decoration: none;
	color: var(--bs-danger-text-emphasis);
	transition: all 0.15s ease;
	cursor: pointer;
}

.error-link:hover {
	background-color: var(--bs-danger-bg-subtle);
}

.error-icon {
	color: var(--bs-danger);
	font-size: 1.1rem;
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.error-content {
	flex: 1;
	min-width: 0;
}

.error-section-name {
	font-weight: 600;
	color: var(--bs-danger-text-emphasis);
	margin-bottom: 0.25rem;
}

.error-message {
	font-size: 0.875rem;
	color: var(--bs-danger-text-emphasis);
	word-wrap: break-word;
}

.error-empty-state {
	padding: 2rem 1rem;
	text-align: center;
	color: #6c757d;
	font-style: italic;
}
