/* Beer CSS sets padding: 0.1px on any parent of a *-margin helper, so avoid those helpers on direct children of padded containers. */
main.responsive {
	padding: 1rem 1rem 2rem;
}

.post-divider {
	margin-block: 1rem;
}

.post-detail-title,
.post-content,
.comment-content {
	overflow-wrap: anywhere;
}

.post-content,
.comment-content {
	white-space: pre-wrap;
}

.post-content {
	min-height: 8rem;
	line-height: 1.7;
}

.textarea-tall > textarea {
	min-height: 18rem;
}

.auth-card {
	max-width: 28rem;
	margin: 2rem auto;
}

.write-fab {
	position: fixed;
	right: 1.5rem;
	bottom: 1.5rem;
	z-index: 10;
}

/* Reviews */
.review-list > li {
	align-items: flex-start;
}

.review-link {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.125rem;
	min-width: 0;
	text-align: start;
}

.review-title,
.review-excerpt {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.review-stat {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	font-size: 0.8125rem;
	opacity: 0.75;
}

.stars {
	display: inline-flex;
	color: #f5a623;
}

.stars > i {
	font-size: 1.125rem;
	inline-size: 1.125rem;
	block-size: 1.125rem;
}

.star-icon {
	color: #f5a623;
	vertical-align: middle;
}

.rating-field {
	border: 0;
	padding: 0;
	margin: 0 0 1rem;
}

.star-picker-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 1rem;
}

.star-picker {
	display: inline-flex;
}

.star-radio,
.sr-only {
	position: absolute;
	inline-size: 1px;
	block-size: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Each label is half a star wide and shows the left or right half of the icon. */
.star-half {
	display: inline-block;
	inline-size: 1.25rem;
	block-size: 2.5rem;
	margin: 0 !important;
	padding: 0;
	overflow: hidden;
	cursor: pointer;
}

.star-half > i {
	font-size: 2.5rem;
	inline-size: 2.5rem;
	block-size: 2.5rem;
	line-height: 2.5rem;
	color: #f5a623;
	font-variation-settings: "FILL" 0;
	transition: font-variation-settings 0.1s;
}

.star-right > i {
	margin-inline-start: -1.25rem;
}

/* Filled up to the chosen value, or up to the hovered half while pointing. */
.star-picker:not(:hover) label:has(~ input:checked) > i,
.star-picker:not(:hover) input:checked + label > i,
.star-picker:hover label:hover > i,
.star-picker:hover label:has(~ label:hover) > i {
	font-variation-settings: "FILL" 1;
}

.star-radio:focus-visible + label {
	outline: 2px solid var(--primary);
	outline-offset: -2px;
	border-radius: 0.25rem;
}

.rating-text {
	font-weight: 600;
}

.notice {
	margin-block-end: 1rem;
}

/* Posters */
.poster {
	display: block;
	aspect-ratio: 2 / 3;
	object-fit: cover;
	border-radius: 0.5rem;
	background-color: var(--surface-variant);
	flex: none;
}

.poster-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--on-surface-variant);
}

.poster-thumb {
	inline-size: 3.5rem;
	block-size: auto;
}

.poster-card {
	inline-size: 100%;
	block-size: auto;
}

.poster-large {
	inline-size: 100%;
	max-inline-size: 18rem;
	block-size: auto;
	box-shadow: var(--elevate2);
}

.movie-banner {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 0.75rem;
	margin-block: 1rem;
	border-radius: 0.75rem;
	background-color: var(--surface-container-low);
}

/* Movie search */
.movie-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
	gap: 1.25rem 1rem;
}

.movie-card {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	min-width: 0;
}

.movie-card:hover .poster {
	transform: translateY(-2px);
	box-shadow: var(--elevate2);
}

.movie-card .poster {
	transition: transform 0.15s, box-shadow 0.15s;
}

.movie-card-title {
	font-weight: 500;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

/* Movie detail */
.movie-hero {
	display: grid;
	grid-template-columns: minmax(10rem, 18rem) 1fr;
	gap: 2rem;
	align-items: start;
	margin-block-end: 2rem;
}

@media (max-width: 600px) {
	.movie-hero {
		grid-template-columns: 1fr;
	}

	.movie-hero .poster-large {
		max-inline-size: 12rem;
		margin-inline: auto;
	}
}

.movie-info {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.movie-title {
	margin: 0;
}

.movie-info > p {
	margin: 0;
}

.score-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
	gap: 0.75rem;
}

.score-card {
	margin: 0;
	padding: 0.75rem 1rem;
}

.score-label {
	font-size: 0.8125rem;
	opacity: 0.8;
}

.score-value {
	display: flex;
	align-items: center;
	gap: 0.375rem;
	font-size: 1.75rem;
	font-weight: 600;
	line-height: 2.5rem;
}

.score-emoji {
	font-size: 1.5rem;
}

.score-missing .score-value {
	opacity: 0.4;
}

.app-footer {
	padding-block: 1.5rem 6rem;
	text-align: center;
}

.app-footer p {
	margin: 0.25rem 0;
}

.scroll-sentinel {
	height: 1px;
}

.movie-overview {
	min-height: 0;
}

/* Beer CSS adds a 1rem top margin between block siblings; review rows should stay compact. */
.review-link > *,
.movie-banner h6,
.movie-card > * {
	margin-block: 0 !important;
}

.movie-info > *,
.score-grid > .score-card {
	margin-block: 0 !important;
}

/* Discover: vector search results and AGE graph */
.graph-canvas {
	width: 100%;
	height: 36rem;
	margin-block: 0.5rem;
	background: var(--surface-container-lowest, #fff);
}

.graph-canvas-tall {
	height: 70vh;
}

.graph-legend .dot {
	display: inline-block;
	width: 0.75rem;
	height: 0.75rem;
	border-radius: 50%;
	margin-inline-end: 0.375rem;
}

.dot-movie { background: #6750a4; border-radius: 0.2rem; }
.dot-person { background: #e8a33d; }
.dot-genre { background: #2e7d6b; transform: rotate(45deg); border-radius: 0; }

.line-similar {
	display: inline-block;
	width: 1.25rem;
	border-top: 2px dashed #6750a4;
	margin-inline-end: 0.375rem;
}

/* Flex children default to min-width: auto, so long overviews would push the score chip off-screen. */
.discover-list > li > .max {
	min-width: 0;
}

.discover-list > li > .right-align {
	flex: none;
}

.hit-overview {
	white-space: normal;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
