/* Reset and base layout */
html {
	height: 100%;
}

body {
	height: 100%;
	display: flex;
	flex-direction: column;
	/* Let neat.css handle the centering with its max-width and auto margins */
}

/* Main container - uses natural document flow */
main {
	flex: 1;
	display: flex;
	flex-direction: column;
}

/* Header stays at top with sticky positioning */
.fixed-header {
	position: sticky;
	top: 0;
	background: var(--light);
	z-index: 10;
	padding: 0 0 1rem 0;
}

.fixed-header::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 100vw;
	height: 1px;
	background: var(--lesslight);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.fixed-header h1 {
	margin: 0.25rem 0;
	font-size: 1.5rem;
}

.fixed-header p {
	margin: 0;
	opacity: 0.6;
	font-size: 0.875rem;
}

.scrollable-content {
	flex: 1;
	padding: 1.5rem 0;
	min-height: 200px;
	overflow-y: auto;
	overscroll-behavior: contain;
	scroll-padding-bottom: 5rem;
}

.scrollable-content ul {
	list-style: none;
	padding: 0;
	margin: 0;
}

.scrollable-content li {
	display: flex;
	padding: 0.25rem 0;
	scroll-margin-bottom: 5rem;
}

.scrollable-content li:last-child {
	border-bottom: none;
}

.scrollable-content time {
	flex-shrink: 0;
	opacity: 0.6;
	font-size: 0.875rem;
	min-width: 60px;
}

.scrollable-content p {
	margin: 0;
	flex: 1;
}

/* Footer with input */
.fixed-footer {
	position: sticky;
	bottom: 0;
	background: var(--light);
	padding: 1rem 0;
}

.fixed-footer form {
	display: flex;
	gap: 0.5rem;
}

input#entry,
textarea#entry {
	flex: 1;
	padding: 0.75rem 1rem;
	font-size: 1rem;
	background: var(--light);
	border: 1px solid var(--lesslight);
	border-radius: 2rem;
	transition: border-color 0.2s;
	font-family: inherit;
}

input#entry:focus,
textarea#entry:focus {
	outline: none;
	border-color: var(--link);
}

input#entry::placeholder,
textarea#entry::placeholder {
	opacity: 0.5;
}

/* Dark mode is already handled by neat.css's variable switching */

/* ==================== KEYBOARD NAVIGATION ==================== */

/* Selected log entry in log-navigation mode - triangle pointing right */
.log-entry.kb-selected::before {
	content: "▸";
	opacity: 1;
	width: 1ch;
	display: inline-block;
	text-align: center;
}

/* Delete mode - show '×' instead of triangle */
.log-entry.kb-selected.kb-delete-mode::before {
	content: "×";
	opacity: 1;
	width: 1ch;
	display: inline-block;
	text-align: center;
}
