/*
 * Lists edited in a dialog (templates/admin/home/modal_item.html): a trip's days as cards, its key facts as blocks,
 * and the dialog each opens, after admin-editing.css.
 */
/* A list edited in a dialog (modal_item.html): one line per item, with Edit. */
.eb-modal-list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.eb-modal-item {
	align-items: center;
	background: var(--color-base-50);
	border-radius: 0.75rem;
	display: flex;
	gap: 0.875rem;
	padding: 0.625rem 1rem;
	transition: background-color 0.15s;
}

.eb-modal-item:hover {
	background: var(--color-base-100);
}

.eb-modal-item-line {
	align-items: center;
	display: flex;
	flex: 1;
	gap: 1rem;
	min-width: 0;
	text-align: left;
}

.eb-modal-item-name {
	color: var(--color-base-900);
	font-weight: 600;
}

/* A day's line: its number, its title with a little of the day under it, and its photo. */
.eb-day-badge {
	align-items: center;
	background: var(--color-primary-600);
	border-radius: 0.625rem;
	color: #fff;
	display: flex;
	flex: none;
	font-size: 1.125rem;
	font-weight: 700;
	height: 2.75rem;
	justify-content: center;
	width: 2.75rem;
}

.eb-day-text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.eb-day-title {
	color: var(--color-base-900);
	font-size: 1rem;
	font-weight: 600;
}

.eb-day-meta {
	color: var(--color-base-500);
	display: flex;
	font-size: 0.8125rem;
	gap: 0.875rem;
}

.eb-day-meta span:empty {
	display: none;
}

.eb-day-excerpt {
	color: var(--color-base-600);
	display: -webkit-box;
	font-size: 0.875rem;
	-webkit-line-clamp: 1;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.eb-day-thumb img {
	border-radius: 0.5rem;
	height: 3rem;
	object-fit: cover;
	width: 4.5rem;
}

/* A day's dialog: wide, its fields under headings, Save and Cancel always at its foot. */
.eb-dialog.eb-item-dialog {
	display: none;
	flex-direction: column;
	height: 90vh;
	max-height: none;
	max-width: none;
	padding: 0;
	width: 90vw;
}

.eb-dialog.eb-item-dialog[open] {
	display: flex;
}

.eb-item-dialog-head,
.eb-item-dialog-foot {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 1rem 1.5rem;
}

.eb-item-dialog-head {
	border-bottom: 1px solid var(--color-base-200);
}

.eb-item-dialog-head h2 {
	font-size: 1.25rem;
	margin: 0;
}

.eb-item-dialog-foot {
	border-top: 1px solid var(--color-base-200);
	justify-content: flex-end;
}

/* The day's groups two to a line on a wide screen, the words and the photo side by side. */
.eb-item-dialog-body {
	align-content: start;
	display: grid;
	flex: 1;
	gap: 1.25rem;
	grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
	overflow-y: auto;
	padding: 1.25rem 1.5rem;
}

.eb-item-dialog-body > input[type="hidden"] {
	display: none;
}

.eb-item-group {
	border: 1px solid var(--color-base-200);
	border-radius: 0.75rem;
	padding: 0.75rem 1.25rem 0.25rem;
}

.eb-item-group legend {
	color: var(--color-primary-700);
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	padding: 0 0.5rem;
	text-transform: uppercase;
}

.eb-item-dialog .eb-picture {
	max-width: 360px;
}

.dark .eb-modal-item {
	background: var(--color-base-900);
}

.dark .eb-modal-item-name,
.dark .eb-day-title {
	color: var(--color-base-100);
}

/* Key facts as blocks (fact_line.html), four to a line: the block opens its dialog, the handle and bin sit on it. */
.eb-modal-list.eb-blocks {
	display: grid;
	gap: 0.625rem;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.eb-blocks .eb-modal-item {
	align-items: flex-start;
	border: 1px solid var(--color-base-200);
	gap: 0.25rem;
	padding: 0.625rem 0.5rem 0.625rem 0.25rem;
}

.eb-blocks .eb-modal-item > .eb-action {
	display: none;
}

.eb-blocks .eb-handle {
	font-size: 20px;
}

.eb-blocks .eb-delete {
	height: 28px;
	width: 28px;
}

.eb-fact-icon {
	color: var(--color-primary-700);
	font-size: 26px;
}

.eb-fact-text {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

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

.eb-fact-value {
	color: var(--color-base-900);
	font-weight: 600;
}

/* A fact's dialog holds three fields: 60% of the screen each way. */
.eb-blocks .eb-dialog.eb-item-dialog {
	height: 60vh;
	max-width: none;
	width: 60vw;
}

.eb-blocks .eb-item-dialog-body {
	grid-template-columns: 1fr;
}
