/**
 * Just Stylin Salon WordPress theme layout helpers.
 *
 * The original mirrored site already contains its own header, footer, and
 * navigation. The WordPress header/footer are kept in the DOM for theme
 * structure and accessibility but are visually hidden by default.
 */

/* WordPress header/footer are hidden visually but kept for accessibility. */
.juststylin-wp-header,
.juststylin-wp-footer {
    display: none;
}

/* Screen-reader text helper. */
.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;
    width: 1px;
    word-wrap: normal !important;
}

/* Container for the imported static content. */
.juststylin-static-content {
    margin: 0;
    padding: 0;
}

/* Ensure the static content wrapper fills the viewport. */
.site-content {
    margin: 0;
    padding: 0;
}

/* Gravity Forms: larger fields and labels. */
.gform_wrapper .gfield_label,
.gform_wrapper .gform-field-label {
    font-size: 1.15rem !important;
    font-weight: 600 !important;
    margin-bottom: 0.5rem !important;
    text-align: left !important;
}

.gform_wrapper .ginput_container input[type="text"],
.gform_wrapper .ginput_container input[type="email"],
.gform_wrapper .ginput_container input[type="tel"],
.gform_wrapper .ginput_container textarea {
    font-size: 1.15rem !important;
    padding: 0.85rem 1rem !important;
    min-height: 3rem !important;
    width: 100% !important;
    line-height: 1.4 !important;
    border-radius: 6px !important;
    text-align: left !important;
}

.gform_wrapper .ginput_container textarea {
    min-height: 8rem !important;
}

.gform_wrapper .gform_button,
.gform_wrapper .gform_footer input[type="submit"] {
    font-size: 1.15rem !important;
    padding: 0.9rem 2rem !important;
    min-height: 3.25rem !important;
    text-align: left !important;
}

.gform_wrapper .gfield_description,
.gform_wrapper .ginput_counter,
.gform_wrapper .gfield_validation_message,
.gform_wrapper .validation_message {
    font-size: 1rem !important;
    text-align: left !important;
}

/* Force left-align all form elements inside the form wrapper. */
.gform_wrapper,
.gform_wrapper .gform_body,
.gform_wrapper .gform_fields,
.gform_wrapper .gfield {
    text-align: left !important;
}

/* Contact page: make form and content mobile-friendly. */
.dmform-wrapper,
.dmform-wrapper .gform_wrapper {
    max-width: 100% !important;
    padding: 0 !important;
}

@media (max-width: 767px) {
    /* Override Duda's min-width that causes horizontal scroll. */
    .dmInner {
        min-width: 0 !important;
    }

    /* Override Duda's forced center-align on the form container. */
    div.u_1328550447,
    .dmform-wrapper,
    .dmform {
        text-align: left !important;
    }

    /* Collapse the two-column layout to single column. */
    .flex-element.group[data-auto="flex-element-group"] {
        flex-direction: column !important;
        width: 100% !important;
    }

    #9551f971,
    #cc5f7132,
    #daeb3cd1 {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Form fields: full width, stacked, left-aligned. */
    .dmform-wrapper .gform_wrapper .gfield {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .dmform-wrapper .gform_wrapper .gfield_label,
    .dmform-wrapper .gform_wrapper .gform-field-label {
        font-size: 1rem !important;
        text-align: left !important;
    }

    .dmform-wrapper .gform_wrapper .ginput_container input[type="text"],
    .dmform-wrapper .gform_wrapper .ginput_container input[type="email"],
    .dmform-wrapper .gform_wrapper .ginput_container input[type="tel"],
    .dmform-wrapper .gform_wrapper .ginput_container textarea {
        font-size: 1rem !important;
        padding: 0.75rem !important;
        width: 100% !important;
        text-align: left !important;
    }

    /* Submit button: full width, centered. */
    .dmform-wrapper .gform_wrapper .gform_button,
    .dmform-wrapper .gform_wrapper .gform_footer input[type="submit"],
    #gform_submit_button_1 {
        width: 100% !important;
        max-width: 100% !important;
        padding: 0.85rem 1.5rem !important;
        float: none !important;
        text-align: center !important;
    }

    .dmform-wrapper .gform_wrapper .gform_footer {
        text-align: center !important;
    }

    /* Page section padding. */
    .dmform {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* "Send Us A Message" heading. */
    .dmform-title,
    .dmwidget-title {
        text-align: left !important;
    }
}

/* Accordion / FAQ fix */
[data-grab="accordion-item-title-wrapper"] {
    cursor: pointer;
}

/* Ensure FAQ content is visible by default */
[data-grab="accordion-item-container"].accordion-open .dygwmn {
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

[data-grab="accordion-item-container"].accordion-open [data-grab="accordion-item-arrow"] {
    transform: rotate(180deg);
}

