/*!
Theme Name: Booklium Child
Template: booklium
Description: Child theme for Avos Loft Studio. Site-specific tweaks to Booklium and Getwid blocks live here so theme/plugin updates don't overwrite them.
Version: 1.0.0
Author: Kota
Author URI: https://kota.co.uk/
Text Domain: booklium-child
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * Getwid Recent Posts grid: the wrapper's -30px side margins don't match the 10px
 * padding on each post, so the first column is pushed outside the content area and clipped.
 */
.wp-block-getwid-recent-posts .wp-block-getwid-recent-posts__wrapper.getwid-columns {
	margin-left: -10px;
	margin-right: -10px;
}

/*
 * Small accent labels (e.g. "House Rules", "What's Included") use the darker olive on light
 * backgrounds for readable contrast (#5E6540 is about 4.9:1 on the limestone sections; the main
 * accent #7C8457 is only about 3.2:1). Labels inside dark or photo sections keep the main accent.
 * Update #5E6540 if the accent colour changes.
 */
span.wp-block-getwid-advanced-heading__content.has-color-1-color {
	color: #5E6540 !important;
}

.wp-block-getwid-section:has(> .wp-block-getwid-section__wrapper > .wp-block-getwid-section__inner-wrapper > .wp-block-getwid-section__background-holder > .wp-block-getwid-section__background[style*="#17181a"]) span.wp-block-getwid-advanced-heading__content.has-color-1-color,
.wp-block-getwid-section:has(> .wp-block-getwid-section__wrapper > .wp-block-getwid-section__inner-wrapper > .wp-block-getwid-section__background-holder > .wp-block-getwid-section__background > .wp-block-getwid-section__background-image-wrapper) span.wp-block-getwid-advanced-heading__content.has-color-1-color {
	color: var(--wp--preset--color--color-1) !important;
}

/*
 * Getwid Counter cards in columns: stretch each white card to the column height so cards with
 * a two-line label don't end up taller than their neighbours.
 */
.wp-block-column > .wp-block-getwid-counter,
.wp-block-column > .wp-block-getwid-counter > .wp-block-getwid-counter__wrapper {
	height: 100%;
	box-sizing: border-box;
}

/*
 * Offer cards (Offers page): stretch the card's inner wrappers to the card height so the
 * "Book Now" buttons line up at the bottom of every card in a row.
 */
.avos-offer-card > .wp-block-getwid-section__wrapper {
	align-items: stretch;
}

.avos-offer-card .wp-block-getwid-section__inner-wrapper,
.avos-offer-card .wp-block-getwid-section__content,
.avos-offer-card .wp-block-getwid-section__inner-content,
.avos-offer-card .wp-block-getwid-icon-box,
.avos-offer-card .wp-block-getwid-icon-box__content {
	display: flex;
	flex-direction: column;
	flex-grow: 1;
}

.avos-offer-card .wp-block-getwid-icon-box__icon-container {
	align-self: center;
}

.avos-offer-card .wp-block-getwid-icon-box__content > .wp-block-buttons {
	margin-top: auto;
	padding-top: 10px;
}

/*
 * Hotel Booking search form: the Search button is a booking action, so it uses the accent
 * colour like the other booking buttons (the theme default is near-black).
 */
.mphb_sc_search-form input[type="submit"].button {
	background-color: var(--wp--preset--color--color-1);
	color: #fff;
}

.mphb_sc_search-form input[type="submit"].button:hover,
.mphb_sc_search-form input[type="submit"].button:focus {
	background-color: #5E6540;
	color: #fff;
}

/*
 * Small accent labels above section headings ("Around Sinarades", "Book Direct", ...):
 * an eyebrow style, small uppercase with tracking, so they read as labels rather than body text.
 */
span.wp-block-getwid-advanced-heading__content.has-color-1-color {
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

/* FAQ toggles: the theme sets the question titles at 11px uppercase, too small to scan. */
.wp-block-getwid-toggle .wp-block-getwid-toggle__header,
.wp-block-getwid-toggle .wp-block-getwid-toggle__header a {
	font-size: 19px;
	font-weight: 500;
	letter-spacing: 0;
	line-height: 1.5;
	text-transform: none;
}

/* Offer cards: the discount is the headline of each card, and the code looks like a coupon. */
.avos-offer-card span.wp-block-getwid-advanced-heading__content.has-color-1-color {
	font-family: "Caudex", serif;
	font-size: 30px;
	font-weight: 400;
	letter-spacing: 0;
	text-transform: none;
}

.avos-offer-card p strong {
	display: inline-block;
	margin-left: 4px;
	padding: 4px 12px;
	border: 1px dashed var(--wp--preset--color--color-1);
	letter-spacing: 0.1em;
}

/* Home "Book Direct" offers strip: thin dividers between the offers instead of loose floating text. */
.avos-offer-strip {
	padding: 30px 0;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.avos-offer-strip > .wp-block-column + .wp-block-column {
	border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.avos-offer-strip .wp-block-getwid-advanced-heading {
	margin-bottom: 0 !important;
}

.avos-offer-strip p {
	margin-top: 6px;
	margin-bottom: 0;
}

@media (max-width: 781px) {
	.avos-offer-strip > .wp-block-column + .wp-block-column {
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.15);
		padding-top: 24px;
	}
}

/*
 * Home stats band: numbers on the dark band without the theme's white counter cards, the unit
 * (★, m², min, km) beside each number and a small label underneath, separated by thin dividers.
 * Selectors repeat the theme's own chain (.wp-block-getwid-counter .__wrapper) to outrank it.
 */
.avos-stats .wp-block-column > .wp-block-getwid-counter,
.avos-stats .wp-block-getwid-counter .wp-block-getwid-counter__wrapper {
	height: auto;
}

.avos-stats .wp-block-getwid-counter .wp-block-getwid-counter__wrapper {
	display: flex;
	justify-content: center;
	align-items: baseline;
	padding: 10px 20px 0;
	background: none;
	box-shadow: none;
}

.avos-stats .wp-block-getwid-counter .wp-block-getwid-counter__wrapper .wp-block-getwid-counter__number {
	font-family: "Caudex", serif;
	font-size: 56px;
	font-weight: 400;
	line-height: 1.1;
}

.avos-stats .wp-block-getwid-counter .wp-block-getwid-counter__wrapper .wp-block-getwid-counter__suffix {
	margin: 0 0 0 6px;
	padding: 0;
	color: var(--wp--preset--color--color-1);
	font-family: "Caudex", serif;
	font-size: 30px;
	line-height: 1;
}

.avos-stats .wp-block-column > p {
	margin-top: 10px;
	color: rgba(255, 255, 255, 0.75);
	font-size: 12px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
}

.avos-stats > .wp-block-column + .wp-block-column {
	border-left: 1px solid rgba(255, 255, 255, 0.15);
}

@media (max-width: 781px) {
	.avos-stats > .wp-block-column + .wp-block-column {
		border-left: 0;
		border-top: 1px solid rgba(255, 255, 255, 0.15);
		padding-top: 20px;
	}
}

/* The offers strip sits on a photo: white discounts read better there than the olive accent. */
.avos-offer-strip h3.has-color-1-color {
	color: #fff !important;
}

/*
 * Sidebar logo mark: space between it and the vertical site title. The theme rotates the logo
 * inside its 40x52 box, so it spills about 6px towards the title; the margin allows for that.
 */
.site-branding .custom-logo-link {
	margin-right: 24px;
}

/*
 * Social menu: icons for the Airbnb and Booking.com listings. The theme only maps common networks.
 * Airbnb uses the Font Awesome 5 brands glyph; Booking.com has none, so it gets a "B." lettermark.
 */
.social-menu a[href*="airbnb."]:before {
	content: "\f834";
	font-family: "Font Awesome 5 Brands";
	font-weight: 400;
}

.social-menu a[href*="booking.com"]:before {
	content: "B.";
	font-family: "Montserrat", sans-serif;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

/*
 * Home "Around Sinarades": on desktop the viewpoint photo (attachment 4409) fills exactly the
 * height of the text column beside it, cropped to fit. Stacked on mobile it keeps its own ratio.
 */
@media (min-width: 782px) {
	.wp-block-columns:has(> .wp-block-column img.wp-image-4409) {
		align-items: stretch;
	}

	.wp-block-columns > .wp-block-column:has(> .wp-block-image img.wp-image-4409) {
		position: relative;
		align-self: stretch;
	}

	.wp-block-column:has(> .wp-block-image img.wp-image-4409) > .wp-block-image {
		position: absolute;
		inset: 0;
		margin: 0;
	}

	.wp-block-column:has(> .wp-block-image img.wp-image-4409) img.wp-image-4409 {
		width: 100%;
		height: 100% !important;
		aspect-ratio: auto !important;
		object-fit: cover;
	}
}

/* Hotel Booking "Book" buttons (accommodation cards, search results) use the accent like the other booking actions. */
.mphb-book-button.button {
	background-color: var(--wp--preset--color--color-1);
	border-color: var(--wp--preset--color--color-1);
	color: #fff;
}

.mphb-book-button.button:hover,
.mphb-book-button.button:focus {
	background-color: #5E6540;
	border-color: #5E6540;
	color: #fff;
}
