/* Editor overflow fix for get started today block */
.block-editor-block-list__layout .get-started-today-block,
.editor-styles-wrapper .get-started-today-block,
.wp-block-acf-get-started-today .get-started-today-block {
    max-width: 100%;
    overflow-x: hidden;
}

.get-started-today-block {
    background-color: #F0F1F2; /* Page bg per mobile screenshot */
    padding: 0;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.get-started-today-content {
    max-width: 100%;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    min-width: 0;
}

.get-started-today-form {
    background-color: var(--form-bg-color, #F0F1F2); /* Use CSS variable with fallback */
    padding: 80px 60px 80px 150px; /* Standard 150px left padding */
    box-sizing: border-box;
    min-width: 0;
    max-width: 100%;
    overflow-x: hidden;
    width: 100%;
}

/* Adjust padding for reversed layout (form on right) */
.layout-reversed .get-started-today-form {
    padding: 80px 150px 80px 60px; /* 150px right padding, 60px left padding */
}

/* Contact Form 7 Checkbox Alignment */
.get-started-today-block .wpcf7-list-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    /* Ensure the list item and label are clickable */
    pointer-events: auto;
    cursor: pointer;
   /* padding-left: 16px;  Add indent spacing */
}

/* Make sure the label wrapper is clickable */
.get-started-today-block .wpcf7-list-item label {
    cursor: pointer;
    pointer-events: auto;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.get-started-today-block .wpcf7-list-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    align-self: flex-start;
    position: relative;
    top: 7px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    background-color: transparent;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid #ACB4BC;
    border-radius: 2px;
    outline: none;
    transition: background-image 0.2s ease, border-color 0.2s ease;
    /* Ensure checkbox is clickable and functional */
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
    /* Make sure it's not hidden */
    visibility: visible;
    display: block;
}

/* Checked state on light background - use dark checkbox with checkmark (per Figma) */
.get-started-today-block .wpcf7-list-item input[type="checkbox"]:checked {
    background-image: url('../../../images/select_check_box_dark.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

/* Dark background - unchecked state (empty checkbox with border) */
.form-dark-bg .wpcf7-list-item input[type="checkbox"] {
    background-image: none;
    background-color: transparent;
    border: 1px solid #FFFFFF;
}

/* Dark background - checked state (with checkmark) */
.form-dark-bg .wpcf7-list-item input[type="checkbox"]:checked {
    background-image: url('../../../images/select_check_box_white.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

.wpcf7-list-item-label {
    font-size: 12px;
    color: #28323C;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
    line-height: 22px;
}

/* Add indent spacing using pseudo-elements */
.get-started-today-block .wpcf7-list-item-label::before,
.get-started-today-block .wpcf7-list-item-label::after {
    content: " ";
    
}

.get-started-today-block .wpcf7-list-item-label p {
    margin: 0;
    line-height: 1.4;
    display: inline;
}
span.label-inner a {
    color: #58a430;
}

/* Align content with 1728px container on large screens */
@media (min-width: 1729px) {
    .get-started-today-form {
        padding-left: calc((100vw - 1728px) / 2 + 150px); /* Match container alignment: centered container + 150px padding */
    }
    
    /* Reversed layout: form on right */
    .layout-reversed .get-started-today-form {
        padding-left: 60px;
        padding-right: calc((100vw - 1728px) / 2 + 150px);
    }
}

/* Prevent overflow on medium-large desktop screens */
@media (min-width: 1281px) and (max-width: 1728px) {
    .get-started-today-form {
        padding-left: min(150px, 10vw);
        padding-right: min(60px, 5vw);
    }
    
    /* Reversed layout: form on right */
    .layout-reversed .get-started-today-form {
        padding-left: min(60px, 5vw);
        padding-right: min(150px, 10vw);
    }
}

.get-started-today-heading {
    font-size: 32px; /* Desktop */
    font-weight: 400;
    color: #141A1E;
    margin: 0 0 20px 0;
    line-height: 1.2;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.get-started-today-description {
    font-size: 16px;
    color: #28323C;
    margin: 0 0 40px 0;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Dark background text color adjustments */
/* When dark background is selected, make text white for both Form Left and Form Right layouts */
.form-dark-bg .get-started-today-heading,
.form-dark-bg .get-started-today-description {
    color: #FFFFFF !important;
}

/* CF7 label text color for dark backgrounds */
.form-dark-bg .wpcf7-list-item-label,
.form-dark-bg .wpcf7-list-item-label p,
.form-dark-bg .get-started-today-block label,
.form-dark-bg .label-inner,
.form-dark-bg .wpcf7-form label {
    color: #FFFFFF !important;
}

/* Contact Form 7 Response Output Styling for Dark Background */
.form-dark-bg .wpcf7-response-output {
    color: #FFFFFF !important;
}

/* Ensure dark background styling works on mobile for both layouts */
@media (max-width: 768px) {
    .form-dark-bg .get-started-today-heading,
    .form-dark-bg .get-started-today-description {
        color: #FFFFFF !important;
    }
    
    .form-dark-bg .wpcf7-list-item-label,
    .form-dark-bg .wpcf7-list-item-label p,
    .form-dark-bg .get-started-today-block label,
    .form-dark-bg .label-inner,
    .form-dark-bg .wpcf7-form label {
        color: #FFFFFF !important;
    }
    
    .form-dark-bg .wpcf7-response-output {
        color: #FFFFFF !important;
    }
}

.get-started-today-form-fields {
    display: flex;
    flex-direction: column;
    gap: 24px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.get-started-today-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    /* padding-bottom: 16px; */
}

.get-started-today-form-field {
    display: flex;
    flex-direction: column;
    min-width: 0;
    box-sizing: border-box;
}

.get-started-today-form-field input,
.get-started-today-form-field select {
    width: 100%;
    max-width: 100%;
    height: 56px;
    padding: 16px;
    border: 1px solid #ACB4BC; /* Medium Gray */
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    background-color: #FFFFFF;
    color: #141A1E;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    box-sizing: border-box;
    min-width: 0;
}

.get-started-today-form-field input:focus,
.get-started-today-form-field select:focus {
    outline: none;
    border-color: #007ACC; /* Primary Two */
    box-shadow: 0 0 0 3px rgba(0, 122, 204, 0.15);
}

.get-started-today-form-field input::placeholder {
    color: #6C757D;
}

.get-started-today-form-field select {
    cursor: pointer;
    background-image: url('../../../images/arrow_drop_down.png');
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 30px;
    padding-right: 35px;
    appearance: none;
}

.get-started-today-form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
   /* padding-left: 16px; /* Add indent spacing */
    /* margin: 20px 0; */
}

.get-started-today-form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
    margin-top: 0;
    align-self: flex-start;
    position: relative;
    top: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: none;
    background-color: transparent;
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: 1px solid #ACB4BC;
    border-radius: 2px;
    outline: none;
    transition: background-image 0.2s ease, border-color 0.2s ease;
    /* Ensure checkbox is clickable and functional */
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
    visibility: visible;
    display: block;
}

/* Checked state on light background - use dark checkbox with checkmark (per Figma) */
.get-started-today-form-checkbox input[type="checkbox"]:checked {
    background-image: url('../../../images/select_check_box_dark.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

/* Dark background - unchecked state (empty checkbox with border) */
.form-dark-bg .get-started-today-form-checkbox input[type="checkbox"] {
    background-image: none;
    background-color: transparent;
    border: 1px solid #FFFFFF;
}

/* Dark background - checked state (with checkmark) */
.form-dark-bg .get-started-today-form-checkbox input[type="checkbox"]:checked {
    background-image: url('../../../images/select_check_box_white.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    border: none;
}

.get-started-today-disclaimer {
    font-size: 12px;
    color: #28323C;
    line-height: 1.4;
    margin: 0;
    cursor: pointer;
    word-wrap: break-word;
    overflow-wrap: break-word;
    flex: 1;
}

.get-started-today-disclaimer p {
    margin: 0;
    line-height: 1.4;
    display: inline;
}

.get-started-today-disclaimer p {
    margin: 0;
}

.get-started-today-submit {
    width: 100%;
    max-width: 245px;
    background-color: #58A430; /* Secondary Two */
    color: #FFFFFF;
    border: none;
    border-radius: 100px;
    padding: 19px 32px;
    font-size: 18px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.15s ease-in-out;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    position: relative;
    /* margin-top: 20px; */
}

/* Add arrow icon after button text for custom form */
.get-started-today-submit::after {
    content: '';
    width: 14px;
    height: 14px;
    background-image: url('../../../images/arrow_forward_white.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    opacity: 1;
    filter: brightness(1) contrast(1);
    margin-left: 8px;
}

/* Remove arrow if it's already in the content (from previous implementation) */
.get-started-today-submit img.get-started-today-submit-arrow {
    display: none;
}

/* CF7 Submit Button - Add arrow icon */
.get-started-today-block .wpcf7-submit,
.get-started-today-block input[type="submit"].wpcf7-submit {
    position: relative;
}

.get-started-today-block .wpcf7-submit::after,
.get-started-today-block input[type="submit"].wpcf7-submit::after {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url('../../../images/arrow_forward_white.png');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    display: inline-block;
    opacity: 1;
    filter: brightness(1) contrast(1);
    margin-left: 8px;
    vertical-align: middle;
}

.get-started-today-submit:hover {
    background-color: #5BA326;
}

.get-started-today-submit:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(108, 185, 44, 0.25);
}

.get-started-today-image {
    background-color: #E9ECEF;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    min-width: 0;
}

.get-started-today-image img {
    width: 100%;
    max-width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    min-width: 0;
}

.get-started-today-image-placeholder {
    color: #6C757D;
    font-size: 1.2rem;
    font-weight: 500;
}

/* WYSIWYG Content Styles */
.get-started-today-wysiwyg-content {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
}

/* Make iframes responsive and fit the container */
.get-started-today-wysiwyg-content iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 400px;
    border: 0;
    display: block;
}

/* Responsive iframe heights */
@media (min-width: 769px) and (max-width: 1023px) {
    /* Tablet: Maintain 4:3 aspect ratio */
    .get-started-today-wysiwyg-content iframe {
        aspect-ratio: 4 / 3;
        min-height: 500px;
        max-height: 600px;
        width: 100%;
    }
}

@media (min-width: 1024px) {
    .get-started-today-wysiwyg-content iframe {
        min-height: 696px;
        width: 100%;
        min-width: 950px;
    }
}



/* General content styling within WYSIWYG */
.get-started-today-wysiwyg-content p,
.get-started-today-wysiwyg-content h1,
.get-started-today-wysiwyg-content h2,
.get-started-today-wysiwyg-content h3,
.get-started-today-wysiwyg-content h4,
.get-started-today-wysiwyg-content h5,
.get-started-today-wysiwyg-content h6 {
    margin: 0 0 1em 0;
    padding: 0 20px;
}

.get-started-today-wysiwyg-content img:not([class*="wp-image"]) {
    max-width: 100%;
    height: auto;
    display: block;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Block Alignment Support */
.get-started-today-block.alignwide {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.get-started-today-block.alignfull {
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* Fix for editor - prevent overflow */
.block-editor-block-list__layout .get-started-today-block.alignfull,
.editor-styles-wrapper .get-started-today-block.alignfull,
.wp-block-acf-get-started-today .get-started-today-block.alignfull {
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
}

/* Responsive Design */
@media (min-width: 1024px) and (max-width: 1280px)  {
    .get-started-today-form {
        padding: 80px min(60px, 5vw) 80px min(40px, 4vw);
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    /* Tablet styles here */
    .get-started-today-form {
        padding: 80px min(50px, 6vw) 80px min(50px, 6vw); /* Responsive padding on both sides for tablet view */
        max-width: 100%;
        box-sizing: border-box;
    }
}

@media (max-width: 768px) {
    .get-started-today-content { 
        grid-template-columns: 1fr; 
        max-width: 100%;
        overflow-x: hidden;
    }
    .get-started-today-form {
        padding: 60px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        max-width: 100%;
        width: 100%;
        box-sizing: border-box;
    }
    /* Mobile styles for Image Left / Form Right layout */
    .layout-reversed .get-started-today-form {
        align-items: flex-start;
        padding: 60px 16px;
    }
    /* Shared text width on mobile - responsive */
    .get-started-today-heading,
    .get-started-today-description { 
        width: 100%;
        max-width: 344px;
        box-sizing: border-box;
    }
    /* Remove max-width constraint for Image Left / Form Right layout on mobile */
    .layout-reversed .get-started-today-heading,
    .layout-reversed .get-started-today-description {
        max-width: 100%;
        width: 100%;
    }
    /* Ensure form fields are left-aligned for Image Left / Form Right layout */
    .layout-reversed .get-started-today-form-fields {
        align-items: flex-start;
        width: 100%;
    }
    .get-started-today-heading { 
        font-size: 32px; 
        line-height: 1.25; 
        margin-bottom: 16px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    .get-started-today-description { 
        margin-bottom: 24px;
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
    /* Center submit button on mobile for default layout */
    .get-started-today-submit {
        display: block;
        margin: 0px auto 0;
        width: 100%;
        max-width: 240px;
        box-sizing: border-box;
    }
    /* Left-align submit button for Image Left / Form Right layout on mobile */
    .layout-reversed .get-started-today-submit {
        
        width: 100%;
        max-width: 240px;
    }
    .get-started-today-form-row { 
        grid-template-columns: 1fr; 
        gap: 16px;
        width: 100%;
        max-width: 100%;
    }
    /* Keep state + zipcode in a two-column row (Row 3) - only if space allows */
    .get-started-today-form-row:nth-of-type(3) { 
        grid-template-columns: 1fr 1fr; 
        gap: 16px;
    }
    .get-started-today-image { display: none; }
}


@media (max-width: 480px) {
    .get-started-today-form { 
        padding: 40px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    /* Make heading/description fully responsive on very small screens */
    .get-started-today-heading,
    .get-started-today-description {
        max-width: 100%;
        width: 100%;
        padding: 0 8px;
        box-sizing: border-box;
    }
    .get-started-today-heading {
        font-size: clamp(24px, 6vw, 32px);
    }
    /* Stack state and zipcode on very small screens */
    .get-started-today-form-row:nth-of-type(3) {
        grid-template-columns: 1fr;
    }
    .get-started-today-submit {
        max-width: 240px;
        width: 100%;
    }
}

/* Extra small devices - prevent any overflow */
@media (max-width: 320px) {
    .get-started-today-form {
        padding: 32px 12px;
    }
    .get-started-today-heading,
    .get-started-today-description {
        padding: 0 4px;
    }
    .get-started-today-form-fields {
        gap: 20px;
    }
    .get-started-today-form-row {
        gap: 12px;
    }
}

/* Editor Preview Styles */
.wp-block-acf-get-started-today .get-started-today-block {
    border: 2px dashed #ccc;
    position: relative;
}

.wp-block-acf-get-started-today .get-started-today-block::after {
    content: "📝 Get Started Today - Contact form with image";
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    font-size: 11px;
    border-radius: 4px;
    z-index: 10;
    font-weight: 500;
    max-width: 280px;
    text-align: center;
    line-height: 1.3;
}

/* Hide CF7 Akismet honeypot field on frontend for this block */
.get-started-today-block label > textarea[name="_wpcf7_ak_hp_textarea"],
.get-started-today-block textarea[name="_wpcf7_ak_hp_textarea"],
.get-started-today-block [name="_wpcf7_ak_hp_textarea"] {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

