/*!
 * INFOBGNET Booking — Hostify bridge
 * -----------------------------------------------------------------------------
 * Pulls Hostify's rendered output onto the theme's design tokens.
 *
 * Selectors here are the plugin's real class names, read from a live install
 * (hostify-booking/public/res/{bs,main,theme}.css), not guessed. What matters
 * about that stylesheet stack:
 *
 *   bs.css     Bootstrap 4.2.1, every rule scoped under .hfy-wrap. It does not
 *              touch html, body, .container or .row, so it cannot collide with
 *              the theme's Bootstrap 5 — but inside the widget, Bootstrap 4 is
 *              what .btn and .form-control mean.
 *   theme.css  The visual layer, keyed on .hfy-theme1 (the plugin's theme
 *              setting). This is what actually lays the search form out.
 *   main.css   Structural rules, about half of them scoped under .hfy-wrap.
 *
 * Consequence worth knowing: nowrap="1" removes the wrapper carrying BOTH
 * .hfy-wrap and .hfy-theme1, which strips the widget of its layout. Leave the
 * wrapper in place — it sets no padding, background or margin of its own.
 *
 * Specificity note: .ibn-hostify-slot is the theme's element and wraps the
 * plugin's, so a rule like `.ibn-hostify-slot input[type="date"]` (0,2,1) beats
 * the plugin's `.hfy-wrap .form-control` (0,2,0) without needing !important.
 *
 * Anything this cannot reach can also be styled from the page itself, in a
 * <style> block beside the shortcode — the pattern apartmentsbytheriver.bg
 * uses. Prefer this file for anything that repeats across pages, so the rule
 * lives with the theme and goes through the design tokens instead of being
 * restated with !important on every page.
 */

/* --- Typography inheritance ----------------------------------------------
 * The plugin sets its own font stack; pull it back onto the theme's so the
 * widget does not read as a foreign object on the page.
 * ---------------------------------------------------------------------- */

.ibn-hostify-slot,
.ibn-hostify-slot .hfy-wrap,
.ibn-hostify-slot .hfy-theme1 {
	font-family: var(--ibn-body-font);
	color: var(--ibn-text);
}

.ibn-hostify-slot h1,
.ibn-hostify-slot h2,
.ibn-hostify-slot h3,
.ibn-hostify-slot h4,
.ibn-hostify-slot h5,
.ibn-hostify-slot h6 {
	font-family: var(--ibn-heading-font);
	color: var(--ibn-heading);
}

.ibn-hostify-slot a:hover {
	color: var(--ibn-primary);
}

/* --- Search form ---------------------------------------------------------
 * Hostify lays this out with its own column classes (._col, .col-dates,
 * .col-guests, .col-bedrooms, .col-action) — not Bootstrap's. Leave the
 * geometry alone and restyle only the controls inside it.
 * ---------------------------------------------------------------------- */

.ibn-hostify-slot .hfy-search-form-row .form-control,
.ibn-hostify-slot .hfy-search-form-row input,
.ibn-hostify-slot .hfy-search-form-row select {
	background-color: var(--ibn-white);
	border: 1px solid var(--ibn-border);
	border-radius: 5px;
	color: var(--ibn-text);
	font-family: var(--ibn-body-font);
	font-size: 16px;
}

.ibn-hostify-slot .hfy-search-form-row .form-control:focus,
.ibn-hostify-slot .hfy-search-form-row input:focus,
.ibn-hostify-slot .hfy-search-form-row select:focus {
	border-color: var(--ibn-primary);
	box-shadow: none;
	outline: 0;
}

.ibn-hostify-slot .hfy-search-form-row label,
.ibn-hostify-slot .hfy-listing-booking-form label {
	color: var(--ibn-heading);
	font-weight: 500;
}

/* --- Buttons -------------------------------------------------------------
 * .btn-primary is Bootstrap 4's, coming from the plugin's scoped bundle.
 * Repoint it at the brand colour; leave sizing to the plugin so the button
 * keeps lining up with its own form row.
 * ---------------------------------------------------------------------- */

.ibn-hostify-slot .btn-primary,
.ibn-hostify-slot .hfy-search-form-row .btn,
.ibn-hostify-slot .hfy-listing-booking-form .btn-primary {
	background-color: var(--ibn-primary);
	border-color: var(--ibn-primary);
	color: var(--ibn-white);
	font-family: var(--ibn-body-font);
	font-weight: 600;
	transition: all .3s ease-out;
}

.ibn-hostify-slot .btn-primary:hover,
.ibn-hostify-slot .btn-primary:focus,
.ibn-hostify-slot .hfy-search-form-row .btn:hover,
.ibn-hostify-slot .hfy-listing-booking-form .btn-primary:hover {
	background-color: var(--ibn-heading);
	border-color: var(--ibn-heading);
	color: var(--ibn-white);
}

.ibn-hostify-slot .btn-default {
	border-color: var(--ibn-border);
	color: var(--ibn-heading);
}

/* --- Listing grid --------------------------------------------------------
 * Cards arrive over AJAX (admin-ajax.php via main3.js), so these rules have to
 * hold for markup that appears after load. CSS handles that; anything needing
 * JS should hook window.IBN.refresh().
 * ---------------------------------------------------------------------- */

.ibn-hostify-slot .hfy-widget-wrap-listings .listing-item,
.ibn-hostify-slot .listings-selected-item {
	border-radius: 5px;
	overflow: hidden;
}

.ibn-hostify-slot .listing-item a:hover {
	color: var(--ibn-primary);
}

/* Empty and loading states — the plugin toggles these inline. */

.ibn-hostify-slot .hfy-wwl-none,
.ibn-hostify-slot .hfy-wwl-updating {
	color: var(--ibn-text);
	font-family: var(--ibn-body-font);
	padding: 30px 0;
	text-align: center;
}

/* --- Single listing parts ------------------------------------------------
 * Class names below are confirmed in production on apartmentsbytheriver.bg,
 * where a single-listing page is composed from the part shortcodes:
 *   [hfy_listing_gallery view="ab"] [hfy_listing_title] [hfy_listing_facilities]
 *   [hfy_listing_info_summary] [hfy_listing_amenities] [hfy_listing_info_space]
 *   [hfy_listing_reviews_comments] [hfy_listing_info_address]
 *   [hfy_listing_booking_form detailed="true" checked="true"]
 * ---------------------------------------------------------------------- */

.ibn-hostify-slot .hfy-listing-title {
	font-family: var(--ibn-heading-font);
	color: var(--ibn-heading);
}

.ibn-hostify-slot .hfy-listing-info-summary,
.ibn-hostify-slot .hfy-listing-info-space,
.ibn-hostify-slot .hfy-listing-info-address {
	font-family: var(--ibn-body-font);
	color: var(--ibn-text);
}

/* .hfy-am is one amenity row. The plugin gives it a border and background
   that read as a chip; the design wants a plain list. */
.ibn-hostify-slot .hfy-am {
	background: none;
	border: 0;
	color: var(--ibn-text);
}

.ibn-hostify-slot .hfy-listing-hotel-facilities > div {
	color: var(--ibn-text);
}

/* --- Booking form --------------------------------------------------------
 * .input-theme1, .booking-price-block, .direct-inquiry-modal-open, .reset-date
 * and .price-title are the plugin's own, inside .hfy-listing-booking-form.
 * ---------------------------------------------------------------------- */

.ibn-hostify-slot .hfy-listing-booking-form {
	background-color: var(--ibn-white);
	border: 1px solid var(--ibn-border);
	border-radius: 5px;
}

.ibn-hostify-slot .input-theme1 {
	background-color: var(--ibn-white);
	border: 1px solid var(--ibn-border);
	border-radius: 5px;
	color: var(--ibn-text);
	font-family: var(--ibn-body-font);
}

.ibn-hostify-slot .input-theme1:focus {
	background-color: var(--ibn-white);
	border-color: var(--ibn-primary);
}

.ibn-hostify-slot .booking-price-block,
.ibn-hostify-slot .price-title {
	color: var(--ibn-heading);
	font-family: var(--ibn-body-font);
}

/* The enquiry trigger is a div, not a button — it needs the button treatment
   spelled out rather than inherited. */
.ibn-hostify-slot .direct-inquiry-modal-open {
	background-color: var(--ibn-primary);
	border-radius: 5px;
	color: var(--ibn-white);
	cursor: pointer;
	font-family: var(--ibn-body-font);
	font-weight: 600;
	text-align: center;
	transition: all .3s ease-out;
}

.ibn-hostify-slot .direct-inquiry-modal-open:hover {
	background-color: var(--ibn-heading);
	color: var(--ibn-white);
}

.ibn-hostify-slot .reset-date {
	color: var(--ibn-primary);
}

/* --- Reviews -------------------------------------------------------------- */

.ibn-hostify-slot .hfy-reviews-comments {
	font-family: var(--ibn-body-font);
}

.ibn-hostify-slot .reviews-comments-item {
	border-bottom: 1px solid var(--ibn-border);
}

.ibn-hostify-slot .comment-author-fallback {
	background-color: var(--ibn-primary);
	color: var(--ibn-white);
}

.ibn-hostify-slot .comment-content {
	color: var(--ibn-text);
}

.ibn-hostify-slot .review-rating-number,
.ibn-hostify-slot .hfy-listing-reviews-stars,
.ibn-hostify-slot .hfy-reviews-summary-modern {
	color: var(--ibn-primary);
}

.ibn-hostify-slot .hfy-units-btn-plus,
.ibn-hostify-slot .hfy-units-btn-minus {
	border-color: var(--ibn-border);
	color: var(--ibn-heading);
}

/* --- Breaking a gallery out of its container ------------------------------
 * Add ibn-full-bleed to any wrapper that should span the viewport while its
 * parent stays a container. Proven pattern from the previous project.
 * ---------------------------------------------------------------------- */

.ibn-full-bleed {
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* --- Images and wide content --------------------------------------------- */

.ibn-hostify-slot img {
	max-width: 100%;
	height: auto;
}

.ibn-hostify-slot table {
	display: block;
	overflow-x: auto;
	max-width: 100%;
}

/* The map must never collapse to zero height inside a flex or grid parent. */

.ibn-hostify-slot .hfy-map-wrapper,
.ibn-hostify-slot .hfy-listing-map {
	min-height: 320px;
}

/* --- Editor-only hints ---------------------------------------------------- */

.ibn-editor-hint {
	background-color: #fff8e5;
	border: 1px dashed #d6b656;
	border-radius: 5px;
	color: #7a5c00;
	font-size: 14px;
	line-height: 1.5;
	margin-top: 20px;
	padding: 12px 16px;
}

.ibn-editor-hint a {
	color: #7a5c00;
	text-decoration: underline;
}

/* The placeholder form is inert; make that visible rather than surprising. */

.ibn-booking-placeholder input:disabled,
.ibn-booking-placeholder select:disabled {
	background-color: var(--ibn-gray);
	cursor: not-allowed;
}
