/* ==========================================================================
   Hebrides People 2026 - plugin and archive integrations
   Ported from the old Customizer Additional CSS (see the CSS audit) and
   rewritten to the new tokens. Every rule here styles markup that a plugin
   or the Cake archive prints; nothing here changes behaviour.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Cake archive (heb-people / hebridespeople-app): [heb-people-search], [hpapp-*]
   -------------------------------------------------------------------------- */

.hpapp {
	font-size: 1rem;
}

.hpapp form label {
	display: inline-block;
	width: 180px;
	padding: 0.25rem 0;
	color: var(--hp-teal);
}

.hpapp form div.input {
	margin-bottom: 0.625rem;
}

.hpapp form div.input input,
.hpapp form div.input select {
	min-height: 44px;
	padding: 0.5rem 0.75rem;
	border: 1.5px solid #9aa391;
	border-radius: var(--hp-radius);
	background: #fff;
}

select#birth_parish,
select#parish,
select#destination {
	min-width: 171px;
}

.hpapp.record.generate_search_form {
	margin-top: 0.75rem;
}

h3.record-search-title,
h3.emigree-search-title {
	margin-top: 0;
	margin-bottom: 0.375rem;
}

/* Results tables */
div.hpapp table {
	border-collapse: collapse;
	width: 100%;
}

div.hpapp th {
	text-align: left;
	padding: 0.625rem 0.75rem;
	background: var(--hp-teal);
	color: #fff;
	font-weight: 600;
	border: 0;
}

div.hpapp td {
	padding: 0.5rem 0.75rem;
	border-bottom: 1px solid var(--hp-line);
}

div.hpapp tr.altrow,
div.hpapp tr.altrow td {
	background-color: var(--hp-paper);
}

/* Record detail: label / value pairs */
div.hpapp dl {
	margin: 0 0 1.5rem;
	border-top: 1px solid var(--hp-line);
}

div.hpapp dt {
	font-weight: 600;
	color: var(--hp-teal);
	display: block;
	float: left;
	clear: both;
	padding: 0.5rem;
	width: 30%;
	box-sizing: border-box;
	border-bottom: 1px solid var(--hp-line);
	margin: 0;
}

div.hpapp dd {
	display: block;
	float: left;
	padding: 0.5rem;
	width: 70%;
	box-sizing: border-box;
	border-bottom: 1px solid var(--hp-line);
	margin: 0;
}

div.hpapp dt.altrow,
div.hpapp dd.altrow {
	background-color: var(--hp-paper);
}

/* Was a global dl:after clearfix; now scoped to the archive only */
.hpapp dl::after {
	clear: both;
	content: " ";
	display: block;
	height: 0;
	visibility: hidden;
}

@media (max-width: 600px) {
	div.hpapp dt,
	div.hpapp dd {
		float: none;
		width: 100%;
	}

	div.hpapp dt {
		border-bottom: 0;
		padding-bottom: 0;
	}

	.hpapp form label {
		width: 100%;
	}
}

/* Help links: small "?" with a pop-over */
.helplink {
	display: inline-block;
	margin-left: 4px;
	position: relative;
}

div.helplink div.helplink_content {
	display: none;
	position: absolute;
	top: -50%;
	left: 30%;
	background-color: var(--hp-straw);
	color: var(--hp-ink);
	padding: 0.625rem 0.75rem;
	min-width: 300px;
	border-radius: var(--hp-radius);
	box-shadow: 0 8px 20px rgba(17, 70, 74, 0.18);
	z-index: 100;
}

.hpapp a.hide,
.helplink a.hide {
	display: none;
}

/* Search form buttons printed by the archive */
.hpapp button.submit,
button.submit.wp-element-button.wp-block-button__link {
	border-radius: var(--hp-radius);
}

button.reset.wp-element-button.wp-block-button__link {
	display: none;
}

/* --------------------------------------------------------------------------
   WP Data Access tables (St Kilda, records, emigrees) - built by JavaScript
   -------------------------------------------------------------------------- */

#records_view1_wrapper,
#st_kilda_records_view2_wrapper,
#emigrees_view3_wrapper {
	max-width: 640px;
}

a#records_view1_previous,
a#st_kilda_records_view2_previous,
a#emigrees_view3_previous {
	padding-left: 0;
}

#records_view1_paginate,
#st_kilda_records_view2_paginate,
#emigrees_view3_paginate {
	float: left;
}

.dataTables_wrapper table.dataTable thead th {
	background: var(--hp-teal);
	color: #fff;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
	background: var(--hp-teal) !important;
	color: #fff !important;
	border-color: var(--hp-teal) !important;
	border-radius: var(--hp-radius);
}

/* --------------------------------------------------------------------------
   Toggles block (mamaduka/toggles) - used on Search the Database and St Kilda
   -------------------------------------------------------------------------- */

.wp-block-toggles details {
	border: 1px solid var(--hp-sage);
	border-radius: var(--hp-radius);
	background: #fff;
	margin-bottom: 0.75rem;
}

.wp-block-toggles summary {
	padding: 0.875rem 1.125rem;
	font-weight: 600;
	color: var(--hp-teal);
	cursor: pointer;
}

.wp-block-toggles details[open] > summary {
	border-bottom: 1px solid var(--hp-sage);
	background: var(--hp-paper);
}

.wp-block-toggles__content {
	padding: 1rem 1.125rem;
}

/* --------------------------------------------------------------------------
   Profile Builder: login, register, account
   -------------------------------------------------------------------------- */

input#wppb-submit,
input#register,
input#edit_profile,
.wppb-user-forms input[type="submit"] {
	min-height: 48px;
	padding: 0.75rem 1.375rem;
	background-color: var(--hp-teal);
	color: #fff;
	border: 0;
	border-radius: var(--hp-radius);
	font-family: var(--wp--preset--font-family--signika);
	font-size: 1.0625rem;
	font-weight: 600;
	cursor: pointer;
}

input#wppb-submit:hover,
input#register:hover,
input#edit_profile:hover,
.wppb-user-forms input[type="submit"]:hover {
	background-color: var(--hp-teal-deep);
}

p.login-message,
.wppb-success,
.wppb-error,
.wppb-warning {
	font-size: 1.0625rem;
	background: var(--hp-straw);
	color: var(--hp-teal);
	border-left: 4px solid var(--hp-orange);
	border-radius: 0;
	padding: 0.75rem 1rem;
}

.wppb-user-forms h4 {
	margin-top: 0.625rem;
	margin-bottom: 0.625rem;
}

.wppb-user-forms ul {
	list-style: none;
	padding: 0;
}

.wppb-user-forms li {
	margin-bottom: 0.875rem;
}

/* --------------------------------------------------------------------------
   Ivory Search (shop search form 7356, site search form 11021)
   -------------------------------------------------------------------------- */

.is-form-style {
	display: flex !important;
	border: 2px solid var(--hp-teal);
	border-radius: var(--hp-radius);
	overflow: hidden;
	background: #fff;
	max-width: 720px;
}

.is-form-style input.is-search-input {
	flex: 1;
	border: 0 !important;
	border-radius: 0 !important;
	height: 52px !important;
	min-height: 52px;
	width: auto !important;
	padding: 0 1rem !important;
	background: #fff !important;
	font-size: 1rem !important;
}

.is-form-style input.is-search-submit,
.is-form-style .is-search-icon,
.is-form-style button.is-search-submit {
	position: static !important;
	top: auto !important;
	border: 0 !important;
	background: var(--hp-teal) !important;
	color: #fff !important;
	border-radius: 0 !important;
	font-family: var(--wp--preset--font-family--signika);
	font-size: 1.0625rem !important;
	font-weight: 600;
	height: 52px !important;
	min-width: 110px;
	padding: 0 1.375rem !important;
	cursor: pointer;
}

.is-form-style input.is-search-submit:hover,
.is-form-style button.is-search-submit:hover {
	background: var(--hp-teal-deep) !important;
}

.is-ajax-search-details a,
.is-ajax-search-result a {
	color: var(--hp-teal) !important;
}

.is-ajax-woocommerce-actions .add_to_cart_inline a.button {
	color: #fff !important;
	background-color: var(--hp-teal) !important;
	border-radius: var(--hp-radius);
}

/* --------------------------------------------------------------------------
   WPB Accordion Menu (shop category sidebar, accordion 14086)
   -------------------------------------------------------------------------- */

.hp-shop-side .wpb_category_n_menu_accordion,
.wpb_category_n_menu_accordion {
	font-size: 1rem;
}

.wpb_category_n_menu_accordion li > a {
	color: var(--hp-teal) !important;
	font-weight: 600;
}

.wpb_category_n_menu_accordion .children a {
	font-weight: 400;
}

.wpb_category_n_menu_accordion .children a:hover,
.wpb_wmca_accordion_wrapper_theme_transparent > ul > li li:hover > a,
.wpb_wmca_accordion_wrapper_theme_transparent > ul > li li.current-cat > a,
.wpb_wmca_accordion_wrapper_theme_transparent > ul > li li.current-menu-item > a,
.wpb_wmca_accordion_wrapper_theme_transparent li.current_page_item > a {
	border-color: var(--hp-orange) !important;
	color: var(--hp-teal) !important;
}

/* --------------------------------------------------------------------------
   WooCommerce
   -------------------------------------------------------------------------- */

/* Store notice: straw bar, teal text */
.woocommerce-store-notice,
p.demo_store {
	background: var(--hp-straw) !important;
	color: var(--hp-teal) !important;
	font-size: 0.9375rem;
	font-family: var(--wp--preset--font-family--signika);
	box-shadow: none;
	border-bottom: 1px solid var(--hp-sage);
}

.woocommerce-store-notice a,
.woocommerce-store-notice__dismiss-link {
	color: var(--hp-teal) !important;
	font-weight: 600;
	text-decoration: underline;
}

/* Woo notices */
.wc-block-components-notice-banner {
	border-radius: var(--hp-radius);
}

/* Product cards (catalogue, related, search). Class kept from the old templates. */
.product_catologue_container {
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	box-sizing: border-box;
	padding: 1.25rem 1.25rem 1.5rem;
	text-align: center;
	background: var(--hp-paper);
	border-top: 3px solid transparent;
	transition: border-color 0.15s ease;
}

.product_catologue_container:hover,
.product_catologue_container:focus-within {
	border-top-color: var(--hp-orange);
}

.product_catologue_container .wc-block-components-product-image {
	width: 100% !important;
	display: flex;
	justify-content: center;
	align-items: center;
	margin: 0 0 0.75rem !important;
	height: 200px;
}

.product_catologue_container .wc-block-components-product-image a,
.product_catologue_container .wc-block-components-product-image > img {
	height: 200px !important;
	display: flex;
	justify-content: center;
}

.product_catologue_container .wc-block-components-product-image img {
	height: 100% !important;
	width: auto !important;
	max-width: 100%;
	object-fit: contain !important;
	box-shadow: 0 10px 20px rgba(17, 70, 74, 0.18);
}

.product_catologue_container h3,
.product_catologue_container .wp-block-post-title {
	font-family: var(--wp--preset--font-family--newsreader);
	font-size: 1.25rem !important;
	line-height: 1.2;
	margin: 0.5rem 0 0 !important;
	padding: 0 !important;
}

.product_catologue_container h3 a {
	color: var(--hp-teal);
	text-decoration: none;
}

.product_catologue_container h3 a:hover {
	text-decoration: underline;
}

.product_catologue_container .wp-block-woocommerce-product-price {
	margin: 0.5rem 0 0.875rem !important;
	font-weight: 700;
	font-size: 1rem;
	color: var(--hp-ink);
}

.product_catologue_container .wp-block-button,
.product_catologue_container .wc-block-components-product-button {
	margin-top: auto;
	width: 100%;
	display: flex;
	justify-content: center;
}

/* Product page */
p.stock.in-stock {
	font-size: 0.875rem;
	color: #2d6a3e;
	font-weight: 600;
}

p.stock.available-on-backorder,
p.stock.out-of-stock {
	font-size: 1rem;
	border-left: 4px solid var(--hp-orange);
	background: var(--hp-paper);
	padding: 0.625rem 0.875rem;
}

.woocommerce-product-gallery {
	opacity: 1 !important;
}

.wp-block-woocommerce-product-image-gallery img {
	box-shadow: 0 14px 28px rgba(17, 70, 74, 0.22);
}

.wp-block-woocommerce-product-price .woocommerce-Price-amount,
.wc-block-components-product-price {
	color: var(--hp-teal);
}

.wp-block-add-to-cart-form .single_add_to_cart_button,
.wc-block-components-product-button__button {
	min-height: 48px;
	border-radius: var(--hp-radius) !important;
	font-weight: 600;
}

.wp-block-add-to-cart-form .quantity .qty {
	min-height: 48px;
	border-radius: var(--hp-radius);
}

.wp-block-woocommerce-product-details .wc-tabs {
	border-bottom: 1px solid var(--hp-line);
}

.wp-block-woocommerce-product-details .wc-tabs li a {
	font-weight: 600;
	color: var(--hp-teal);
}

.wp-block-woocommerce-product-details .wc-tabs li.active a {
	box-shadow: inset 0 -3px 0 var(--hp-orange);
}

/* Mini cart drawer */
.wc-block-mini-cart__drawer .wc-block-mini-cart__title {
	font-family: var(--wp--preset--font-family--newsreader);
	color: var(--hp-teal);
}

.wc-block-mini-cart__footer .wc-block-components-button.outlined,
a.wc-block-components-button.wp-element-button.wc-block-mini-cart__footer-cart.outlined {
	border: 2px solid var(--hp-teal);
	background: transparent;
	color: var(--hp-teal) !important;
}

.wc-block-mini-cart__footer .wc-block-components-button.outlined:hover {
	background: var(--hp-teal);
	color: #fff !important;
}

/* Cart, checkout and account pages use the full content width */
.woocommerce-account main .woocommerce,
.woocommerce-cart main .woocommerce,
.woocommerce-checkout main .woocommerce {
	max-width: 100% !important;
}

.wc-block-components-totals-wrapper,
.wc-block-components-sidebar .wc-block-components-panel {
	border-color: var(--hp-line);
}

.wc-block-cart .wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	min-height: 56px;
	border-radius: var(--hp-radius) !important;
	font-size: 1.125rem;
	font-weight: 600;
}

.wc-block-components-text-input input,
.wc-block-components-combobox .wc-block-components-combobox-control input {
	border-radius: var(--hp-radius) !important;
}

.wc-block-components-checkout-step__title,
.wc-block-cart__totals-title {
	font-family: var(--wp--preset--font-family--newsreader) !important;
	color: var(--hp-teal);
}

/* Catalogue sorting and results count */
.wc-block-catalog-sorting select,
.woocommerce-ordering select {
	min-height: 44px;
}

/* --------------------------------------------------------------------------
   TranslatePress, CookieYes, accessibility toolbar, reCAPTCHA
   -------------------------------------------------------------------------- */

#trp-floater-ls {
	right: 0 !important;
}

@media (max-width: 768px) {
	.cky-consent-container {
		width: 100% !important;
	}
}

.grecaptcha-badge {
	visibility: hidden !important;
}

/* --------------------------------------------------------------------------
   GenerateBlocks loops still used in page content and patterns
   -------------------------------------------------------------------------- */

/* "Read more" / "Tuilleadh": a quiet text link, not a button */
.gb-container .gb-dynamic-read-more,
.wp-block-post-excerpt__more-link {
	display: inline-flex !important;
	align-items: center;
	gap: 0.35em;
	width: auto !important;
	min-height: 0 !important;
	padding: 0 !important;
	margin: 0.5rem 0 0 !important;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	color: var(--hp-teal) !important;
	font-family: var(--wp--preset--font-family--signika);
	font-size: 0.9375rem !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.gb-container .gb-dynamic-read-more::after,
.wp-block-post-excerpt__more-link::after {
	content: "\2192";
	text-decoration: none;
	display: inline-block;
	transition: transform 0.15s ease;
}

.gb-container .gb-dynamic-read-more:hover,
.wp-block-post-excerpt__more-link:hover {
	color: var(--hp-teal-deep) !important;
	background: none !important;
	text-decoration-thickness: 2px;
}

.gb-container .gb-dynamic-read-more:hover::after,
.wp-block-post-excerpt__more-link:hover::after {
	transform: translateX(3px);
}

@media (prefers-reduced-motion: reduce) {
	.gb-container .gb-dynamic-read-more::after,
	.wp-block-post-excerpt__more-link::after { transition: none; }
}

.gb-grid-wrapper-eb042d26 > .gb-grid-column {
	padding-left: 0 !important;
}

/* Editor Plus toggles saved in old content (plugin inactive): show them open and tidy */
.eplus_styles .ep_toggle_item_title,
.ep_toggle_item_title {
	background: var(--hp-teal);
	color: #fff;
	padding: 0.875rem 1rem;
	border-radius: var(--hp-radius) var(--hp-radius) 0 0;
	font-weight: 600;
}

.ep_toggle_item_content {
	background: var(--hp-paper);
	padding: 1rem;
}

/* Mailchimp opt-in on checkout */
.wc-block-components-checkbox__label a {
	color: var(--hp-teal);
}

/* WPForms */
.wpforms-container .wpforms-submit {
	min-height: 48px !important;
	padding: 0.75rem 1.375rem !important;
	background-color: var(--hp-teal) !important;
	border-radius: var(--hp-radius) !important;
	font-weight: 600 !important;
	color: #fff !important;
}

.wpforms-container .wpforms-submit:hover {
	background-color: var(--hp-teal-deep) !important;
}

.wpforms-container .wpforms-field-label {
	color: var(--hp-teal);
	font-weight: 600;
}

/* Store notices line up with the content */
.wp-block-woocommerce-store-notices,
.woocommerce-notices-wrapper {
	max-width: var(--wp--style--global--wide-size, 1340px);
	margin-inline: auto;
}

/* Empty paragraphs that WordPress adds around raw HTML (the Cake search forms, shortcodes):
   hide them and drop the spacing they push onto the next block. */
.wp-block-post-content p:empty,
.wp-block-toggles__content p:empty {
	display: none;
}

.wp-block-post-content p:empty:first-child + *,
.wp-block-toggles__content p:empty:first-child + * {
	margin-block-start: 0 !important;
}

/* Product cards: rounded like the other boxes */
.product_catologue_container {
	border-radius: var(--hp-radius-card);
}

/* Ivory Search forms in page content sit on the left, like the text around them */
.wp-block-post-content > .is-search-form,
.wp-block-post-content .wp-block-group > .is-search-form {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Boxes holding the archive search forms always get inner spacing, whatever the editor says */
.wp-block-group.has-background:has(.hpapp.generate_search_form),
.wp-block-group.has-border-color:has(.hpapp.generate_search_form) {
	padding: 1.25rem !important;
}
