/*
 Theme Name:   My Listing Child
 Theme URI:    http://mylisting.27collective.net/my-city/
 Description:  MyListing Child Theme
 Author:       27collective
 Author URI:   https://27collective.net/
 Template:     my-listing
 Version:      1.1
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Tags:         one-column, two-columns, three-columns, left-sidebar, right-sidebar, grid-layout, custom-menu, custom-logo, featured-images, footer-widgets, full-width-template, sticky-post, theme-options, threaded-comments, translation-ready
 Text Domain:  my-listing-child
*/

/* Mobile: baris tabel .extra-details adaptif, float dimatikan (KI 31 Jul) */
@media (max-width: 767px) {
	.extra-details > li { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 2px 14px; }
	.extra-details > li .item-attr { flex: 0 1 auto; opacity: .65; }
	.extra-details > li .item-property { float: none; flex: 0 1 auto; min-width: 0; text-align: left; line-height: 1.5; overflow-wrap: anywhere; }
}

@media (max-width:767px){.extra-details > li::after{display:none}}

.extra-details>li{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:2px 16px}
.extra-details>li::after{display:none}
.extra-details>li .item-attr{flex:0 1 auto;opacity:.65}
.extra-details>li .item-property{float:none;flex:0 1 auto;min-width:0;text-align:left;line-height:1.5;overflow-wrap:anywhere}
#open-hours .extra-details>li{display:block}
#open-hours .extra-details>li::after{display:table}
#open-hours .extra-details>li .item-property{float:right}


/* ---------------------------------------------------------------
   Listing tagline
   Child theme main-info.php renders the tagline as a <div>, but every
   tagline style in my-listing/assets/dist/single-listing.css is bound
   to the h2 tag selector (.profile-name h2, .listing-main-info h2).
   Those declarations are rebound here via the .profile-tagline class.
   --------------------------------------------------------------- */

.profile-name .pa-below-title {
	white-space: normal;
	overflow: hidden;
	flex-wrap: wrap;
}

.profile-name .profile-tagline {
	width: 100%;
	margin: 0;
	font-size: 15px;
	line-height: 22px;
	font-weight: 400;
	position: relative;
	top: -2px;
	white-space: normal;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* Desktop: the block is absolutely positioned over the cover image. */
.listing-main-info .profile-tagline {
	color: #fff;
}

/* <=1200px MyListing switches .listing-main-info to position:static on a
   white panel and recolours h1/h2. Mirror that, and allow a third line
   since nothing is absolutely positioned at this width. */
@media only screen and (max-width: 1200px) {
	.listing-main-info .profile-name .profile-tagline {
		color: #242429;
		-webkit-line-clamp: 3;
		line-clamp: 3;
	}
}

/* User profile cover reuses the same markup on a white background. */
.user-profile-cover .listing-main-info .profile-name .profile-tagline {
	color: #242429 !important;
}


/* ---------------------------------------------------------------
   Preview card tagline (alternate template)
   Same regression as the single-listing tagline above. The child
   previews/alternate.php renders the tagline as a <div>, but every
   declaration in my-listing/assets/dist/frontend.css is bound to the
   tag selector `.lf-item-info-2 h6` - and Theme Options > Typography
   > 'Tagline (Alternate template)' writes size/weight/colour to that
   same tag selector. Orphaned, the text inherited the card's bold
   body style. Rebound here via the class, with the metrics matched
   to the single listing tagline (15px / 22px / 400) on request.
   Parent used nowrap + ellipsis; replaced with a 2-line clamp so the
   card behaves like the single page instead of truncating mid-line.
   --------------------------------------------------------------- */

.lf-item-info-2 .listing-preview-tagline {
	font-size: 15px;
	line-height: 22px;
	font-weight: 400;
	color: #7e7e89;
	margin-top: 0;
	margin-bottom: 0;
	overflow-wrap: anywhere;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow: hidden;
}

/* KI park-fee visual system v1 */
.ki-pf-block .ki-park-fees-table {
	width: 100%;
	margin: 0;
	border: 0;
	border-collapse: separate;
	border-spacing: 0;
	table-layout: fixed;
	overflow: hidden;
	border-radius: 8px;
	background: #f2f6f8;
}
.ki-pf-block .ki-park-fees-table th,
.ki-pf-block .ki-park-fees-table td {
	padding: 12px 14px;
	border: 0;
	border-bottom: 1px solid rgba(19, 43, 55, .08);
	vertical-align: top;
	text-align: left;
	font-size: 13.5px;
	line-height: 1.45;
}
.ki-pf-block .ki-park-fees-table thead th {
	padding-top: 13px;
	padding-bottom: 10px;
	color: #263944;
	font-weight: 650;
	background: transparent;
}
.ki-pf-block .ki-park-fees-table thead th:nth-child(1) { width: 31%; }
.ki-pf-block .ki-park-fees-table thead th:nth-child(2) { width: 19%; }
.ki-pf-block .ki-park-fees-table thead th:nth-child(3) { width: 50%; }
.ki-pf-block .ki-park-fees-table tbody th {
	color: #172a34;
	font-weight: 600;
}
.ki-pf-block .ki-park-fees-table tbody tr:last-child th,
.ki-pf-block .ki-park-fees-table tbody tr:last-child td {
	border-bottom: 0;
}
.ki-pf-block .ki-fee-idr,
.ki-pf-block .ki-fee-usd,
.ki-pf-block .ki-fee-unit,
.ki-pf-block .ki-fee-note {
	display: block;
}
.ki-pf-block .ki-fee-idr {
	color: #172a34;
	font-weight: 600;
	white-space: nowrap;
}
.ki-pf-block .ki-fee-usd {
	margin-top: 2px;
	color: #2584aa;
	font-size: 12.5px;
	font-weight: 600;
	white-space: nowrap;
}
.ki-pf-block .ki-fee-unit {
	color: #263944;
	font-weight: 550;
}
.ki-pf-block .ki-fee-note {
	margin-top: 3px;
	color: #52636c;
	font-size: 12.5px;
	line-height: 1.45;
}
.ki-pf-block .ki-park-fees-conditions {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 11px 24px;
	margin: 14px 0 0;
	padding: 16px;
	list-style: none;
	border-radius: 8px;
	background: #f2f6f8;
}
.ki-pf-block .ki-park-fees-conditions li {
	position: relative;
	margin: 0;
	padding: 0 0 0 20px;
	color: #263944;
	font-size: 13px;
	line-height: 1.5;
}
.ki-pf-block .ki-park-fees-conditions li::before {
	content: '\2713';
	position: absolute;
	top: 0;
	left: 0;
	color: #2584aa;
	font-weight: 700;
}
.ki-pf-block .ki-park-fees-source {
	margin: 14px 0 0;
	padding: 13px 15px;
	border-left: 3px solid #2584aa;
	border-radius: 0 6px 6px 0;
	background: rgba(37, 132, 170, .055);
	color: #5d6970;
	font-size: 12px;
	line-height: 1.55;
}
@media (max-width: 680px) {
	.ki-pf-block .ki-park-fees-table {
		display: block;
		padding: 8px;
	}
	.ki-pf-block .ki-park-fees-table thead {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
		clip-path: inset(50%);
	}
	.ki-pf-block .ki-park-fees-table tbody {
		display: grid;
		gap: 8px;
	}
	.ki-pf-block .ki-park-fees-table tbody tr {
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 3px 14px;
		padding: 12px;
		border-radius: 7px;
		background: #fff;
	}
	.ki-pf-block .ki-park-fees-table tbody th,
	.ki-pf-block .ki-park-fees-table tbody td {
		display: block;
		width: auto;
		padding: 0;
		border: 0;
	}
	.ki-pf-block .ki-park-fees-table tbody th {
		grid-column: 1;
	}
	.ki-pf-block .ki-park-fees-table tbody td:nth-child(2) {
		grid-column: 2;
		grid-row: 1;
		text-align: right;
	}
	.ki-pf-block .ki-park-fees-table tbody td:nth-child(3) {
		grid-column: 1 / -1;
		padding-top: 7px;
	}
	.ki-pf-block .ki-park-fees-conditions {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}

/* KI mobile itinerary card tap-to-reveal v1 */
@media (max-width: 992px) and (hover: none), (max-width: 992px) and (pointer: coarse) {
	.listing-preview-title {
		margin-top: 0;
		margin-bottom: 5px;
	}
	#listing_tab_itineraries .lf-item-container.has-tagline .lf-item-info-2 {
		transform: translateY(calc(100% - 110px)) !important;
	}
	#listing_tab_itineraries .lf-item-container.has-tagline .listing-preview-tagline {
		opacity: 0;
		transition: opacity .2s ease;
	}
	#listing_tab_itineraries .lf-item-container.has-tagline.ki-preview-expanded .lf-item-info-2 {
		transform: translateY(0) !important;
	}
	#listing_tab_itineraries .lf-item-container.has-tagline.ki-preview-expanded .listing-preview-tagline {
		opacity: 1;
	}
}

/* KI Liveaboard gallery preview ratio v1 */
body.type-liveaboard .gallerySlider .galleryPreview a.item:not(.is-video) {
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 5px;
}

body.type-liveaboard .gallerySlider .galleryPreview a.item:not(.is-video) > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (max-width: 767px) {
	body.type-liveaboard .gallerySlider .galleryPreview a.item:not(.is-video) {
		aspect-ratio: 4 / 3;
	}
}

/* KI hero action row: never clip the price/CTA row on any listing type v1 */
.listing-main-buttons > ul {
	flex-wrap: wrap;
	overflow: visible;
	row-gap: 12px;
}

.listing-main-buttons > ul > li:first-child {
	margin-left: 0;
}
