/*
 * Styling for the Mappia Gallery block — this is the user's original
 * design (from their working prior site), dropped in as-is, with two
 * small scoping tweaks so it's safe to reuse as a block on arbitrary
 * pages next to other content:
 *
 * 1. The original had a bare `button` / `button:hover` selector, which
 *    would restyle every button on any page that includes this block
 *    (WP Button blocks, form buttons, etc). Scoped to
 *    `.slideshow-container button` — same visual result for the
 *    slideshow's own buttons, no effect on anything else.
 * 2. Same for `.wp-block-button__link:hover` — scoped to inside
 *    `.slideshow-container` so it only touches button-blocks that are
 *    somehow nested in the slideshow itself, not every button block on
 *    the page.
 * 3. Bare `.active` -> `.slide.active`, matching exactly what the JS
 *    applies the class to, removing a possible collision with any other
 *    plugin/theme using a generic `.active` class on the same page.
 *
 * Everything else (colors, spacing, the gradient, fullscreen rules,
 * hover effects) is unchanged from the original.
 */

.slideshow-container,
.slideshow,
.slide {
	border-radius: 10px;
}
.slideshow {
	box-shadow: 0px 4px 8px rgba( 0, 0, 0, 0.32 );
}
.slideshow-container {
	position: relative;
}
.slideshow {
	position: relative;
	/* width: 80%; */
	max-width: 1280px;
	max-height: 720px;
	margin: auto;
	background: #fff;
	overflow: hidden;
	aspect-ratio: 16/9;
	background: #66b2bf;
	background: linear-gradient(
		162deg,
		rgba( 178, 207, 203, 1 ) 0%,
		rgba( 165, 190, 125, 1 ) 51%,
		rgba( 215, 223, 202, 1 ) 100%
	);
}
.slide {
	display: none;
	width: 100%;
	height: 100%;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}
.slide.active {
	display: block;
}
.controls {
	position: relative;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
	max-width: 1280px;
	margin: 20px auto;
	background-color: none;
	top: 0px;
	z-index: 30;
}
.controls:fullscreen {
	margin-left: 1rem;
	margin-right: 1rem;
}
.day-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	justify-content: center;
	flex: 1;
	margin-right: -6rem;
}
.slideshow-container button {
	padding: 6px 12px;
	cursor: pointer;
	border: none;
	border-radius: 5px;
	box-shadow: inset 0px -1px 0px rgba( 0, 0, 0, 0.12 );
	background-color: #eee;
	height: 33px;
}
.slideshow-container button:hover {
	box-shadow: inset 0px -1px 0px rgba( 0, 0, 0, 0.12 ), 0px 3px 8px rgba( 0, 0, 0, 0.12 );
}
.day-buttons button:first-child {
	margin-right: 1rem;
}
.day-buttons button:last-child {
	margin-left: 1rem;
}
.fullscreen-button {
	margin-right: 3rem;
}
@media ( max-width: 800px ) {
	.hide-on-narrow {
		display: none;
	}
}
.play-button {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	cursor: pointer;
	z-index: 20;
}
.play-button p {
	text-align: center;
	color: white;
	font-family: sans-serif;
	text-shadow: 0px 2px 2px rgba( 0, 0, 0, 0.52 );
	font-size: 1.2rem;
}
.play-button svg {
	transition: transform 0.3s ease;
	/* cursor: pointer; */
}
.play-button:hover svg {
	transform: scale( 1.1 );
}
.slideshow-container:fullscreen {
	width: 100vw;
	height: 100vh;
	max-width: none;
	background: black;
}
.slideshow-container:fullscreen .slideshow {
	max-width: 100vw;
	max-height: 100vh;
}
.slideshow-container:fullscreen .slide {
	width: 100%;
	height: 100%;
	background-size: contain;
	background-position: center;
}
.slideshow-container:fullscreen .controls {
	margin-top: -80px;
}
.slideshow-container:fullscreen button {
	background-color: white;
	box-shadow: 0px 6px 15px rgba( 0, 0, 0, 0.32 );
}
.slideshow-container:fullscreen button:hover {
	box-shadow: 0px 6px 15px rgba( 0, 0, 0, 0.12 );
}
/* Grundstil */
.slideshow-container .controls {
	opacity: 1;
	transition: opacity 0.5s ease; /* fade in/out */
}
/* Klass vi aktiverar när musen är inaktiv */
.slideshow-container .controls.hidden {
	opacity: 0;
	pointer-events: none; /* gör så att knapparna inte går att klicka när de är dolda */
}
/* Ta bort mörkare hover-effekt */
.slideshow-container button:hover,
.slideshow-container .wp-block-button__link:hover {
	background-color: #fff !important;
	filter: none !important;
	opacity: 1 !important;
}
.slideshow::after {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0 ); /* osynlig */
	z-index: 10;
}

/*
 * New for this plugin: a second row of buttons for the "TX" / "TX:Y"
 * tagged comments, kept separate from .day-buttons/.controls above so
 * that row's original layout is untouched. No fullscreen treatment for
 * this row yet — hidden there until that's designed.
 */
.tag-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
	justify-content: center;
	max-width: 1280px;
	margin: 10px auto 0;
	position: relative;
	z-index: 30;
}
.tag-buttons button {
	font-weight: 600;
}
.slideshow-container:fullscreen .tag-buttons {
	display: none;
}

/* Wrapper elements this plugin adds around the slideshow (not part of the original design). */
.mappia-gallery-block {
	margin: 2em 0;
}
.mappia-gallery-block__title {
	margin: 0 0 0.5em;
}
.mappia-gallery-block__empty {
	font-style: italic;
	color: #666;
	margin: 0;
}
