/*** Other Styles ***/
/*** Rubrum base helpers: stable rules that read theme.json values. Rarely edited. ***/
/*** Design values live in theme.json; per-site CSS goes in style.css. ***/


/*** No gap between the site header, main content and footer (replaces per-template margin-top:0 and mt-0). ***/
.wp-site-blocks > * {
    margin-block-start: 0;
}


/*** Pagination Block ****/
.wp-block-query-pagination-numbers {
    margin: 0 !important;
    padding: 8px 0;
}
.wp-block-query-pagination-numbers span.page-numbers,
.wp-block-query-pagination-numbers a.page-numbers {
    padding: 7px 13px;
    background-color: var(--wp--preset--color--accent);
    color: var(--wp--preset--color--base);
    margin: 3px;
}
.wp-block-query-pagination-numbers span.page-numbers.current {
    background-color: var(--wp--preset--color--primary);
}
.wp-block-query-pagination-numbers span.page-numbers:hover,
.wp-block-query-pagination-numbers a.page-numbers:hover {
    background-color: var(--wp--preset--color--secondary);
    color: var(--wp--preset--color--base) !important;
}


/*** Cover with no image or video (e.g. featured image missing): show the overlay color at full strength ***/
.wp-block-cover:not(:has(> .wp-block-cover__image-background, > .wp-block-cover__video-background)) > .wp-block-cover__background {
    opacity: 1 !important;
}


/*** Gravity Forms Labels and Other Tweaks ***/
.gform_wrapper.gravity-theme .ginput_complex label,
.gform_wrapper.gravity-theme .gfield_label {
    margin: 0;
    padding: 0 0 6px;
    color: var(--wp--preset--color--contrast);
    font-family: var(--wp--custom--form--default--input--typography--font-family);
    font-size: var(--wp--preset--font-size--small);
    font-weight: var(--wp--custom--form--default--input--typography--font-weight);
    line-height: 1;
}
.gform_wrapper.gravity-theme label.gform-field-label--type-sub {
    margin-top: 6px;
}
.gform_wrapper .gform_heading p.gform_required_legend {
    margin-bottom: 0;
}
.gform_wrapper .validation_message {
    padding: 6px 12px;
}
.gform_wrapper.gravity-theme .gfield_required {
    color: var(--wp--preset--color--contrast);
}
.gform_wrapper .gform_required_legend:empty {
    display: none;
}

/*** Keyboard focus: one outline for links and buttons. ***/
/*** Values: settings.custom.utility.focus.outline in theme.json ***/
a:focus-visible,
button:focus-visible,
input[type=submit]:focus-visible,
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible,
.btn:focus-visible {
    outline: var(--wp--custom--utility--focus--outline--width) var(--wp--custom--utility--focus--outline--style) var(--wp--custom--utility--focus--outline--color);
    outline-offset: var(--wp--custom--utility--focus--outline--offset);
}
.gform_wrapper :is(button, input[type=submit]):focus-visible {
    outline: var(--wp--custom--utility--focus--outline--width) var(--wp--custom--utility--focus--outline--style) var(--wp--custom--utility--focus--outline--color) !important;
    outline-offset: var(--wp--custom--utility--focus--outline--offset) !important;
}

/*** Core form fields (Search block, comments, login, password forms). ***/
/*** Values: settings.custom.form.default.input in theme.json. :where() keeps specificity at zero so Gravity Forms and block styles still win. ***/
:where(textarea, select, input:where([type=email],[type=number],[type=password],[type=search],[type=text],[type=tel],[type=url])) {
    color: var(--wp--custom--form--default--input--color--text);
    background-color: var(--wp--custom--form--default--input--color--background);
    border: var(--wp--custom--form--default--input--border--width) var(--wp--custom--form--default--input--border--style) var(--wp--custom--form--default--input--border--color);
    border-radius: var(--wp--custom--form--default--input--border--radius);
    padding: var(--wp--custom--form--default--input--spacing--padding--top) var(--wp--custom--form--default--input--spacing--padding--right) var(--wp--custom--form--default--input--spacing--padding--bottom) var(--wp--custom--form--default--input--spacing--padding--left);
    font-family: var(--wp--custom--form--default--input--typography--font-family);
    font-size: var(--wp--custom--form--default--input--typography--font-size);
    line-height: var(--wp--custom--form--default--input--typography--line-height);
}
:where(textarea, select, input:where([type=email],[type=number],[type=password],[type=search],[type=text],[type=tel],[type=url])):hover {
    border-color: var(--wp--custom--form--default--input--state--hover--border--color);
}

/* Adjust the height of the SELECT field to match INPUT fields */
.gform_wrapper.gravity-theme .gfield select {
    padding-top: calc(var(--wp--custom--form--default--input--spacing--padding--top) - 2px) !important;
    padding-bottom: calc(var(--wp--custom--form--default--input--spacing--padding--bottom) - 2px) !important;
}

/*** Inline Form Styles ***/
.gform_wrapper .form-inline .gform_footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/*** Light colored forms ***/
:is(.form-light, .form-labels-light) :is(.ginput_complex label, .gfield_label, .gfield_radio > .gchoice label, .gfield_checkbox > .gchoice label, .gfield_required, .text-disclaimer-opt-in label.gfield_consent_label, .text-disclaimer-opt-in label.gfield_consent_label a) {
    color: color-mix(in srgb, var(--wp--preset--color--base) 80%, transparent) !important;
}

/* Adjust text opt in disclaimer styles */
.text-disclaimer-opt-in label.gfield_consent_label {
    display: inline-flex;
    gap: var(--wp--custom--form--default--fields--checkbox--container--styles--gap) !important;
    margin: var(--wp--custom--form--default--fields--checkbox--container--styles--margin) !important;
    font-size: var(--wp--preset--font-size--small);
}
.text-disclaimer-opt-in label.gfield_consent_label::before {
    margin-top: .25rem;
}

/*** END - Gravity Forms Tweaks ***/
