/*
Theme Name: classipress-child
Version: 1.0
Description: A child theme of ClassiPress
Template: classipress
Author: Administrator
*/

/* The parent stylesheet is enqueued by the theme itself -- no @import here. */

/* ------------------------------------------------------------------
   Listing card meta row

   The theme floats .price-wrap right inside .listing-meta. On the home
   grid (large-up-6) the card is ~165px wide, the badge is ~80px with its
   25px left padding, and the floated badge ends up sitting on top of the
   city and hanging past the card edge. Flex keeps the two on one line
   when they fit and wraps the badge onto its own line when they do not.
   ------------------------------------------------------------------ */
.listing-item .listing-meta {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 8px;
}

/* The grid card has a fixed height and overflow:hidden, so the meta row must
   stay on one line -- a wrapped badge gets cut off at the card edge. */
.listing-item.display-grid .listing-meta {
	flex-wrap: nowrap;
	/* 12px leaves "Amsterdam" + badge 3px over the 138px content box and the
	   city gets ellipsised for nothing */
	font-size: 11px;
}

.listing-item .listing-meta > .meta-list {
	order: 1;
	margin: 0;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
}

/* flex-shrink must be off: a shrunken badge is narrower than "€160,00" and the
   text spills straight out of it. When it no longer fits next to the city it
   wraps onto its own line instead. */
.listing-item .listing-meta > .price-wrap {
	order: 2;
	float: none;
	flex: 0 0 auto;
	margin-left: auto;
	max-width: 100%;
}

/* `.listing-item .entry-header .listing-meta span:first-child{padding:0}` in the
   parent theme strips the badge's padding, so the red box hugs the text and the
   decorative dot (:after, left:10px) lands on top of the first character. That
   was the "broken price" -- this selector has to outrank it. */
.listing-item .entry-header .listing-meta > .price-wrap > .tag-head {
	float: none;
	display: inline-block;
	padding: 0 6px;
	font-size: 11px;
	white-space: nowrap;
}

/* the decorative dot needs 25px of left padding it no longer gets, and on a
   165px card that padding is what pushed the badge out of the row */
.listing-item .entry-header .listing-meta > .price-wrap > .tag-head:after {
	display: none;
}

.listing-item .entry-header .listing-meta > .price-wrap > .tag-head > .post-price {
	padding: 0;
}

/* long city names must not push the badge out of the card */
.listing-item .listing-meta > .meta-list > li {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
