/*
Theme Name: Romana Gardens
Description: Single-page site for the Romana Gardens sustainable community in Oyarifa, Accra. Converted from the original static single-page site during the post-compromise rebuild. All copy and imagery is editable from the front page editor; forms are handled by FormZen rather than a hand-written mail script.
Version: 1.0.0
Author: Signum Development
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 8.0
Text Domain: romanagardens
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/*
 * The site's visual design lives in assets/css/style.css, loaded ahead of this
 * file. Keep this sheet for corrections that belong to the WordPress build
 * rather than the original design, so the two never have to be untangled.
 */

/*
 * FormZen base tweaks.
 *
 * The plugin's own white card is the right look inside the brochure and
 * newsletter modals, which are white. Only the accent is changed here; the
 * footer form is restyled separately below.
 */
.wpfb-form-wrap {
	--wpfb-accent: #9e7c4e;
	max-width: 100%;
}

.wpfb-form .wpfb-submit,
.wpfb-form button[type="submit"] {
	background: #272727;
	border-color: #272727;
}

/* The honeypot must stay out of view but reachable to a bot. */
.wpfb-form .wpfb-hp {
	position: absolute !important;
	left: -9999px !important;
}

/* ------------------------------------------------------------------ *
 *  Footer contact form
 *
 *  The original hand-written form sat directly on the dark #contentBlock
 *  panel: no card, transparent fields, a single hairline border, square
 *  corners, and placeholders instead of labels. These rules reproduce that
 *  on FormZen's markup. Values were measured from the original page rather
 *  than eyeballed.
 *
 *  One deliberate difference: the original set the typed text to #555 on a
 *  #1a1a1a panel, which is close to unreadable. Text here is near-white.
 *  Placeholders keep the original #999.
 * ------------------------------------------------------------------ */

#contentBlock .wpfb-form-wrap {
	max-width: none;
}

/* Drop the card entirely so the form sits on the panel. */
#contentBlock .wpfb-card {
	background: transparent;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	padding: 0;
}

/*
 * Labels are visually hidden rather than removed: the original had no labels
 * at all, but screen readers still need them. The captcha question is the one
 * label that must stay visible — it is the question being asked.
 */
#contentBlock .wpfb-field > label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset( 50% );
	white-space: nowrap;
}

#contentBlock .wpfb-captcha-field > label {
	position: static;
	width: auto;
	height: auto;
	margin: 0 0 6px;
	overflow: visible;
	clip-path: none;
	white-space: normal;
	color: #999;
	font-size: 13px;
	font-weight: 400;
}

#contentBlock .wpfb-field input[type="text"],
#contentBlock .wpfb-field input[type="email"],
#contentBlock .wpfb-field input[type="tel"],
#contentBlock .wpfb-field input[type="url"],
#contentBlock .wpfb-field input[type="number"],
#contentBlock .wpfb-field input[type="date"],
#contentBlock .wpfb-field select,
#contentBlock .wpfb-field textarea {
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	background: transparent;
	border: 1px solid #555;
	border-radius: 0;
	box-shadow: none;
	padding: 13px 12px 13px 15px;
	font-size: 13px;
	line-height: 1.43;
	color: #f2f2f2;
}

#contentBlock .wpfb-field textarea {
	min-height: 214px;
	resize: vertical;
}

#contentBlock .wpfb-field input::placeholder,
#contentBlock .wpfb-field textarea::placeholder {
	color: #999;
	opacity: 1;
}

#contentBlock .wpfb-field input:hover,
#contentBlock .wpfb-field select:hover,
#contentBlock .wpfb-field textarea:hover {
	border-color: #777;
}

#contentBlock .wpfb-field input:focus,
#contentBlock .wpfb-field select:focus,
#contentBlock .wpfb-field textarea:focus {
	border-color: #b18f5f;
	box-shadow: none;
	outline: 2px solid transparent; /* a visible ring is added below */
	outline-offset: 0;
}

/* Keyboard focus needs to be obvious; hover alone is not enough. */
#contentBlock .wpfb-field input:focus-visible,
#contentBlock .wpfb-field select:focus-visible,
#contentBlock .wpfb-field textarea:focus-visible {
	outline: 2px solid #b18f5f;
	outline-offset: 1px;
}

/*
 * Name and telephone sat side by side as a single unit, their borders
 * meeting in one hairline. Collapsing the shared edge reproduces that.
 */
#contentBlock .wpfb-form .wpfb-row {
	gap: 0;
}

#contentBlock .wpfb-form .wpfb-field {
	margin: 0 0 15px;
}

/*
 * FormZen puts every field in one wrapping flex row, and the full-width fields
 * declare a 100% basis. The halves therefore need an explicit 50% basis of
 * their own, or they get squeezed onto the same line at zero width.
 * The second one is a pixel wider and pulled back a pixel so the two borders
 * meet as a single hairline, as they did in the original.
 */
#contentBlock .wpfb-form .wpfb-w-half {
	flex: 0 0 50%;
	min-width: 0;
}

#contentBlock .wpfb-form .wpfb-w-half + .wpfb-w-half {
	flex-basis: calc( 50% + 1px );
	margin-left: -1px;
}

@media ( max-width: 767px ) {
	#contentBlock .wpfb-form .wpfb-w-half,
	#contentBlock .wpfb-form .wpfb-w-half + .wpfb-w-half {
		flex-basis: 100%;
	}

	#contentBlock .wpfb-form .wpfb-w-half + .wpfb-w-half {
		margin-left: 0;
		margin-top: -1px;
	}
}

#contentBlock .wpfb-field-error:not(:empty) {
	display: block;
	margin: 4px 0 0;
	color: #e0796b;
	font-size: 12px;
}

/* Submit row: the gold hairline to the left of the button is part of the design. */
#contentBlock .wpfb-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 0;
	margin-top: 15px;
}

/* The hairline sits 117px in from the left; the button stays hard right. */
#contentBlock .wpfb-actions::before {
	content: "";
	flex: 0 0 120px;
	height: 0;
	border-top: 1px solid #9e7c4e;
	margin-left: 117px;
	margin-right: auto;
}

@media ( max-width: 767px ) {
	#contentBlock .wpfb-actions::before {
		display: none;
	}
}

/* Gardens' button is the dark #272727 the original used, not the Heights gold.
   The site's own CSS declares it !important, so this matches that weight. */
#contentBlock .wpfb-submit {
	background: #272727 !important;
	border: 0;
	border-radius: 0;
	padding: 14px 35px;
	font-size: 14px;
	line-height: 1;
	color: #fff;
	white-space: nowrap;
	cursor: pointer;
}

#contentBlock .wpfb-submit:hover,
#contentBlock .wpfb-submit:focus {
	background: #3d3d3d !important;
}

/* Success and error notices have to read on the dark panel. */
#contentBlock .wpfb-messages:not(:empty),
#contentBlock .wpfb-result-panel:not([hidden]) {
	background: rgba( 255, 255, 255, 0.06 );
	border: 1px solid #555;
	border-radius: 0;
	padding: 14px 16px;
	color: #f2f2f2;
	font-size: 14px;
}

/* Admin-only notice when a form key does not resolve. */
.signum-form-missing {
	padding: 12px 16px;
	border-left: 4px solid #c9a227;
	background: rgba( 201, 162, 39, 0.08 );
	font-size: 14px;
}

/* WordPress core classes the original static markup never needed. */
.screen-reader-text {
	border: 0;
	clip-path: inset( 50% );
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}

.skip-link:focus {
	background: #fff;
	color: #111;
	display: block;
	left: 6px;
	padding: 12px 20px;
	top: 6px;
	z-index: 100000;
}
