/*
Theme Name:   Kronshof Child
Template:     kronshof
Description:  Die HestaHub-Ferienwohnungen im Kronshof-Layout.
Version:      0.1.2
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain:  kronshof-child
*/

/*
 * The parent's style.css styles almost everything: the template overrides
 * in hestahub/ use its classes. What follows is only what the old site got
 * from plugins that the HestaHub pages don't use: PhotoBlocks for the photos
 * and the ICS importer for the calendar.
 */

/* ---------------------------------------------------------------------
 * The page around the content (the plugin's frame has no .row).
 * ------------------------------------------------------------------- */

/*
 * The parent pulls #content up over the header slider (margin-top: -400px).
 * The old content column was positioned (Bootstrap's .col-*), so it was
 * painted above the slider; the plugin's <main> needs the same, or the
 * slider covers the page's title.
 */
.hestahub-page {
	position: relative;
}

.hestahub-page::after,
.kronshof-fewo::after {
	content: "";
	display: block;
	clear: both;
}

/* The old Apartment page sat on a white panel; the overview didn't. */
.kronshof-fewo {
	background-color: #fff;
}

.hestahub-page .kronshof-note {
	clear: both;
	font-size: 12px;
	color: #909090;
	text-align: center;
	margin: 10px 0 0;
}

/* ---------------------------------------------------------------------
 * Photos: a grid in place of the old PhotoBlocks gallery. Each photo
 * opens in the theme's fancybox lightbox.
 * ------------------------------------------------------------------- */

.hestahub .kronshof-gallery {
	clear: both;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	grid-auto-rows: 180px;
	grid-auto-flow: dense;
	gap: 5px;
	padding: 5px 0;
}

@media (max-width: 767px) {
	.hestahub .kronshof-gallery {
		grid-template-columns: repeat(2, 1fr);
		grid-auto-rows: 120px;
	}
}

.hestahub .kronshof-photo {
	position: relative;
	display: block;
	overflow: hidden;
	margin: 0;
	background: #333;
}

.hestahub .kronshof-photo a {
	display: block;
	width: 100%;
	height: 100%;
}

.hestahub .kronshof-photo--primary {
	grid-column: span 2;
	grid-row: span 2;
}

.hestahub .kronshof-photo img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
}

.hestahub .kronshof-photo:hover img,
.hestahub .kronshof-photo:focus img {
	transform: scale(1.05);
	opacity: 0.8;
}

.hestahub .kronshof-photo-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	padding: 2px 10px;
	background-color: rgba(0, 0, 0, 0.83);
	color: #fff;
	font-size: 16px;
	line-height: 1.6;
	pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Prices: the old list, plus room for its tooltips.
 * ------------------------------------------------------------------- */

.hestahub .hengste-preis .tooltip {
	color: #CC0000;
	cursor: help;
}

.hestahub .hengste-preis .tooltip:focus::after {
	background: rgba(0, 0, 0, 0.8);
	border-radius: 5px;
	bottom: 26px;
	color: #fff;
	content: attr(info);
	left: -20px;
	padding: 5px 15px;
	position: absolute;
	z-index: 98;
	width: 190px;
}

/* ---------------------------------------------------------------------
 * Calendar: the plugin's calendar in the look of the old ICS calendar.
 * ------------------------------------------------------------------- */

.hestahub-calendar {
	--hestahub-gap: 20px;
	--hestahub-day-free: #fff;
	--hestahub-day-booked: #FFBEBE;
	--hestahub-day-arrival: linear-gradient(125deg, #fff 0%, #fff 45%, #FFBEBE 55%, #FFBEBE 100%);
	--hestahub-day-departure: linear-gradient(125deg, #FFBEBE 0%, #FFBEBE 45%, #fff 55%, #fff 100%);
	--hestahub-day-changeover: linear-gradient(125deg, #FFBEBE 0%, #FFBEBE 48%, #fff 50%, #FFBEBE 53%, #FFBEBE 100%);
	--hestahub-day-past: #fff;
	--hestahub-day-unknown: #F3F3F3;
	clear: both;
	padding: 10px 0 20px;
}

.hestahub-calendar .hestahub-months {
	grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 991px) {
	.hestahub-calendar .hestahub-months {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 599px) {
	.hestahub-calendar .hestahub-months {
		grid-template-columns: 1fr;
	}
}

.hestahub-calendar table.hestahub-month {
	background-color: #fff;
	box-shadow: 0 0 10px rgb(236, 236, 236);
	border: 1px solid rgb(227, 224, 224);
	color: #6B6B6B;
	margin: 0;
}

.hestahub-calendar .hestahub-month caption {
	background-color: #fff;
	border: 1px solid rgb(227, 224, 224);
	border-bottom: 0;
	font-size: 16px;
	font-weight: bold;
	line-height: 45px;
	color: #CC0000;
	text-align: center;
	padding: 0;
}

.hestahub-calendar .hestahub-month th {
	font-size: 11px;
	font-weight: bold;
	line-height: 26px;
	padding: 0;
	color: #000;
	text-transform: uppercase;
	border-top: 1px solid #D8D8D8;
	border-left: 1px solid #D8D8D8;
}

.hestahub-calendar .hestahub-month td {
	font-size: 14px;
	font-weight: bold;
	line-height: 36px;
	height: 36px;
	padding: 0;
	border-top: 1px solid #D8D8D8;
	border-left: 1px solid #D8D8D8;
}

.hestahub-calendar .hestahub-month th:first-child,
.hestahub-calendar .hestahub-month td:first-child {
	border-left: 0;
}

.hestahub-calendar .hestahub-day--booked,
.hestahub-calendar .hestahub-day--arrival,
.hestahub-calendar .hestahub-day--departure,
.hestahub-calendar .hestahub-day--changeover {
	color: #D20000;
}

.hestahub-calendar .hestahub-day--past,
.hestahub-calendar .hestahub-day--unknown {
	color: #CFCFCF;
}

.hestahub-calendar .hestahub-day--blank {
	background: transparent;
}

.hestahub-calendar .hestahub-stand {
	font-size: 12px;
	color: #909090;
	margin: 0 0 10px;
	text-align: right;
}

.hestahub-calendar .hestahub-calendar-nav {
	margin: 0 0 15px;
}

.hestahub-calendar .hestahub-calendar-nav a {
	display: inline-block;
	background-color: #EFEFEF;
	color: #000;
	padding: 8px 15px;
	line-height: 1.2;
	text-decoration: none;
}

.hestahub-calendar .hestahub-calendar-nav a:hover,
.hestahub-calendar .hestahub-calendar-nav a:focus {
	background-color: #CC0000;
	color: #fff;
}

.hestahub-calendar .hestahub-calendar-previous::before {
	content: "\f104";
	font-family: FontAwesome;
	padding-right: 8px;
}

.hestahub-calendar .hestahub-calendar-next::after {
	content: "\f105";
	font-family: FontAwesome;
	padding-left: 8px;
}

.hestahub-calendar .hestahub-legend {
	margin-top: 15px;
	font-size: 12px;
	color: #6B6B6B;
}

.hestahub-calendar .hestahub-legend-swatch {
	border-color: #D8D8D8;
}

/* ---------------------------------------------------------------------
 * Booking button, when HestaHub links a booking portal.
 * ------------------------------------------------------------------- */

.hestahub .kronshof-booking {
	clear: both;
	text-align: center;
	padding: 20px 0;
	margin: 0;
}

/* ---------------------------------------------------------------------
 * Overview: the price-list tables sit in the plugin's frame, not in the
 * old content column, so they don't pull out of it.
 * ------------------------------------------------------------------- */

.kronshof-fewo-listing .panel div.max-content {
	margin-left: 0;
	margin-right: 0;
	overflow-x: auto;
}

.kronshof-fewo-listing table.fewo-table small {
	font-weight: normal;
	color: #909090;
}

.kronshof-fewo-listing .isotope {
	clear: both;
	padding-bottom: 30px;
}
