.stellar-cf7-submit-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    height: 60px;
    width: fit-content;
    margin: 0 auto;

    p {
        display: flex;
    }

    .wpcf7-spinner {
        display: none !important;
    }
}

.stellar-cf7-submit-wrapper input[type="submit"] {
    background: transparent !important;
    border: none !important;
    color: var(--stellar-main-color, #ffffff);
    font-size: 24px;
    font-family: inherit;
    cursor: pointer;
    padding: 0 40px;
    height: 100%;
    width: 100%;
    transition: 0.3s;
    -webkit-appearance: none;
    appearance: none;
    z-index: 2;
    position: relative;
}

@media (max-width: 1024px) {
    .stellar-cf7-submit-wrapper input[type="submit"] {
        font-size: 19px;
    }
}

.stellar-cf7-submit-wrapper:before {
    width: calc(100% + 80px);
    height: 53px;
    background-color: var(--stellar-before-color, #ACC843);
    content: '';
    display: block;
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%) rotate(-2.5deg);
    z-index: -1;
    transition: 0.3s;
}

.stellar-cf7-submit-wrapper:after {
    width: calc(100% + 160px);
    height: 44px;
    background-color: var(--stellar-after-color, #34AE9C);
    content: '';
    display: block;
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%) rotate(2.5deg);
    z-index: -2;
    transition: 0.3s;
}

@media (max-width: 1024px) {
    .stellar-cf7-submit-wrapper:before {
        width: calc(100% + 60px);
        height: 43px;
        top: 2px;
    }

    .stellar-cf7-submit-wrapper:after {
        width: calc(100% + 100px);
        height: 34px;
        bottom: -2px;
    }
}

@media (max-width: 768px) {
    .stellar-cf7-submit-wrapper:before {
        width: calc(100% + 40px);
        height: 37px;
        top: 4px;
    }

    .stellar-cf7-submit-wrapper:after {
        width: calc(100% + 80px);
        height: 30px;
        bottom: 0px;
    }
}

.stellar-cf7-submit-wrapper:hover:after {
    transform: translateX(-50%) rotate(0deg);
}

.stellar-cf7-submit-wrapper:hover:before {
    transform: translateX(-50%) rotate(0deg);
}

.stellar-cf7-layout .footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-top: 20px;

    @media (max-width: 1500px) {
        flex-direction: column;
    }
}

.stellar-cf7-layout .footer-row .legal-col {
    max-width: 40%;
    font-size: 12px;

    @media (max-width: 1500px) {
        max-width: 100%;
    }
}

.stellar-cf7-layout .footer-row .submit-col {
    flex-shrink: 0;
    padding-right: 80px;

    @media (max-width: 1500px) {
        padding: 0px;
    }
}

@media (max-width: 768px) {
    .stellar-cf7-layout .footer-row {
        flex-direction: column;
        align-items: stretch;
        gap: 30px;
    }

    .stellar-cf7-layout .footer-row .legal-col {
        max-width: 100%;
        text-align: center;
    }
}

.stellar-cf7-icon-wrapper {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: none;
    z-index: 3;
}

.stellar-cf7-icon-wrapper svg {
    width: 100%;
    height: 100%;
}

.stellar-cf7-icon-wrapper svg circle {
    stroke: var(--stellar-main-color, #ffffff);
}

.stellar-cf7-icon-wrapper svg path {
    fill: var(--stellar-main-color, #ffffff);
}

@media (max-width: 1024px) {
    .stellar-cf7-icon-wrapper {
        width: 50px;
        height: 50px;
    }
}

@media (max-width: 768px) {
    .stellar-cf7-icon-wrapper {
        width: 40px;
        height: 40px;
    }
}

.stellar-cf7-submit-wrapper input[type="submit"] {
    padding-right: 70px;
}

.stellar-cf7-layout {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.stellar-cf7-layout .form-row {
    margin-bottom: 15px;
    /* width: 100%;
    max-width: 500px; */
}

.stellar-cf7-layout input[type="text"],
.stellar-cf7-layout input[type="email"],
.stellar-cf7-layout input[type="tel"],
.stellar-cf7-layout textarea {
    width: 100%;
    background-color: #ffffff;
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-size: 18px;
    color: #333333;
    font-family: inherit;
    outline: none;
    transition: border-color 0.3s ease;
}

.stellar-cf7-layout textarea {
    min-height: 250px;
    resize: none;
}

.stellar-cf7-layout input::placeholder,
.stellar-cf7-layout textarea::placeholder {
    color: #999999;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.stellar-cf7-layout .input-container {
    position: relative;
}

.stellar-cf7-layout .textarea-container {
    position: relative;
}

.stellar-cf7-layout input.wpcf7-not-valid,
.stellar-cf7-layout textarea.wpcf7-not-valid {
    border-color: #dc3232 !important;
}

.wpcf7-not-valid-tip {
    display: none !important;
}

.stellar-cf7-layout .footer-row .wpcf7-not-valid-tip {
    display: none !important;
}

.stellar-cf7-layout .wpcf7-list-item {
    margin: 0;
}

.stellar-cf7-layout .wpcf7-list-item label {
    display: flex;
    align-items: center;
}

.stellar-cf7-layout .wpcf7-list-item-label {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    line-height: 1.6;
    cursor: pointer;
    text-align: left;
}

.stellar-cf7-layout .wpcf7-list-item-label a {
    text-decoration: underline;
    transition: opacity 0.3s ease;
    font-size: 14px;
}

.stellar-cf7-layout .wpcf7-list-item-label a:hover {
    opacity: 0.8;
}

.stellar-cf7-layout input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    background-color: #ffffff;
    width: 45px;
    height: 45px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /* kept for fallback or if flex is still active, but critical is absolute on after */
    overflow: hidden;
}

.stellar-cf7-layout input[type="checkbox"]:checked::after {
    content: '';
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 10px;
    border-left: 3px solid var(--stellar-main-color, #ACC843);
    border-bottom: 3px solid var(--stellar-main-color, #ACC843);
    transform: translate(-50%, -65%) rotate(-45deg);
    /* Adjusted translate to visual center */
}

.stellar-cf7-layout .footer-row {
    align-items: center;
    margin-top: 30px;
}

.stellar-cf7-layout .footer-row .legal-col {
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {

    .stellar-cf7-layout input[type="text"],
    .stellar-cf7-layout input[type="email"],
    .stellar-cf7-layout textarea {
        font-size: 16px;
        padding: 15px;
    }

    .stellar-cf7-layout textarea {
        min-height: 180px;
    }
}

.wpcf7-response-output {
    display: none !important;
}

.form-text-column {
    width: 100%;
    max-width: 320px;

    .contact-form-heading {
        font-size: 32px !important;
    }

    .contact-form-subheading {
        font-size: 28px !important;
    }
}

.contact-form-columns {
    display: flex;
    justify-content: center;
    align-items: start;
    /* Default for desktop > 1200px based on existing classes but reinforcing here if needed, or just let WP classes handle desktop */
}

@media (max-width: 1200px) {
    .contact-form-columns {
        display: grid !important;
        /* Override WP flex styles */
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }

    .contact-form-columns .form-text-column {
        order: 1;
        width: 100%;
        max-width: 100%;
    }

    /* Remove top margin from first child of text columns to align perfectly */
    .contact-form-columns .form-text-column>*:first-child {
        margin-top: 0;
    }

    .contact-form-columns .stellar-contact-form-container,
    .contact-form-columns .wp-block-stellar-theme-contact-form-container {
        order: 2;
        grid-column: 1 / -1;
        margin-top: 20px;
    }
}

@media (max-width: 768px) {
    .contact-form-columns {
        grid-template-columns: 1fr;
        gap: 60px;
        /* Increased gap for clear separation on mobile */
    }
}