/*
 * Perepaik Theme — single Koht / Sündmus pages.
 * Builds on places.css + events.css (cards, status, grid).
 */

.pp-single {
	width: 100%;
	max-width: calc(var(--pp-container) + 2 * var(--pp-gutter));
	margin: 0 auto;
	padding: 20px var(--pp-gutter) 24px;
}

/* ---------------------------------------------------------
   Header
   --------------------------------------------------------- */

.pp-breadcrumb {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
	margin-bottom: 20px;
	color: var(--pp-muted);
	font-size: 14px;
}

.pp-breadcrumb a {
	color: var(--pp-ink-soft);
	text-decoration: none;
}

.pp-breadcrumb a:hover {
	color: var(--pp-coral);
}

.pp-single__hero {
	display: grid;
	grid-template-columns: minmax(0, 540px) minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.pp-single__intro {
	min-width: 0;
	padding-top: 6px;
}

.pp-single__title-row {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.pp-single__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 8px;
	color: var(--pp-ink-soft);
	font-size: 15px;
	font-weight: 500;
}

.pp-single__title {
	margin: 0;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: clamp(30px, 3.4vw, 44px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.03em;
}

.pp-single .pp-single__fav {
	position: static;
	flex: none;
	width: 48px;
	height: 48px;
	box-shadow: var(--pp-shadow-sm);
}

.pp-single__facts {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin: 16px 0 0;
	padding: 0;
	list-style: none;
}

.pp-single__fact {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 0 14px;
	background: var(--pp-surface);
	border: 1px solid #ebe2d8;
	border-radius: 999px;
	color: var(--pp-ink);
	font-size: 14px;
	font-weight: 500;
}

.pp-single__facts .pp-status {
	min-height: 34px;
}

/* Key facts: hours / time, price, location */
.pp-keyinfo {
	margin: 24px 0 0;
	padding: 4px 22px;
	background: var(--pp-surface);
	border-radius: 24px;
	box-shadow: var(--pp-shadow-sm);
}

.pp-keyinfo__row {
	display: flex;
	align-items: flex-start;
	gap: 16px;
	padding: 18px 0;
}

.pp-keyinfo__row + .pp-keyinfo__row {
	border-top: 1px solid var(--pp-line);
}

.pp-keyinfo__icon {
	display: inline-flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--pp-purple-soft);
	color: #6f55a8;
}

.pp-keyinfo__icon .pp-icon {
	width: 23px;
	height: 23px;
}

.pp-keyinfo__icon--ticket {
	background: #e2f4e7;
	color: #1f6b47;
}

.pp-keyinfo__icon--pin {
	background: var(--pp-coral-soft);
	color: var(--pp-coral-strong);
}

.pp-keyinfo__icon--calendar {
	background: #fdf3d8;
	color: #9a6b0c;
}

.pp-keyinfo__body {
	min-width: 0;
}

.pp-keyinfo__label {
	color: var(--pp-muted);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.pp-keyinfo__body dd {
	margin: 0;
}

.pp-keyinfo__value {
	margin-top: 2px !important;
	color: var(--pp-ink);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.pp-keyinfo__value::first-letter {
	text-transform: uppercase;
}

.pp-keyinfo__value a {
	color: var(--pp-ink);
	text-decoration-color: rgba(38, 40, 58, 0.3);
	text-underline-offset: 3px;
}

.pp-keyinfo__value--open,
.pp-keyinfo__value--closed {
	display: flex;
	align-items: center;
	gap: 8px;
}

.pp-keyinfo__value--open::before,
.pp-keyinfo__value--closed::before {
	content: "";
	flex: none;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #4f9a5d;
}

.pp-keyinfo__value--closed::before {
	background: var(--pp-coral);
}

.pp-keyinfo__line {
	margin-top: 3px !important;
	color: var(--pp-ink-soft);
	font-size: 15px;
}

.pp-keyinfo__line::first-letter {
	text-transform: uppercase;
}

.pp-keyinfo__links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 18px;
	margin-top: 8px !important;
	font-size: 14px;
}

.pp-keyinfo__links a {
	color: #6f55a8;
	font-weight: 600;
	text-decoration: none;
}

.pp-keyinfo__links a:hover {
	text-decoration: underline;
}

.pp-single__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 22px;
}

.pp-single__actions .pp-button {
	min-height: 50px;
	padding: 0 28px;
	font-size: 15px;
}

.pp-single__action-note {
	margin: 12px 0 0;
	color: var(--pp-ink-soft);
	font-size: 14px;
}

/* ---------------------------------------------------------
   Image slider
   --------------------------------------------------------- */

.pp-slider {
	position: relative;
	aspect-ratio: 1;
	overflow: hidden;
	border-radius: 28px;
	background: linear-gradient(135deg, var(--pp-coral-soft), var(--pp-purple-soft));
}

.pp-slider__track {
	display: flex;
	height: 100%;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.pp-slider__track::-webkit-scrollbar {
	display: none;
}

.pp-slider__slide {
	position: relative;
	flex: 0 0 100%;
	scroll-snap-align: start;
}

.pp-slider .pp-slider__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pp-slider__arrow {
	position: absolute;
	top: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0 0 3px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.92);
	color: var(--pp-ink);
	font-size: 28px;
	line-height: 1;
	box-shadow: var(--pp-shadow-sm);
	cursor: pointer;
	transform: translateY(-50%);
	transition: opacity 150ms ease;
}

.pp-slider__arrow:hover,
.pp-slider__arrow:focus-visible {
	background: #fff;
}

.pp-slider__arrow[disabled] {
	opacity: 0;
	pointer-events: none;
}

.pp-slider__arrow--prev {
	left: 14px;
}

.pp-slider__arrow--next {
	right: 14px;
}

.pp-slider__dots {
	position: absolute;
	left: 50%;
	bottom: 14px;
	display: flex;
	gap: 6px;
	padding: 6px 8px;
	border-radius: 999px;
	background: rgba(38, 40, 58, 0.35);
	transform: translateX(-50%);
}

.pp-slider__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.6);
	cursor: pointer;
	transition: width 200ms ease, background-color 200ms ease;
}

.pp-slider__dot.is-active {
	width: 20px;
	background: #fff;
}

.pp-slider--empty {
	display: flex;
	align-items: center;
	justify-content: center;
}

.pp-slider__emoji {
	font-size: 96px;
	opacity: 0.85;
}

/* Viewer (single.js) */
.pp-viewer {
	width: 100vw;
	max-width: 100vw;
	height: 100vh;
	max-height: 100vh;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(20, 21, 32, 0.94);
	color: #fff;
}

.pp-viewer::backdrop {
	background: transparent;
}

.pp-viewer__figure {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 64px 72px;
}

.pp-viewer__image {
	max-width: 100%;
	max-height: 100%;
	border-radius: 12px;
	object-fit: contain;
}

.pp-viewer__button {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	font-size: 26px;
	cursor: pointer;
}

.pp-viewer__button:hover,
.pp-viewer__button:focus-visible {
	background: rgba(255, 255, 255, 0.26);
}

.pp-viewer__close {
	top: 16px;
	right: 16px;
}

.pp-viewer__prev,
.pp-viewer__next {
	top: 50%;
	transform: translateY(-50%);
}

.pp-viewer__prev {
	left: 16px;
}

.pp-viewer__next {
	right: 16px;
}

.pp-viewer__count {
	position: absolute;
	left: 50%;
	bottom: 18px;
	transform: translateX(-50%);
	font-size: 14px;
	opacity: 0.8;
}

/* ---------------------------------------------------------
   Layout: main column + summary card
   --------------------------------------------------------- */

.pp-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 380px;
	gap: 40px;
	align-items: start;
	margin-top: 56px;
}

/* No contact card: one readable column. */
.pp-single__layout:not(:has(.pp-single__aside)) {
	grid-template-columns: minmax(0, 820px);
}

.pp-single__aside {
	position: sticky;
	top: 24px;
}

.admin-bar .pp-single__aside {
	top: 56px;
}

.pp-single__section + .pp-single__section {
	margin-top: 36px;
	padding-top: 32px;
	border-top: 1px solid var(--pp-line);
}

.pp-single__heading {
	margin: 0 0 16px;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: 22px;
	font-weight: 700;
	letter-spacing: -0.01em;
}

.pp-single__content {
	color: var(--pp-ink);
	font-size: 17px;
	line-height: 1.7;
}

.pp-single__content > :first-child {
	margin-top: 0;
}

.pp-single__content > :last-child {
	margin-bottom: 0;
}

.pp-single__content a {
	color: #6f55a8;
}

.pp-single__content img {
	max-width: 100%;
	height: auto;
	border-radius: var(--pp-radius-md);
}

.pp-single__note {
	margin: 14px 0 0;
	color: var(--pp-ink-soft);
	font-size: 15px;
}

/* Tables (prices, hours) */
.pp-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 16px;
}

.pp-table th,
.pp-table td {
	padding: 12px 0;
	border-bottom: 1px dashed #e6dbcf;
	text-align: left;
	vertical-align: top;
}

.pp-table tr:last-child th,
.pp-table tr:last-child td {
	border-bottom: 0;
}

.pp-table th::first-letter {
	text-transform: uppercase;
}

.pp-table th {
	padding-right: 16px;
	color: var(--pp-ink);
	font-weight: 500;
}

.pp-table td {
	color: var(--pp-ink);
	font-weight: 600;
	text-align: right;
	white-space: nowrap;
}

.pp-table__note {
	display: block;
	margin-top: 2px;
	color: var(--pp-ink-soft);
	font-size: 14px;
	font-weight: 400;
}

.pp-table--hours {
	max-width: 460px;
}

.pp-table--hours td {
	font-weight: 500;
}

.pp-table--hours tr.is-today th,
.pp-table--hours tr.is-today td {
	color: #4f3a8f;
	font-weight: 700;
}

.pp-table__today {
	display: inline-block;
	margin-left: 8px;
	padding: 2px 10px;
	border-radius: 999px;
	background: var(--pp-purple-soft);
	color: #4f3a8f;
	font-size: 12px;
	font-weight: 600;
}

.pp-hours-changes {
	margin-top: 18px;
	padding: 16px 18px;
	background: var(--pp-coral-soft);
	border-radius: var(--pp-radius-md);
}

.pp-hours-changes__title {
	margin: 0 0 8px;
	font-family: var(--pp-font-body);
	font-size: 15px;
	font-weight: 700;
}

.pp-hours-changes ul {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 15px;
}

.pp-hours-changes li {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	padding: 3px 0;
}

.pp-hours-changes__date {
	min-width: 140px;
	font-weight: 600;
}

/* Good to know */
.pp-info-list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	margin: 0;
}

.pp-info-list > div {
	padding: 14px 16px;
	background: var(--pp-surface);
	border-radius: var(--pp-radius-md);
}

.pp-info-list dt {
	color: var(--pp-ink-soft);
	font-size: 13px;
}

.pp-info-list dd {
	margin: 2px 0 0;
	color: var(--pp-ink);
	font-size: 16px;
	font-weight: 600;
}

/* Location */
.pp-mini-map {
	height: 280px;
	margin-bottom: 16px;
	overflow: hidden;
	border-radius: var(--pp-radius-lg);
	background: linear-gradient(160deg, #c8f0dc 0%, #c3e9ef 55%, #c9e3fb 100%);
}

.pp-location {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.pp-location__icon {
	flex: none;
	margin-top: 2px;
	color: var(--pp-coral);
	font-size: 22px;
}

.pp-location__text {
	flex: 1;
	min-width: 0;
}

.pp-location__text p {
	margin: 0;
}

.pp-location__venue {
	font-weight: 600;
}

.pp-location__venue a {
	color: var(--pp-ink);
}

.pp-location__address {
	color: var(--pp-ink);
}

.pp-location__note {
	margin-top: 4px !important;
	color: var(--pp-ink-soft);
	font-size: 15px;
}

.pp-location__directions {
	flex: none;
}

/* Summary card */
.pp-summary {
	padding: 24px;
	background: var(--pp-surface);
	border-radius: 28px;
	box-shadow: var(--pp-shadow-md);
}

.pp-summary__title {
	margin: 0 0 6px;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: 20px;
	font-weight: 700;
}

.pp-summary__contact {
	margin: 0;
	padding: 0;
	list-style: none;
}

.pp-summary__contact li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--pp-line);
	font-size: 15px;
}

.pp-summary__contact li:last-child {
	border-bottom: 0;
}

.pp-summary__label {
	flex: none;
	color: var(--pp-ink-soft);
}

.pp-summary__contact a {
	color: var(--pp-ink);
	font-weight: 600;
	text-align: right;
	overflow-wrap: anywhere;
}

/* ---------------------------------------------------------
   Related: events here, nearby places, more events
   --------------------------------------------------------- */

.pp-single__related {
	margin-top: 64px;
}

.pp-single__related-title {
	margin: 0 0 22px;
	color: var(--pp-ink);
	font-family: var(--pp-font-body);
	font-size: clamp(24px, 2.4vw, 30px);
	font-weight: 800;
	letter-spacing: -0.02em;
}

.pp-single__related-more {
	margin: 24px 0 0;
	text-align: center;
}

.pp-single__nearby {
	position: relative;
	display: flex;
}

.pp-single__nearby > .pp-place-card {
	flex: 1;
}

.pp-single__distance {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 2;
	padding: 6px 12px;
	background: rgba(255, 255, 255, 0.94);
	border-radius: 999px;
	color: var(--pp-ink);
	font-size: 13px;
	font-weight: 600;
	box-shadow: var(--pp-shadow-sm);
	pointer-events: none;
}

/* ---------------------------------------------------------
   Tablet & mobile
   --------------------------------------------------------- */

@media (max-width: 1000px) {
	.pp-single__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.pp-single__aside {
		position: static;
	}

	.pp-single__hero {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		gap: 32px;
	}
}

@media (max-width: 767px) {
	.pp-single {
		padding-top: 12px;
	}

	.pp-breadcrumb {
		margin-bottom: 14px;
		font-size: 13px;
	}

	.pp-single .pp-single__fav {
		width: 44px;
		height: 44px;
	}

	.pp-single__hero {
		grid-template-columns: minmax(0, 1fr);
		gap: 22px;
	}

	.pp-slider {
		aspect-ratio: 4 / 3;
		margin: 0 calc(-1 * var(--pp-gutter));
		border-radius: 0;
	}

	.pp-slider__arrow {
		display: none;
	}

	.pp-slider__emoji {
		font-size: 72px;
	}

	.pp-single__intro {
		padding-top: 0;
	}

	.pp-keyinfo {
		margin-top: 20px;
		padding: 2px 16px;
		border-radius: 20px;
	}

	.pp-keyinfo__row {
		gap: 14px;
		padding: 15px 0;
	}

	.pp-keyinfo__icon {
		width: 40px;
		height: 40px;
	}

	.pp-keyinfo__value {
		font-size: 17px;
	}

	.pp-single__actions .pp-button {
		flex: 1 1 100%;
	}

	.pp-viewer__figure {
		padding: 64px 12px;
	}

	.pp-viewer__prev,
	.pp-viewer__next {
		top: auto;
		bottom: 10px;
		transform: none;
	}

	.pp-single__layout {
		margin-top: 36px;
	}

	.pp-summary {
		padding: 18px;
		border-radius: 22px;
	}

	.pp-single__heading {
		font-size: 20px;
	}

	.pp-single__content {
		font-size: 16px;
	}

	.pp-info-list {
		grid-template-columns: minmax(0, 1fr);
	}

	.pp-location {
		flex-wrap: wrap;
	}

	.pp-location__directions {
		width: 100%;
	}

	.pp-mini-map {
		height: 220px;
	}

	.pp-single__related {
		margin-top: 44px;
	}
}
