/* Color Variables */
:root {
    --pink: #f299c2;
    --blue: #b1eaee;
    --lightPurple: #eeeaf2;
    --light: #fff;
    --dark: #27102c;
    --btnPurple: #6833c2;
    --desktopHeaderMaxWidth: 1264px;
    --desktopHeaderHeight: 86px;
    --mobileHeaderHeight: 64px;
}

/* Squiggle Animation */
@keyframes drawSquiggle {
    to {
        stroke-dashoffset: 0;
    }
}

/* General Heading Styles */
.heading {
    display: flex;
    flex-direction: column;
    gap: 1rem;

    &.centered {
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    &.light {
        h1,
        h2,
        h3,
        h4,
        h5,
        h6,
        p {
            color: var(--light);
        }
    }
}

/* Container Dual Columns */
.container {
    &.dualCols {
        display: flex;
        flex-direction: column;

        @media (width >=1024px) {
            flex-direction: row;
            align-items: center;
            justify-content: space-between;

            > div {
                width: 50%;
            }
        }
    }
}

/* Contact Us Banner Styles */
.contactUsBanner {
    background-size: contain;
    background-position: center 5%;
    background-repeat: no-repeat;
    position: relative;

    @media (width >=768px) {
        background-position: center;
    }

    &::before {
        content: "";
        position: absolute;
        z-index: 0;
        bottom: 0;
        right: 0;
        left: 0;
        margin: auto;
        background: #edfafa;
        width: 100%;
        height: 2.5rem;
        border-radius: 1.5rem 1.5rem 0 0;

        @media (width >=768px) {
            border-radius: 5rem 5rem 0 0;
        }
    }

    .container {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-bottom: 8.5rem;
        width: 100%;

        @media (width >=1024px) {
            flex-flow: row nowrap;
            justify-content: space-between;
            gap: 0;
            min-height: calc(55vh + var(--desktopHeaderHeight));
        }
    }

    /* Heading Column */
    .headingCol {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;

        .heading {
            gap: 0.125rem;
        }

        /* Squiggle Animation */
        .hasSquiggleAnimation {
            color: var(--pink);
            width: 100%;
            height: 1.5rem;

            @media (width >=768px) {
                height: 2.25rem;
            }

            polyline {
                stroke-dasharray: 1500;
                stroke-dashoffset: 1500;
                animation: drawSquiggle 1s ease-in-out forwards;
                animation-play-state: paused;
            }
        }

        /* Title Logos */
        .titleLogos {
            display: flex;
            flex-flow: row wrap;
            align-items: center;
            justify-content: center;
            gap: 1rem;

            @media (width >=768px) {
                gap: 1.5rem;
            }

            .titleLogo {
                width: 4rem;
                height: 4rem;

                @media (width >=768px) {
                    width: 5rem;
                    height: 5rem;
                }

                @media (width >=1024px) {
                    width: 6rem;
                    height: 6rem;
                }

                img {
                    width: 100%;
                    height: 100%;
                    object-fit: contain;
                }
            }
        }
    }

    /* Form Column */
    .formCol {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;

        h3 {
            color: var(--light);
            margin-bottom: 0;
            font-weight: 600;
        }
    }

    /* Start Animation on In-View */
    &.in-view .headingCol .hasSquiggleAnimation polyline {
        animation-play-state: running;
    }
}

/* Contact Form Styles */
.contactForm_wrapper {

    .gform_heading {
        display: none;
    }

    .gform_fields {
        display: flex;
        flex-flow: row wrap;
        gap: 1rem;
        width: 100%;
    }

    .gfield .gfield_label {
        display: none !important;
    }

    .gfield {
        width: 100%;
    }

    .gfield--width-half {
        @media (width >= 1200px) {
            width: calc(50% - 0.5rem);
        }
    }

    /* Input and Textarea Styles */
    .gfield:not(.gfield--type-captcha):not(.gfield--type-consent) {
        input,
        textarea {
            width: 100% !important;
            background-repeat: no-repeat;
            background-size: 1rem;
            background-position: 0.75rem center;
            text-indent: 1rem;
            padding: 1rem !important;
            background-color: var(--light);
            border: 2px solid var(--light);
            transition: border-color 0.25s ease;

            &:focus {
                border-color: var(--pink);
                outline: none;
            }

            &:-webkit-autofill {
                -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
                -webkit-text-fill-color: #000000 !important;
            }
        }

        &.gfield--type-text {
            input {
                background-image: url("/wp-content/uploads/2025/11/user.svg");
            }
        }

        &.gfield--type-email {
            input {
                background-image: url("/wp-content/uploads/2025/11/envelope.svg");
            }
        }

        &.gfield--type-phone {
            input {
                background-image: url("/wp-content/uploads/2025/11/phone.svg");
            }
        }

        &.gfield--type-textarea {
            textarea {
                background-image: url("/wp-content/uploads/2025/11/note-pencil.svg");
                background-position: 0.75rem 1.15rem;
            }
        }
    }

    /* Consent Field Styles */
    .gfield--type-consent {
        .ginput_container_consent {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 0.5rem;

            input,
            label {
                padding: 0;
                margin: 0;
            }

            label {
                color: var(--light);

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

    /* Submit Button Styles */
    .gform-footer {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
        margin: 1rem auto;

        input[type="submit"] {
            min-width: 12.5rem;
            background-color: var(--btnPurple);
            border: 2px solid var(--btnPurple);
            color: var(--light);
            padding: 1rem 2rem;
            cursor: pointer;
            font-size: 1rem;
            line-height: 1rem !important;
            height: auto !important;
            min-height: unset !important;
            transition: background-color 0.3s ease;

            @media (width >=768px) {
                min-width: auto;
            }

            &:hover {
                background-color: #4b2396;
            }
        }
    }
}

/* Trustpilot Section Styles */
.trustpilot-section.overlaysBanner {
    position: relative;
    z-index: 1;
    margin: auto;

    .container {
        position: absolute;
        top: -7.5rem;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 90%;
        margin-right: auto;
        margin-left: auto;
        background: var(--light);
        border-radius: 1.5rem;
        padding: 2rem 1.5rem;
        box-shadow: 2px 4px 40px 0 rgba(0, 0, 0, 0.1);

        @media (width >=1200px) {
            max-width: var(--desktopHeaderMaxWidth);
        }
    }
}

/* Visit Our Offices Section */
.visitOurOffices {
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;

    .container {
        display: flex;
        flex-direction: column;
        padding-top: 7.5rem;
        padding-bottom: 7.5rem;
        gap: 1.5rem;

        @media (width >=1024px) {
            padding-top: 10rem;
            gap: 3rem;
        }
    }
}

.officesGrid {
    display: flex;
    flex-flow: row wrap;
    justify-content: center;
    gap: 3rem 1.5rem;

    @media (width >=1024px) {
        justify-content: space-between;
    }

    > div {
        flex: 1 0 100%;

        @media (width >=768px) {
            flex: 0 0 calc(50% - 1.5rem);
        }

        @media (width >=1024px) {
            flex: 1 0 calc(33.3333% - 1.5rem);
        }
    }

    .officeGridItem {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 2rem;
        padding: 2rem;
        border: 2px solid var(--dark);
        border-radius: 1rem;
        transition: all 0.25s ease;

        @media (width >=768px) {
            padding: 3rem;
        }

        @media all {
            padding-bottom: 0;
        }

        &:hover {
            transform: translateY(-0.25rem);
            box-shadow: 4px 4px 0 0 var(--dark);
        }

        h3 {
            font-weight: 700;
            margin-bottom: 0;
        }

        .contactInfoItems {
            display: flex;
            flex-direction: column;
            gap: 1.5rem;
        }

        .contactInfoItem {
            display: flex;
            flex-flow: row nowrap;
            align-items: stretch;
            gap: 0.5rem;

            .contactInfoIcon {
                flex-shrink: 0;
                display: flex;
                justify-content: center;
                align-items: center;
                width: 2rem;
                height: 2rem;
                border-radius: 50%;
                background: var(--dark);

                @media (width >=768px) {
                    width: 2.5rem;
                    height: 2.5rem;
                }

                svg {
                    width: 50%;
                    height: 50%;
                }
            }

            .contactInfo {
                display: flex;
                flex-direction: column;
                gap: 0.25rem;

                .contactInfoTitle {
                    font-size: 0.875rem;
                    font-weight: 700;
                    margin: 0;

                    @media (width >=768px) {
                        font-size: 1rem;
                    }
                }

                .contactLink {
                    font-size: 0.875rem;
                    line-height: 125%;
                }
            }
        }

        .mapsEmbed {
            display: flex;
            justify-content: center;
            align-items: center;
            width: 100%;
            height: 10rem;
            overflow: hidden;
            border: 2px solid var(--dark);
            border-radius: 1.5rem;

            iframe {
                width: 100%;
                height: 100%;
                border: none;
            }
        }

        .button {
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 0 1rem;
            height: 3rem;
            border-radius: 2rem;
            border: 2px solid var(--dark);
            margin-bottom: -1.5rem;
            background-color: var(--dark);
            color: var(--light);
            font-size: 0.875rem;
            font-family: inherit;
            font-weight: 700;
            line-height: 100%;
            text-transform: uppercase;
        }

        &.officeGridItemLondon {
            background: var(--pink);

            .contactInfoIcon {
                color: var(--pink);
            }
        }

        &.officeGridItemManchester {
            background: var(--blue);

            .contactInfoIcon {
                color: var(--blue);
            }
        }

        &.officeGridItemLiverpool {
            background: var(--lightPurple);

            .contactInfoIcon {
                color: var(--lightPurple);
            }
        }
    }
}