/* ACJC vozy: prohlídka 360° přes celou šířku stránky vozu (od 0.4.1, acjc-pas360.js). Šířku a posun doleva
   nastavuje skript (sloupec obsahu není uprostřed). Vrstva nad přilepeným souhrnem vpravo. */

.acjc-pas360 {
	position: relative;
	z-index: 6;
	box-sizing: border-box;
	max-width: none;
	margin: 8px 0 32px;
	overflow: hidden;
	background: #e9ecef;
}

.acjc-pas360__scena {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 2 / 1;
	max-height: min(78vh, 760px);
	min-height: 230px;
	overflow: hidden;
	outline: 0;
	touch-action: pan-y;
	-webkit-user-select: none;
	user-select: none;
	-webkit-tap-highlight-color: transparent;
}

/* Kurzor: tmavá pilulka se šipkami do stran a „360°“ (tah = otáčení). */
@media (hover: hover) and (pointer: fine) {
	.acjc-pas360__scena.je-pripraveno {
		cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='48' viewBox='0 0 112 48'%3E%3Crect x='1' y='1' width='110' height='46' rx='23' fill='%23101820' fill-opacity='.88' stroke='%23fff' stroke-opacity='.35'/%3E%3Cpath d='M22 24h-8m0 0 5-5m-5 5 5 5M90 24h8m0 0-5-5m5 5-5 5' fill='none' stroke='%23ef7c05' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ctext x='56' y='30.5' fill='%23fff' font-family='Arial,Helvetica,sans-serif' font-size='17' font-weight='700' text-anchor='middle'%3E360%C2%B0%3C/text%3E%3C/svg%3E") 56 24, grab;
	}

	.acjc-pas360__scena.je-pripraveno.je-tazeno {
		cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='112' height='48' viewBox='0 0 112 48'%3E%3Crect x='1' y='1' width='110' height='46' rx='23' fill='%23ef7c05' stroke='%23fff' stroke-opacity='.5'/%3E%3Cpath d='M22 24h-8m0 0 5-5m-5 5 5 5M90 24h8m0 0-5-5m5 5-5 5' fill='none' stroke='%23101820' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ctext x='56' y='30.5' fill='%23101820' font-family='Arial,Helvetica,sans-serif' font-size='17' font-weight='700' text-anchor='middle'%3E360%C2%B0%3C/text%3E%3C/svg%3E") 56 24, grabbing;
	}
}

.acjc-pas360__snimek,
.acjc-ui .acjc-pas360__scena img.acjc-pas360__snimek {
	position: absolute;
	display: block;
	max-width: none !important;
	max-height: none !important;
	pointer-events: none;
}

/* Velmi široký monitor: snímek jen v šířce, kdy se vůz vejde celý; boky přiznaně tvrdé, kolem bílá */
.acjc-pas360.je-siroky {
	background: #fff;
}

.acjc-pas360.je-siroky > .acjc-pas360__scena {
	max-height: none;
	margin: 0 auto;
	aspect-ratio: auto;
}

.acjc-pas360__snimek:not([src]) {
	visibility: hidden;
}

/* Horní i spodní okraj pásu se rozplyne do stránky (bez tvrdého přechodu) */
.acjc-pas360 > .acjc-pas360__scena::before,
.acjc-pas360 > .acjc-pas360__scena::after {
	content: "";
	position: absolute;
	right: 0;
	left: 0;
	z-index: 1;
	height: 6%;
	pointer-events: none;
}

.acjc-pas360 > .acjc-pas360__scena::before {
	top: 0;
	background: linear-gradient(to top, rgb(255 255 255 / 0), #fff);
}

.acjc-pas360 > .acjc-pas360__scena::after {
	bottom: 0;
	background: linear-gradient(to bottom, rgb(255 255 255 / 0), #fff);
}

.acjc-pas360__nac {
	position: absolute;
	z-index: 2;
	left: 50%;
	top: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	padding: 16px 22px;
	background: rgb(255 255 255 / .82);
	color: #5b6570;
	font-size: 14px;
	font-weight: 600;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.acjc-pas360__scena.je-pripraveno .acjc-pas360__nac {
	top: auto;
	bottom: 18%;
	flex-direction: row;
	padding: 6px 12px;
	transform: translateX(-50%);
}

.acjc-pas360__scena.je-pripraveno .acjc-pas360__nac .acjc-nac {
	width: 30px;
}

.acjc-pas360__nac[hidden] {
	display: none;
}

.acjc-pas360__napoveda {
	position: absolute;
	z-index: 2;
	left: 50%;
	bottom: 16%;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: rgb(16 24 32 / .82);
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	white-space: nowrap;
	transform: translateX(-50%);
	pointer-events: none;
}

.acjc-pas360__napoveda[hidden] {
	display: none;
}

.acjc-pas360__napoveda svg {
	color: #ef7c05;
}

/* Napovědu i načítání nepouštět přes sebe */
.acjc-pas360__nac:not([hidden]) ~ .acjc-pas360__napoveda {
	display: none;
}

.acjc-pas360__galerie {
	position: absolute;
	z-index: 2;
	top: 14px;
	right: 16px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 42px;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 0;
	background: rgb(255 255 255 / .92);
	box-shadow: 0 1px 6px rgb(16 24 32 / .2);
	color: #101820;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
}

.acjc-pas360__scena:focus-visible {
	outline: 3px solid #ef7c05;
	outline-offset: -3px;
}

.acjc-pas360__galerie:focus-visible {
	outline: 2px solid #ef7c05;
	outline-offset: 2px;
}

@media (min-width: 1000px) {
	.acjc-pas360 {
		margin: 24px 0 48px;
	}

	/* Na počítači dole: nahoře by ho při posouvání zakrývala lišta s cenou */
	.acjc-pas360__galerie {
		top: auto;
		right: calc(var(--acjc-pas-okraj, 0px) + 24px);
		bottom: 9%;
	}
}

@media print {
	.acjc-pas360 {
		display: none !important;
	}
}
