/**
 * Enscape by AIwA
 *
 * Deliberately small. The compiled CSS for the deleted paid plugins survived
 * intact in wp-content/uploads/bb-plugin/cache/, including the STRUCTURAL rules
 * for .pp-advanced-menu, .pp-hamburger, .pp-menu-overlay, .pp-social-icons,
 * .pp-button, .fl-separator, .fl-mosaicflow, .pp-photo, .pp-post-tile-*,
 * .pp-content-post, .pp-accordion-* , .fl-testimonials-* and .fl-icon.
 * Restyling those here would only fight the cache.
 *
 * This file therefore covers ONLY what the cache does not:
 *   - the replacement contact form
 *   - the accordion's open/closed state
 *   - pp-gallery, pp-logos-grid, the .fl-icon-group wrapper, and the four
 *     Themer post modules, none of which left any trace in the cache
 *   - grid column counts, which used to be generated per instance
 */

/* ---------------------------------------------------------------------------
 * Contact form
 * The wrapper and field classes mirror Gravity Forms so that the surviving
 * per-node rules in 19-layout.css keep styling the form.
 * ------------------------------------------------------------------------ */

/* Honeypot. Must be reachable by bots but never by people, so it is moved off
   screen rather than display:none, which some bots skip. */
.enscape-form-honeypot {
	position: absolute !important;
	left: -9999px !important;
	top: auto !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.enscape-form-message {
	margin-bottom: 20px;
	padding: 12px 16px;
	border-left: 4px solid transparent;
}

.enscape-form-message[hidden] {
	display: none;
}

.enscape-form-message.is-success {
	border-left-color: #066c4d;
	background-color: rgba(6, 108, 77, 0.08);
}

.enscape-form-message.is-error {
	border-left-color: #a3271f;
	background-color: rgba(163, 39, 31, 0.08);
}

.enscape-contact-form .enscape-field {
	margin-bottom: 20px;
}

.enscape-contact-form .enscape-challenge-label {
	display: block;
	margin-bottom: 6px;
}

.enscape-contact-form.is-submitting .gform_button {
	opacity: 0.6;
	pointer-events: none;
}

/* ---------------------------------------------------------------------------
 * Accordion
 * The script only toggles the active class; these rules decide what it means.
 * ------------------------------------------------------------------------ */

.pp-accordion-item > .pp-accordion-content {
	display: none;
}

.pp-accordion-item.pp-accordion-item-active > .pp-accordion-content {
	display: block;
}

/* ---------------------------------------------------------------------------
 * Icon group
 * .fl-icon and .fl-icon-wrap are already styled by the cache; only the
 * group wrapper needed anything.
 * ------------------------------------------------------------------------ */

.fl-icon-group {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}

/* ---------------------------------------------------------------------------
 * Photo gallery (pp-gallery)
 * The original justified layout came from a JavaScript library that is gone,
 * so this is a CSS grid.
 * ------------------------------------------------------------------------ */

.pp-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 10px;
}

.pp-gallery .pp-gallery-item {
	margin: 0;
}

.pp-gallery .pp-gallery-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.pp-gallery .pp-gallery-caption {
	margin-top: 6px;
	font-size: 0.85em;
}

/* ---------------------------------------------------------------------------
 * Logos grid
 * Saved as a carousel; the carousel script is gone, so it lays out as a grid.
 * ------------------------------------------------------------------------ */

.pp-logos-grid {
	display: grid;
	align-items: center;
	gap: 20px;
	grid-template-columns: repeat(2, 1fr);
}

.pp-logos-grid .pp-logo-img {
	display: block;
	width: 100%;
	height: auto;
}

.pp-logos-grid .pp-logo-title {
	margin-top: 8px;
	text-align: center;
}

/* ---------------------------------------------------------------------------
 * Grid column counts
 * These used to be generated per instance by the paid plugins.
 * ------------------------------------------------------------------------ */

/*
 * NOTE: the content grid is deliberately NOT laid out here.
 *
 * The compiled per-node CSS already sizes it, using floats and percentage
 * widths, for example:
 *   .fl-node-xxxx .pp-content-post { float: left; width: calc((100% - 9.1%) / 4) }
 * with .pp-grid-space gutters at width: 3%, plus media-query overrides for two
 * columns and one column.
 *
 * An earlier version of this file made the container display:grid. That broke
 * it: the cached percentage width then resolved against a 325px grid track
 * instead of the container, computing to 325 x 0.909 / 4 = 73.9px and
 * collapsing every card. The cache already handles the columns; adding a second
 * layout system on top only divides them twice.
 *
 * All that is needed is to contain the floats.
 */
.pp-content-post-grid::after {
	content: "";
	display: table;
	clear: both;
}

@media (min-width: 768px) {
	.pp-logos-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
	.pp-logos-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
	.pp-logos-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
	.pp-logos-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }
}

.pp-content-grid .pp-post-featured-img {
	display: block;
	width: 100%;
	height: auto;
}

.pp-content-grid .pp-content-grid-post-text {
	padding: 20px 0;
}

/* ---------------------------------------------------------------------------
 * Themer post modules
 * None of these left any trace in the compiled CSS.
 * ------------------------------------------------------------------------ */

.fl-post-info-left   { text-align: left; }
.fl-post-info-center { text-align: center; }
.fl-post-info-right  { text-align: right; }

.fl-post-info .fl-post-info-sep {
	opacity: 0.6;
}

.fl-author-bio {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	padding: 20px;
	background-color: #f7f7f7;
}

.fl-author-bio .fl-author-bio-avatar img {
	display: block;
	border-radius: 50%;
}

.fl-author-bio .fl-author-bio-name {
	margin: 0 0 8px;
}

.fl-comments {
	margin-top: 30px;
}

.fl-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin-top: 30px;
}

.fl-post-nav .fl-post-nav-next {
	text-align: right;
}

.fl-post-nav .fl-post-nav-label {
	display: block;
	font-size: 0.8em;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.7;
}

.fl-post-nav .fl-post-nav-title {
	display: block;
}
