:root {
    --brand-accent: #91bc0e;
}

.well {
    min-height: 20px;
    padding: 19px;
    margin-bottom: 20px;
    background-color: #f5f5f5;
    border: 1px solid #e3e3e3;
    border-radius: 2px;
    -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

/* Hide submit buttons for pathfinder forms */
.pathfinder-form .gform_footer {
    display: none;
}

.subscribers-only-notice {
    background-color: #d9edf7;
    border-color: #bce8f1;
    color: #31708f;
    padding: 15px;
    border-radius: 2px;
}

#main-content hr {
    margin-bottom: 1.25rem;
}

#main-content h2 {
    margin-top: 1.25rem;
}

#main-content h3 {
    margin-top: 1rem;
}

.btn.btn-primary {
    color: white;
    font-weight: bold;
    background-color: var(--wd-primary-color);
}

/* Gravity Forms */
.gform_wrapper.gravity-theme .gfield input.large,
.gform_wrapper.gravity-theme .gfield select.large {
    padding-left: 15px;
}

.gform_wrapper.gravity-theme .gform_footer button,
.gform_wrapper.gravity-theme .gform_footer input,
.gform_wrapper.gravity-theme .gform_page_footer button,
.gform_wrapper.gravity-theme .gform_page_footer input {
    margin-bottom: 8px;
    background: var(--wd-primary-color);
    color: #fff;
}

.gform_wrapper label,
.gform_wrapper .gfield_description {
    font-size: 11pt;
    font-weight: 600;
}

/* Hide the radio input when its label contains an image */
body.trauma-pathfinder .gfield_radio li.gchoice:has(label img) input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Centre the image and text within the label */
body.trauma-pathfinder .gfield_radio li.gchoice:has(label img) label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px;
}

body.trauma-pathfinder .gfield_radio li.gchoice:has(label img) label p {
    margin: 0;
    padding: 8px;
}

body.trauma-pathfinder .gfield_radio li.gchoice:has(label img) label br {
    display: none;
    /* the <br>s are no longer needed for spacing */
}

/* Image with a transparent placeholder outline */
body.trauma-pathfinder .gfield_radio li.gchoice:has(label img) img {
    display: block;
    margin-bottom: 0.75em;
    outline: 3px solid transparent;
    outline-offset: 4px;
    border-radius: 4px;
    transition: outline-color 0.15s ease;
}

/* Hover cue */
body.trauma-pathfinder .gfield_radio li.gchoice:has(label img):hover img {
    outline-color: #ccc;
}

/* Outline the image when its radio is checked */
body.trauma-pathfinder .gfield_radio li.gchoice:has(input[type="radio"]:checked) img {
    outline-color: #0073aa;
}

/* Dental Guides Prognosis Forms */
.prognosis-form ul li.gfield {
    clear: none !important;
}

.prognosis-form .hidden {
    display: none !important;
}

.prognosis-form .col-sm-4 {
    width: 33.3333333%;
    float: left;
}

.prognosis-form .col-md-6 {
    width: 50%;
    float: left;
}

.prognosis-form .gform_button {
    display: none !important;
}

.prognosis-form .g-images .gfield_radio {
    display: flex;
}

.prognosis-form .g-images .gfield_radio li {
    text-align: center;
    margin: 0;
}

.prognosis-form .g-images .gfield_radio li:first-child {
    margin-left: 4px !important;
}

.prognosis-form .g-images .gfield_radio li:last-child {
    margin-right: 4px !important;
}

/* Hide the radio input when its label contains an image */
.prognosis-form .g-images .gfield_radio li input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

/* Centre the image and text within the label */
.prognosis-form .g-images .gfield_radio li label {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 4px;
}

/* Image with a transparent placeholder outline */
.prognosis-form .g-images .gfield_radio li img {
    display: block;
    width: 80px;
    margin-bottom: 0.75em;
    outline: 3px solid transparent;
    outline-offset: 4px;
    border-radius: 4px;
    transition: outline-color 0.15s ease;
}

/* Hover cue */
.prognosis-form .g-images .gfield_radio li:hover img {
    outline-color: #ccc;
}

/* Outline the image when its radio is checked */
.prognosis-form .g-images .gfield_radio li:has(input[type="radio"]:checked) img {
    outline-color: #0073aa;
}

/* Space above each labelled form row. Padding on the row, not a margin on
   the label: a label margin collapses through the row and is swallowed by
   the clearance of a wide row following a floated first/last pair, so
   "Display name" on the account form ended up flush against the inputs. */
.form-row:has(label) {
    padding-top: 1.5rem;
}
/* ... but not the first row, nor the half-width row sitting beside it
   (First name / Last name). */
.form-row:first-of-type,
.form-row:first-of-type + .form-row-last {
    padding-top: 0;
}
.form-row input {
    margin-bottom: 0.15rem;
}

/* Checkout: the quantity stepper is drawn by Woodmart with only its outer
   corners rounded, but the theme's custom CSS rounds every .btn, which rounds
   the inner corners too (|-)5(+|). Square the inner corners back off. */
.woocommerce-checkout div.quantity .minus {
    border-start-end-radius: 0;
    border-end-end-radius: 0;
}
.woocommerce-checkout div.quantity .plus {
    border-start-start-radius: 0;
    border-end-start-radius: 0;
}

/* Checkout: the Reepay gateway stylesheet forces every payment method label
   to display:flex (!important, to push its card logos right), which drops
   the label onto the line under its radio. Lay the list item out as a flex
   row instead so the input and the label share a line, with the payment box
   wrapping to a full-width line below. Google Pay's item stays hidden by the
   gateway's own rule. The same goes for the gateway's "Save to account" row. */
.woocommerce-checkout #payment .payment_methods > li.wc_payment_method:not(.payment_method_reepay_googlepay) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0 0.5em;
}
.woocommerce-checkout #payment .payment_methods > li > label {
    flex: 1;
}
.woocommerce-checkout #payment .payment_methods > li > .payment_box {
    flex-basis: 100%;
}
.woocommerce-checkout #payment .payment_methods p {
    padding-top: 0 !important;
}
.woocommerce-checkout #payment .payment_box .form-row:has(> input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 0.5em;
}
.woocommerce-checkout ul.wc-saved-payment-methods[data-count="0"] {
    display: none;
}
.woocommerce-checkout .form-row.place-order p {
    padding-top: 0 !important;
}

/* My account › VAT number (woocommerce-eu-vat-number): the form floats the
   field half-width and relies on a `.clear` div the theme never styles, so
   the Save button lands up beside the label. Lay the form out as a flex row
   with the button on the field's baseline. */
body.woocommerce-vat-number .woocommerce-MyAccount-content form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 0 1rem;
}
body.woocommerce-vat-number .woocommerce-MyAccount-content form > .form-row-first {
    float: none;
}
body.woocommerce-vat-number .woocommerce-MyAccount-content form > .clear {
    display: none;
}
/* Match the field's bottom margin so the two bottoms line up. */
body.woocommerce-vat-number .woocommerce-MyAccount-content form > p:last-of-type {
    margin-bottom: 0.15rem;
}

/* Header: the "Buy membership" button is for non-members only. The body
   class comes from Memberships\BodyClass. */
body.dtg-member .header-buy-membership-btn {
    display: none;
}

/* Header: the "Login" button is for visitors who are not logged in. */
body.logged-in .header-login-btn {
    display: none;
}

/* Header: the WPML Languages element sits beside a menu set to Woodmart's
   "underline" nav style, whose .nav-link-text gets line-height 1.2 and 1px
   vertical padding. The languages element keeps the default style's 1.4
   line-height, which puts its text 0.7px lower than the menu's. Give it the
   same metrics so the baselines line up. */
.wd-header-nav .wd-nav-secondary .wpml-ls-link .nav-link-text {
    line-height: 1.2;
    padding: 1px 0;
}

/* Header: the site's Woodmart custom CSS sets `:is(ul,ol) { --li-mb: 2px
   !important }`, which beats the theme's own `.wd-nav { --li-mb: 0 }` and
   gives every top-level header menu item a 2px bottom margin — except the
   last child, which the theme resets. A one-item list like the WPML Languages
   element therefore sits 1px lower than a multi-item menu beside it. Header
   nav items get no list margin, as Woodmart intends. */
.whb-row .wd-nav-header > li {
    margin-bottom: 0;
}

/* Page title bar: a dark gradient over the page title image, the one the
   hand-built page headers use, so the title reads on any photograph. Only a
   bar that has an image gets it; `Integrations\Woodmart\PageTitleByImage`
   switches such a bar to the light colour scheme to go with it. */
.wd-page-title .wd-page-title-bg:has(> img)::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(102deg, #041621f7 0%, #061e2ced 46%, #061e2cb8 100%);
	pointer-events: none;
}

.wd-page-title .wd-page-title-bg > img {
	object-position: center 32%;
}

/* Elementor containers set to Woodmart's "Stretch section": the background
   runs to the window edges and the content stays in the site container.
   Woodmart keeps the content off the edges on a narrow window with a 15px
   `--padding-left/right` on the container, but a container whose padding is
   filled in in Elementor (even as 0) carries its own values, which win, and
   the content then touches the window. Hold the gutter as a minimum on the
   padding itself instead; a larger padding set in Elementor still applies.
   "Stretch section and content" is meant to reach the edges and is left alone. */
.e-con-boxed.wd-section-stretch {
	padding-inline-start: max(15px, var(--padding-inline-start, 0px));
	padding-inline-end: max(15px, var(--padding-inline-end, 0px));
}

/* Page title bar: the title set like the hand-built page headers' heading —
   Manrope 800, 42px (40px from tablet down, 32px on a phone), tight leading
   and tracking — in place of the theme's 36–78px at weight 600. The size goes
   in through the theme's own `--wd-title-font-s`; the title-size classes keep
   deciding the bar's height. Three classes deep, because the theme prints its
   page title CSS after this file. */
.wd-page-title[class*="title-size-"] {
	--wd-title-font-s: 42px;
}

.wd-page-title .container .title {
	font-family: 'Manrope', Arial, Helvetica, sans-serif;
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.035em;
}

@media (max-width: 1024px) {
	.wd-page-title[class*="title-size-"] {
		--wd-title-font-s: 40px;
	}
}

@media (max-width: 768px) {
	.wd-page-title[class*="title-size-"] {
		--wd-title-font-s: 32px;
	}
}
