/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/

@font-face {
    font-family: 'Instrument Sans';
    /* src: local(Arial); */
    size-adjust: 102%;
    ascent-override: normal;
    descent-override: normal;
    line-gap-override: normal;
}


@font-face {
    font-family: 'Instrument Serif';
    /* src: local(Arial); */
    size-adjust: 98%;
    ascent-override: 89%;
    descent-override: 0%;
    line-gap-override: 76%;
}

#brx-content {
    position: static;
}

.is-empty-space {
    display: none !important;
}


h2 {
    &.h2-small {
        font-size: var(--heading-lg);
        line-height: 1;
    }
}


.accordion-item {
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 12px;
    padding: 16px 16px 16px 32px;
    background-color: var(--gray-0);

    a {
        color: var(--dark-black);
    }

    .accordion-title-wrapper {
        padding: 0;

        .accordion-title {

            .title {
                padding-right: 32px;
                font-size: 28px;
                line-height: 32px;
            }

        }
    }

    .accordion-content-wrapper {
        padding-right: 0 !important;

        a {
            color: var(--action);
        }
    }

    &:last-child {
        margin-bottom: 0;
    }

}

.brxe-post-content {

    /* Space above headings to separate sections */
    h2,
    h3,
    h4,
    h5,
    h6 {
        margin-top: 2.5rem;
        /* Significant gap from previous section */
        margin-bottom: 1rem;
        /* Tight gap to the text below it */
        line-height: 1.2;
    }

    /* Standard paragraph spacing */
    p {
        margin-bottom: 1.5rem;
        line-height: 1.6;
        /* Enhances readability for long legal text */
    }
}

body.offcanvas-active {
    #brx-header {
        .header-inner {}

        .bricks-link-wrapper {
            &:has(svg) {
                position: relative;
                z-index: 9999;
            }
        }

        .bricks-mobile-menu {
            margin-top: 104px;
            padding-top: 12px;
            padding-bottom: 12px;
            padding-left: 16px;
            padding-right: 16px;

            &+.header-right {
                display: flex !important;
                justify-content: center;
                align-items: center;
                flex-direction: column;
                margin-left: 0;
                text-align: center;
                padding: 0 16px;

                .header-buttons {
                    width: 100%;
                }

            }
        }

    }

}


.brxe-accordion-nested {
    .listening {
        background-color: var(--gray-0);
        padding: 32px;
        gap: 0;

        &:not(:last-child) {
            margin-bottom: 24px;
        }

        .accordion-title-wrapper {
            min-height: auto !important;
            display: grid;
            grid-template-columns: 1fr 24px;

            h3 {
                font-size: var(--heading-sm);
                line-height: 105.556%;
            }
        }

        .accordion-content-wrapper {
            padding: 0 !important;
        }
    }
}

.faq {
    .brxe-accordion-nested {
        .listening {
            background-color: var(--gray-0);
            padding: 24px;
            gap: 0;

            &:not(:last-child) {
                margin-bottom: 12px;
            }

            .accordion-title-wrapper {
                min-height: auto !important;
                display: grid;
                grid-template-columns: 1fr 24px;

                h3 {
                    font-size: var(--heading-xs);
                    line-height: 114.286%;
                }
            }

            .accordion-content-wrapper {
                padding: 0 !important;
            }
        }
    }
}

.faq-blog-post {
    .brxe-accordion-nested {
        .listening {
            background-color: var(--gray-0);
            padding: 24px 0;
            gap: 0;
            border-bottom: 2px solid var(--gray-24);

            &:not(:last-child) {
                margin-bottom: 0;
            }

            .accordion-title-wrapper {
                min-height: auto !important;
                display: grid;
                grid-template-columns: 1fr 24px;
            }

            .accordion-content-wrapper {
                padding: 0 !important;
            }
        }
    }
}

.gform_wrapper {
    .gform_heading {
        display: none;
    }

    form {
        .gform_body {
            .gform_fields {
                gap: 24px 24px;

                .gfield {

                    .gfield_label {
                        color: var(--gray-800-h);
                        font-size: 15px;
                        font-weight: 600;
                        line-height: 120%;
                        margin-bottom: 12px;
                    }

                    &.gfield--type-fileupload {
                        position: relative;

                        .ginput_container_fileupload {
                            padding: 24px;
                            border-radius: 16px;
                            border: 2px dashed var(--Gray-50, #EDE3E0);
                            background: var(--Gray-25, #F8F3F2);
                            position: relative;
                            height: 132px;
                            cursor: pointer;

                            @media(max-width: 768px) {
                                height: 165px;
                            }

                            &:hover {
                                border: 2px dashed var(--gray-800-h);
                            }

                            input {
                                &[type="file"] {
                                    position: absolute !important;
                                    inset: 0 !important;
                                    z-index: 99;
                                    border-radius: 12px;
                                    border: 1.2px dashed rgba(32, 10, 2, 0.15);
                                    padding: 32px 28px;
                                    opacity: 0;
                                    width: 100%;
                                    height: 100%;
                                    cursor: pointer;
                                }
                            }

                        }

                        .gfield_description {
                            position: absolute;
                            left: 50%;
                            transform: translateX(-50%);
                            bottom: 24px;
                            margin: 0;
                            text-align: center;
                            font-size: 12px;
                            line-height: 150%;
                            font-weight: 500;
                            width: 100%;

                            &:not(.gform_fileupload_rules) {
                                font-weight: 500;
                                color: inherit;
                                top: 38%;
                                line-height: 120%;
                                font-weight: 600;
                                color: var(--gray-800-h);
                                font-size: 15px;
                                line-height: 120%;

                                &:before {
                                    content: '';
                                    display: block;
                                    margin: 0 auto 12px;
                                    width: 24px;
                                    height: 24px;
                                    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none'%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M4 5.344C4 3.48 5.61101 2 7.56201 2H12.9996C13.3393 2 13.6733 2.02419 14.0001 2.07095C14 3.05519 14 4.03943 14 5.02366C14.0001 5.51579 14.0001 6.00791 14.0001 6.50003C14.0001 7.32846 14.6716 8.00003 15.5001 8.00003C15.9922 8.00003 16.4843 8.00002 16.9764 8.00001C17.9607 7.99998 18.9449 7.99996 19.9291 8.00003C19.9758 8.32657 20 8.66038 20 8.99984V18.656C20 20.52 18.389 22 16.438 22H7.56201C5.61101 22 4 20.52 4 18.656V5.344Z' fill='%23FE6219'/%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M19.9292 7.99942C19.4907 4.93373 17.0658 2.50883 14.0001 2.07031C14 3.05456 14 4.03881 14 5.02305C14.0001 5.51518 14.0001 6.0073 14.0001 6.49942C14.0001 7.32785 14.6716 7.99942 15.5001 7.99942C15.9922 7.99942 16.4843 7.99941 16.9764 7.9994C17.9607 7.99937 18.9449 7.99935 19.9292 7.99942ZM8 8.99939C8 8.44739 8.448 7.99939 9 7.99939H10C10.552 7.99939 11 8.44739 11 8.99939C11 9.55139 10.552 9.9994 10 9.9994H9C8.448 9.9994 8 9.55139 8 8.99939ZM8 12.9994C8 12.4474 8.448 11.9994 9 11.9994H15C15.552 11.9994 16 12.4474 16 12.9994C16 13.5514 15.552 13.9994 15 13.9994H9C8.448 13.9994 8 13.5514 8 12.9994ZM8 16.9994C8 16.4474 8.448 15.9994 9 15.9994H15C15.552 15.9994 16 16.4474 16 16.9994C16 17.5514 15.552 17.9994 15 17.9994H9C8.448 17.9994 8 17.5514 8 16.9994Z' fill='%23F8F3F2'/%3E%3Cpath d='M14.0001 2.07031C17.0658 2.50883 19.4907 4.93373 19.9292 7.99942L16.9764 7.9994L15.5001 7.99942C14.6716 7.99942 14.0001 7.32785 14.0001 6.49942L14 5.02305L14.0001 2.07031Z' fill='%23D44C02'/%3E%3C/svg%3E");
                                }

                                span {
                                    color: var(--terracotta-300);
                                    text-decoration-line: underline;
                                    text-decoration-style: solid;
                                    text-decoration-skip-ink: none;
                                    text-decoration-thickness: 11%;
                                    text-underline-offset: 12%;
                                    text-underline-position: from-font;
                                }
                            }
                        }

                    }

                    &.gfield--type-consent {
                        .gfield_consent_label {
                            font-size: 12px;
                            line-height: 18px;
                        }

                        input {
                            &:checked {
                                background-color: var(--gray-50);
                                outline: none;
                                border-color: var(--gray-50);
                                outline: none;

                                &:before {
                                    color: var(--gray-800-h);
                                }
                            }

                            &:focus,
                            &:focus-visible {
                                box-shadow: none;
                            }
                        }
                    }

                    .ginput_container {

                        .gfield_checkbox {
                            .gchoice {
                                align-items: center;
                            }
                        }

                        input:not([type=checkbox]),
                        textarea,
                        select {
                            font-weight: 400;
                            color: var(--gray-600-p);
                            border-radius: 0;
                            background: var(--gray-0);
                            padding: 16px;
                            box-shadow: unset;
                            border-color: transparent;
                            border: 1.2px solid var(--gray-50);

                            font-size: 15px;
                            font-weight: 400;
                            line-height: 120%;
                            height: auto;

                            &:focus,
                            &:focus-visible {
                                outline: none;
                                border-color: var(--gray-800-h);

                                &::placeholder {
                                    color: var(--gray-800-h);
                                }
                            }

                        }

                        input[type=checkbox] {
                            --gf-local-radius: 8px;
                        }

                        textarea {
                            height: 200px;
                        }


                    }
                }
            }
        }

        .gform_footer {
            input {
                border: unset;
                outline: unset;
                border-radius: 0 !important;
                background-color: var(--brand-citron-50) !important;
                border: 1.2px solid var(--brand-citron-100);
                text-align: center;
                padding: 16px 24px !important;
                font-size: 15px !important;
                line-height: 120%;
                font-weight: 700 !important;
                color: var(--brand-citron-800) !important;
                transition: background-color .25s;
                width: 100% !important;
                box-shadow: none !important;

                &:hover {
                    opacity: .9;
                }
            }
        }
    }


}


.brxe-filter-radio {
    gap: 0;
    justify-content: center;

    li {
        label {
            span {
                border: unset;
            }
        }
    }
}

.brxe-post-content {
    p {
        margin: 16px 0 32px;
    }

    p:has(img) {
        margin: 0 !important;
    }

    p:first-child {
        margin-top: 0;
    }

    p:last-of-type {
        margin-bottom: 0;
    }


    ol,
    ul {
        margin-left: 20px;
        margin-top: 32px;
        margin-bottom: 32px;
        padding: 0;
    }

    h2 {
        font-size: var(--heading-lg);
        line-height: 1;
    }

    h3 {
        font-size: var(--heading-sm);
        line-height: 1;
    }

    h4 {
        font-size: var(--heading-xs);
        line-height: 1;
    }

}


.columns-2-dynamic {
    &.brxe-accordion-nested {
        .listening {
            background-color: transparent;
            border-bottom: 1px solid #E8E5DA;
            padding: 24px 0 24px 0;
            gap: 0;

            &:not(:last-child) {
                margin-bottom: 0;
            }

            .accordion-title-wrapper {
                min-height: auto !important;
                display: grid;
                grid-template-columns: 1fr 24px;

                h3 {
                    font-size: var(--heading-3xs);
                    line-height: 122.222%;
                    font-weight: 600;
                    font-family: var(--text-font);
                }
            }

            .accordion-content-wrapper {
                padding: 0 !important;
            }
        }
    }
}


.post-type-archive,
.single {
    #brx-footer {
        .brxe-section {
            background-color: var(--gray-24);
        }
    }
}

.pillar-page-parent-and-child {
    #brx-footer {
        .brxe-section {
            background-color: var(--gray-24);
        }
    }
}

.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    /* Smooth scroll for iOS */
    margin-bottom: 1.5rem;
}

/* Optional: Add a subtle shadow to indicate more content exists */
.table-container {
    background:
        linear-gradient(to right, white 30%, rgba(255, 255, 255, 0)),
        linear-gradient(to right, rgba(255, 255, 255, 0), white 70%) 0 100%,
        radial-gradient(farthest-side at 0 50%, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)),
        radial-gradient(farthest-side at 100% 50%, rgba(0, 0, 0, .2), rgba(0, 0, 0, 0)) 0 100%;
    background-repeat: no-repeat;
    background-color: white;
    background-size: 40px 100%, 40px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

table {
    width: 100%;
    border-collapse: collapse;
    color: var(--gray-600-p);
}

/* Header styling: No background, just bold text */
th {
    padding: 16px 24px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

thead {
    border-bottom: 0 !important;
}

.wp-block-table td,
.wp-block-table th {
    border: 0 !important;
}

/* First column styling: Bold and left-aligned */
td:first-child,
th:first-child {
    text-align: left;
    font-weight: 600;
    width: 25%;
    /* Adjust based on your content */
}

/* Data cell styling */
td {
    padding: 16px 24px;
    text-align: center;
    line-height: 1.5;
    font-size: 14px;
    vertical-align: middle;
}

/* The alternating row blocks */
/* This colors the 1st, 3rd, etc. rows in the body */
tbody tr:nth-child(even) {
    background-color: var(--gray-24);
    /* Light cream/beige background */
}

body{
    &.has-saved-lo {
        .header-phone,
        .header-buttons {
            display: none !important;
        }

        .header-white {
            #lo-widget-desktop {
                border: 1.2px solid var(--Gray-50, #E8E5DA);
                background: var(--Gray-0, #FFF);
            }
            #lo-desktop-name {
                color: var(--gray-800-h);
            }
        }
    }

    &:not(.has-saved-lo) {
        .single-loan-header-button {
            display: none !important;
        }
    }
}


.infinite-carousel {
    display: block;
    width: 100%;
    visibility: visible;
    opacity: 1;

    &:focus-visible,
    &:focus-within {
        outline: none !important;
    }

    .flickity-viewport {
        transition: height 0.2s;
        /* Smooth height transition if slides differ */
        min-height: 350px;
        /* Match your slide min-height */

        &:focus-visible,
        &:focus-within {
            outline: none !important;
        }
    }

    &:before {
        content: '';
        display: inline-block;
        width: 76px;
        height: 100%;
        background: linear-gradient(90deg, #F6F6F5 0%, rgba(246, 246, 245, 0.00) 100%);
        position: absolute;
        left: 0;
        top: 0;
        z-index: 1;
    }

    &:after {
        content: '';
        display: inline-block;
        width: 76px;
        height: 100%;
        background: linear-gradient(-90deg, #F6F6F5 0%, rgba(246, 246, 245, 0.00) 100%);
        position: absolute;
        right: 0;
        top: 0;
        z-index: 1;
    }

    .slide {
        width: 358px !important;
        min-height: 343px !important;
        margin-right: 12px;
        /* Ensure the cell doesn't collapse */
        display: flex;
        flex-direction: column;

        @media(max-width: 768px) {
            margin-right: 8px;
        }
    }
}