/* Calibre layout-shift fixes (Nov 2026). Loaded after calibre-tuneup.css. No visual change once the page has settled:
   every rule here only makes the first paint match the layout the theme scripts produce a moment later. */

/* Photo sliders (listing pages, new-boat pages, any .banner-slider): until the slider script starts,
   show only the first slide instead of every slide stacked down the page. Same height as the running slider. */
.banner-slider:not(.slick-initialized) > div:not(:first-child) {
	display: none;
}

/* Listing opened with #photos or #videos in the address: show that tab from the first paint.
   The classes are set by a small script in <head> (library/calibre-cls.php) and removed again
   as soon as the theme's tab script has taken over. */
html.calibre-tab-photos #details.tabs-panel,
html.calibre-tab-videos #details.tabs-panel {
	display: none;
}
html.calibre-tab-photos #photos.tabs-panel,
html.calibre-tab-videos #videos.tabs-panel {
	display: block;
}
/* ...and keep the page at the top while it loads (the theme script scrolls back to the top anyway). */
html.calibre-tab-hold .single-boat-content > .tabs-panel {
	scroll-margin-top: 99999px;
}

/* Photos tab: two columns before the masonry script runs, in the same places masonry puts them
   (masonry positions the tiles itself afterwards, so these floats then have no effect). */
@media screen and (min-width: 40em) {
	.photo-grid > .grid-item {
		float: left;
	}
	.photo-grid > .grid-item:nth-child(odd) {
		clear: left;
		margin-right: 30px;
	}
}
.photo-grid::after {
	content: "";
	display: table;
	clear: both;
}

@media print {
	html.calibre-tab-photos #details.tabs-panel,
	html.calibre-tab-videos #details.tabs-panel {
		display: block;
	}
}
