/**
 * Listing shortcodes in posts and pages (atb-core listing-shortcodes.php).
 *
 * The listing tables switch to stacked cards on screens under 780px (theme style.css).
 * Inside a post the table only has the content column, so the same card layout
 * applies whenever the shortcode's container is under 780px wide, whatever the
 * screen size. Tables placed by theme templates aren't in .atb-listing-embed and
 * are unaffected.
 */

/* The table's own wrapper is the container (not .atb-listing-embed, which also holds
   the fixed-position filter popup that must still cover the whole screen). */
.atb-listing-embed {
	max-width: 100%;
}

.atb-listing-embed .listings {
	container-type: inline-size;
}

@container (max-width: 780px) {
	.atb-listing-embed .listing-photo img {
		margin-bottom: -.66rem;
	}

	.atb-listing-embed .notes:empty {
		display: none;
	}

	.atb-listing-embed .more_info_button {
		min-width: 110px;
		width: 70%;
		background:#448892;
		color: #fff;
		float: none;
		margin-top: 0px;
		border-radius:30px;
		text-align:center;
		margin:auto;
	}

	.atb-listing-embed .more_info_button {
		min-width: 110px;
		width: 70%;
		color: #fff;
		float: none;
		margin-top: 0px;
		border-radius:30px;
		text-align:center;
		margin:auto;
	}

	.atb-listing-embed .listings td a {
		color: #ffffff;
		font-weight: 700;
		font-size: unset;
	}

	.atb-listing-embed a.listing_resortname:hover,
	.atb-listing-embed a.listing_resortname:active {
		color:#000;
	}

	.atb-listing-embed .listings td.resort_title {
		max-width:100%;
		min-width: 0px;
		background:#7CB034;
	}

	.atb-listing-embed .listings table,
	.atb-listing-embed .listings tbody {
		display: block;
		width: 100%;
	}

	.atb-listing-embed .listings thead {
		display: none;
	}

	.atb-listing-embed .listings table tr,
	.atb-listing-embed .listings table th,
	.atb-listing-embed .listings table td {
		display: block;
		padding: 0;
		text-align: left;
		white-space: normal;
	}

	.atb-listing-embed .listings table tr {
		border-bottom: 1px solid #eee;
		padding-bottom: 12px;
		margin-bottom: 1rem;
		width: 100%;
		margin-left: auto;
		margin-right: auto;
		background-color: #f0f0f0;
		border-radius: 12px;
		box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	}

	.atb-listing-embed .listings table th[data-title]:before,
	.atb-listing-embed .listings table td[data-title]:before {
		content: attr(data-title) ":\00A0";
		font-weight: bold;
	}

	.atb-listing-embed .listings table td {
		border: none;
		margin-bottom: 6px;
		color: #444;
		padding: 0rem 1rem;
		line-height: 2;
	}

	.atb-listing-embed .listings table td:empty {
		display: none;
	}

	.atb-listing-embed .listings table td:nth-child(1) {
		font-size: 1.6em;
		font-weight: bold;
		margin-bottom: 6px;
		color: #fff;
		background-color: #273549;
		text-align: center;
		line-height: 2;
		position:relative;
		z-index:2;
		border-top-left-radius: 12px;
		border-top-right-radius: 12px;
		padding: 5px;
	}

	.atb-listing-embed .listings table th:nth-child(2),
	.atb-listing-embed .listings table td:nth-child(2) {
		float: none;
		padding: 1rem 1rem 0rem;
	}

}
