/**
Theme Name: microassist_astra
Author: Sanjay Nasta
Author URI: https://www.microassist.com
Description: Child theme for Microassist Main Site
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: microassist_astra
Template: astra
*/


.hidden {
    display: none !important;
}

/*
 * Footer text links
 *
 * Keep normal footer links persistently underlined.
 * Social-media links are excluded.
 */
.site-footer a:not(.footer-social-item) {
	text-decoration: underline !important;
	text-underline-offset: 0.12em;
}

.site-footer a:not(.footer-social-item):hover,
.site-footer a:not(.footer-social-item):focus {
	text-decoration: underline !important;
}

/* Legacy single-course layout.
 * Temporary until the course template is redesigned.
 */
body.single-course-outline .course-category {
    display: block !important;
    font-size: 18px !important;
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
    width: 100%;
    clear: both;
}

body.single-course-outline .entry-title {
    display: block !important;
    font-size: 32px !important;
    margin-top: 15px !important;
    padding-top: 5px !important;
    width: 100%;
    clear: both;
}

body.single-course-outline.ast-single-post .entry-header {
    width: 100%;
    max-width: none;
    margin: 0 auto;
    padding: 20px 0;
}

/* Visually hidden text retained for assistive technologies. */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #f1f1f1;
    border-radius: 2px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: #21759b;
    display: block;
    font-size: 0.875rem;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Microassist Gravity Forms
 * Applies only to forms using the Orbital theme.
 */
.gform-theme--framework {
    /* Main field labels */
    --gf-ctrl-label-color-primary: #26221C;
    --gf-ctrl-label-font-size-primary: 14px;
    --gf-ctrl-label-font-weight-primary: 600;
    --gf-ctrl-label-line-height-primary: 1.4;

    /* Checkbox, radio, and similar inline labels */
    --gf-ctrl-label-color-secondary: #26221C;
    --gf-ctrl-label-font-size-secondary: 14px;
    --gf-ctrl-label-font-weight-secondary: 400;
    --gf-ctrl-label-line-height-secondary: 1.4;

    /* Sub-labels such as First and Last */
    --gf-ctrl-label-color-tertiary: #595957;
    --gf-ctrl-label-font-size-tertiary: 14px;
    --gf-ctrl-label-font-weight-tertiary: 400;
    --gf-ctrl-label-line-height-tertiary: 1.4;

    /* Required indicator */
    --gf-ctrl-label-color-req: #595957;
    --gf-ctrl-label-font-size-req: 14px;

    /* Field descriptions and help text */
    --gf-ctrl-desc-color: #595957;
    --gf-ctrl-desc-font-size: 14px;
    --gf-ctrl-desc-line-height: 1.5;

    /* Overall form spacing */
    --gf-form-gap-x: 16px;
    --gf-form-gap-y: 24px;
    --gf-field-gap-x: 16px;
    --gf-field-gap-y: 12px;
}

/* Microassist Gravity Forms: primary submit buttons */
.gform-theme--framework .gform_footer input[type="submit"].gform_button,
.gform-theme--framework .gform_page_footer input[type="submit"].gform_button,
.gform-theme--framework #field_submit input[type="submit"].button {
    --gf-ctrl-btn-bg-color-primary: #26221C;
    --gf-ctrl-btn-bg-color-hover-primary: #3A342C;
    --gf-ctrl-btn-color-primary: #FFFFFF;
    --gf-ctrl-btn-radius: 2px;
    --gf-ctrl-btn-font-size: 14px;
    --gf-ctrl-btn-font-weight: 700;
}

/* Microassist Gravity Forms: primary submit button hover */
.gform-theme--framework .gform_footer input[type="submit"].gform_button:hover,
.gform-theme--framework .gform_page_footer input[type="submit"].gform_button:hover,
.gform-theme--framework #field_submit input[type="submit"].button:hover {
	background-color: #3A342C !important;
	color: #FFFFFF !important;
}

/* Accessible validation summary */
body .gform-theme--framework.gform-theme--orbital .gform_validation_errors {
    --gf-form-validation-bg-color: #FFFFFF;
    --gf-form-validation-border-color: #C0392B;
    --gf-form-validation-border-width: 2px;
    --gf-form-validation-padding-y: 16px;
    --gf-form-validation-padding-x: 16px;
    --gf-form-validation-heading-color: #C0392B;
    --gf-form-validation-summary-color: #C0392B;
}

/* Fields containing an error */
body .gform-theme--framework.gform-theme--orbital .gfield_error {
    --gf-ctrl-border-color-error: #C0392B;
    --gf-ctrl-bg-color-error: #FFFFFF;
}

/* Field-level validation message */
body .gform-theme--framework.gform-theme--orbital .gfield_validation_message {
    --gf-ctrl-desc-color-error: #C0392B;
    --gf-ctrl-desc-font-size-error: 14px;
}

/* Slightly tighter spacing on mobile */
@media (max-width: 767px) {
    .gform-theme--framework {
        --gf-form-gap-x: 12px;
        --gf-form-gap-y: 20px;
        --gf-field-gap-x: 12px;
        --gf-field-gap-y: 10px;
    }
}

/* Service-detail pages: space between Page Title Area and article body */
body.page.ast-right-sidebar .entry-content {
	margin-top: 32px;
}

/* Pages and publication sidebars: card treatment */
body.page.ast-right-sidebar #secondary .widget,
body.single-post.ast-right-sidebar #secondary .widget,
body.blog.ast-right-sidebar #secondary .widget,
body.single-post-digital-access.ast-right-sidebar #secondary .widget {
    background: var(--ast-global-color-5);
    border: 1px solid var(--ast-global-color-6);
    border-radius: 4px;
    box-shadow: none;
}

/* Pages and individual blog posts: primary sidebar form heading */
body:is(.page, .single-post).ast-right-sidebar
#secondary .widget:first-child .gform_heading {
	display: grid;
	row-gap: 12px;
}

body:is(.page, .single-post).ast-right-sidebar
#secondary .widget:first-child :is(
	.gform_title,
	.widget-title,
	.wp-block-heading:first-of-type,
	h2:first-of-type
) {
	font-family: "Source Serif 4", serif;
	font-size: 24px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	margin: 0;
}

body:is(.page, .single-post).ast-right-sidebar
#secondary .widget:first-child .gform_description {
	margin: 0;
}

/* Interior pages and individual blog posts: article heading rhythm.
 * Home Page 2026 is excluded because homepage section headings use
 * their own layout and spacing rather than article heading treatment.
 */
body:is(.page, .single-post):not(.page-id-24747) .entry-content h2 {
	margin-block-start: 40px;
	margin-block-end: 12px;
}

body:is(.page, .single-post):not(.page-id-24747) .entry-content h2::before {
	content: "";
	display: block;
	width: 40px;
	height: 3px;
	background: var(--ast-global-color-1);
	margin-bottom: 12px;
}

body:is(.page, .single-post):not(.page-id-24747) .entry-content h3 {
	margin-block-start: 28px;
	margin-block-end: 8px;
}

body:is(.page, .single-post):not(.page-id-24747) .entry-content :is(h4, h5, h6) {
	margin-block-start: 24px;
	margin-block-end: 8px;
}

/* ------------------------------------------------------------------
   Home Page 2026: full-width bands.

   Astra keeps the normal Page content area at 1120px. These alignfull
   sections intentionally break out of that centered content width and
   extend to the full browser viewport.

   Scoped to this page so normal interior Pages retain the standard
   1120px layout.
   ------------------------------------------------------------------ */
body.page-id-24747 .entry-content > .alignfull {
	margin-left: calc(50% - 50vw) !important;
	margin-right: calc(50% - 50vw) !important;
	max-width: 100vw !important;
	width: 100vw !important;
}


/* ------------------------------------------------------------------
   Home Page 2026: remove Astra's vertical article padding.

   Astra adds spacing above and below the article wrapper on this
   page-builder layout. The homepage sections control their own
   vertical spacing, so that wrapper padding creates unwanted white
   bands between the header, page content, and footer.
   ------------------------------------------------------------------ */
body.page-id-24747 .site-main > article {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

/* Hero ghost button: approved hover treatment for the dark hero. */
.ma-hero-ghost-button .wp-block-button__link:hover,
.ma-hero-ghost-button .wp-block-button__link:focus-visible {
	background-color: #3A342C;
	color: #FFFFFF;
	border-color: #D8D5CE;
}

/* Homepage: compact Upcoming Classes shortcode output */
.ma-home-classes .em.em-events-list > p {
    display: none !important;
    margin: 0 !important;
}

.ma-home-classes .em.em-events-list > div + div {
    margin-top: 16px;
}

/* Homepage Upcoming Classes: use site link color */
/* Palette 1: #7A4F00 */
.ma-home-classes .em.em-events-list a {
    color: #7A4F00 !important;
}

/* In Focus cards: align the final action at the bottom */
.ma-focus-card-content {
    flex: 1 1 auto;
}

.ma-focus-card-content > :last-child {
    margin-top: auto !important;
}

/* Hide Previous / Next navigation on Event detail pages only */
body.single-event .post-navigation {
	display: none;
}


/* ========================================
   MICROASSIST GLOBAL QUOTE STYLE
   ======================================== */

.wp-block-quote {
	margin: 0;
	padding: 0 0 0 24px;
	border-left: 4px solid #55304A;
}

.wp-block-quote p {
	margin: 0;
	font-family: "Source Sans 3", sans-serif;
	font-size: 20px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.6;
	color: #26221C;
}

.wp-block-quote cite {
	display: block;
	margin-top: 16px;
	font-family: "Source Sans 3", sans-serif;
	font-size: 14px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.5;
	color: #595957;
}

.wp-block-quote cite strong {
	display: block;
	margin-bottom: 2px;
	font-size: 16px;
	font-weight: 700;
	color: #26221C;
}

/*
 * Microassist content links
 *
 * Ordinary links within page and article content are persistently
 * underlined so they are not identified by color alone.
 *
 * Covers prose, lists, tables, captions, and blockquotes sitewide.
 * Navigation, buttons, breadcrumbs, cards, and other interface
 * components are intentionally outside this rule.
 */
.entry-content :is(
	p,
	li,
	dd,
	figcaption,
	blockquote,
	td,
	th
) a[href]:not(.wp-element-button):not(.wp-block-button__link) {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.entry-content :is(
	p,
	li,
	dd,
	figcaption,
	blockquote,
	td,
	th
) a[href]:not(.wp-element-button):not(.wp-block-button__link):hover,
.entry-content :is(
	p,
	li,
	dd,
	figcaption,
	blockquote,
	td,
	th
) a[href]:not(.wp-element-button):not(.wp-block-button__link):focus {
	text-decoration: underline;
}

/* Course Schedule table links */
.ast-responsive-table a {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.ast-responsive-table a:hover,
.ast-responsive-table a:focus {
	text-decoration: underline;
}

.single-course-outline .field-content a[href] {
	text-decoration: underline;
	text-underline-offset: 0.12em;
}

.single-course-outline .field-content a[href]:hover,
.single-course-outline .field-content a[href]:focus {
	text-decoration: underline;
}

/*
 * Microassist dark-section Gravity Forms
 *
 * Purpose:
 * Applies accessible, approved Microassist colors to Gravity Forms
 * only when the form appears inside a container with the class
 * .dark-form-section.
 *
 * Why this exists:
 * Gravity Forms does not provide all needed context-specific color
 * controls for dark backgrounds in the block editor.
 *
 * Usage:
 * Add the class "dark-form-section" to the outer dark Group/Container.
 * The same Gravity Form can still be reused on light backgrounds
 * without inheriting these styles.
 *
 * Approved dark-form colors:
 * Main labels: #FFFFFF
 * Helper/sublabel text: #A39C90
 * Required/error text: #E57368
 */

.dark-form-section .gform-theme--framework {
    --gf-ctrl-label-color-primary: #FFFFFF;
    --gf-ctrl-desc-color: #A39C90;
}

.dark-form-section .gform-theme--framework .gform-field-label--type-sub {
    color: #A39C90;
}

.dark-form-section .gform-theme--framework .gform-field-label .gfield_required {
    --gf-ctrl-label-color-req: #E57368;
}

.dark-form-section .gform-theme--framework .gfield_validation_message {
    --gf-ctrl-desc-color-error: #E57368;
}

.dark-form-section .gform-theme--framework .gform_validation_errors .gform_submission_error {
    --gf-form-validation-heading-color: #E57368;
}

.dark-form-section .gform-theme--framework .gform_validation_errors ol {
    --gf-form-validation-summary-color: #C0392B;
}



/*
 * MICROASSIST ACCESSIBILITY
 * High-contrast keyboard focus indicators
 * WCAG 2.4.7 and 1.4.11
 *
 * Global treatment: black outline, white surround.
 * Special treatment: Astra header CTA.
 */

/* Global keyboard focus indicator */
:focus-visible {
    outline: 3px solid #000 !important;
    outline-offset: 0 !important;
    box-shadow: 0 0 0 6px #fff !important;
}

/* Astra header button */
a.ast-custom-button-link:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 6px #000 !important;
    border-radius: 4px;
}
