/* A page editor's section places (templates/admin/editor/section_controls.html, add_section.html): the arrows,
   Show switch and Delete on a section's head, the tag on a hidden one, and Add a section at the end. */

.eb-section-controls {
	align-items: center;
	display: inline-flex;
	gap: 0.25rem;
}

.eb-icon-button {
	align-items: center;
	border: 1px solid var(--color-base-200);
	border-radius: 0.375rem;
	color: var(--color-base-600);
	display: inline-flex;
	height: 2rem;
	justify-content: center;
	width: 2rem;
}

.eb-icon-button:hover {
	background: var(--color-base-100);
	color: var(--color-base-900);
}

.eb-icon-button .material-symbols-outlined {
	font-size: 1.125rem;
}

.eb-remove-section:hover {
	color: #b91c1c;
}

.eb-section-show {
	align-items: center;
	display: inline-flex;
	gap: 0.375rem;
	margin: 0 0.5rem;
}

.eb-hidden-tag {
	background: var(--color-base-100);
	border-radius: 999px;
	color: var(--color-base-600);
	font-size: 0.75rem;
	padding: 0.125rem 0.625rem;
	white-space: nowrap;
}

.eb-hidden-tag[hidden] {
	display: none;
}

/* With no controls to push them, the section's Edit buttons still go to the right. */
.eb-trip-section-head > h2 {
	margin-right: auto;
}

/* While a section is dragged (page-editor.js): each section is only its head, and the parts that move with one
   (a trip's written sections under its overview) are out of the way. */
.eb-sections-collapsed .eb-trip-section > :not(.eb-trip-section-head),
.eb-sections-collapsed .eb-trip-section + .eb-trip-section {
	display: none;
}

.eb-sections-collapsed .eb-trip-section-head {
	margin-bottom: 0;
}

.eb-sections-collapsed .eb-trip-section {
	margin-bottom: 0.375rem;
	padding-bottom: 0.5rem;
	padding-top: 0.5rem;
}

.eb-sections-collapsed .eb-trip-section-head h2 {
	font-size: 1rem;
}

.eb-add-section {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin: 1.5rem 0 3rem;
}

.dark .eb-icon-button {
	border-color: var(--color-base-700);
	color: var(--color-base-300);
}

.dark .eb-icon-button:hover {
	background: var(--color-base-800);
	color: var(--color-base-100);
}

.dark .eb-hidden-tag {
	background: var(--color-base-800);
	color: var(--color-base-300);
}

/* A page's SEO part (templates/admin/editor/seo_preview.html): its result as Google shows it, and where each part
   of it comes from. */
.eb-seo {
	align-items: flex-start;
	display: flex;
	gap: 1.25rem;
}

.eb-seo img {
	aspect-ratio: 1200 / 630;
	border-radius: 0.375rem;
	flex: none;
	object-fit: cover;
	width: 11rem;
}

.eb-seo-result {
	max-width: 40rem;
	min-width: 0;
}

.eb-seo-path {
	color: var(--color-base-500);
	font-size: 0.8125rem;
}

.eb-seo-title {
	color: #1a0dab;
	font-size: 1.125rem;
	margin: 0.125rem 0 0.25rem;
}

.eb-seo-description {
	color: var(--color-base-600);
	font-size: 0.875rem;
	line-height: 1.5;
}

.eb-seo-notes {
	color: var(--color-base-600);
	font-size: 0.8125rem;
	margin-top: 1rem;
}

.eb-seo-notes {
	display: grid;
	gap: 0.625rem;
	max-width: 48rem;
}

.eb-seo-notes dt {
	color: var(--color-base-900);
	font-weight: 600;
}

.eb-seo-notes em {
	color: var(--color-base-500);
	display: block;
	font-style: normal;
}

.dark .eb-seo-notes dt {
	color: var(--color-base-100);
}

.eb-seo-count {
	color: var(--color-base-500);
	display: block;
	font-size: 0.75rem;
	margin-top: 0.25rem;
}

.eb-seo-count.eb-seo-long {
	color: #b45309;
}

.dark .eb-seo-title {
	color: #8ab4f8;
}

/* A page editor's Content and SEO tabs (templates/admin/editor/editor_tabs.html), at its top. */
.eb-editor-tabs {
	border-bottom: 1px solid var(--color-base-200);
	display: flex;
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.eb-editor-tabs button {
	border-bottom: 2px solid transparent;
	color: var(--color-base-500);
	font-weight: 600;
	margin-bottom: -1px;
	padding: 0.75rem 0.25rem;
}

.eb-editor-tabs button[aria-selected="true"] {
	border-bottom-color: var(--color-primary-600);
	color: var(--color-primary-600);
}

.dark .eb-editor-tabs {
	border-color: var(--color-base-700);
}

/* A trip's Published switch, on its cover photo (templates/admin/trip/banner.html). */
.eb-publish {
	align-items: center;
	background: #fff;
	border-radius: 999px;
	color: #166534;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.8125rem;
	font-weight: 600;
	gap: 0.5rem;
	padding: 0.375rem 0.875rem;
}

.eb-publish:has(input:not(:checked)) {
	color: #b91c1c;
}

/* Sections inside a tab or the draggable list keep the page's space between them, so an edited section's outline
   never runs into the next one. */
[data-editor-panel]:not([hidden]),
.eb-moving-sections,
.eb-moving-group {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}
