/* Local Business AI Writer generated article styling.
   Scoped to generated content so it does not redesign the whole theme. */

.lbai-generated-content,
.post_content_container {
    text-align: justify;
    text-justify: inter-word;
    line-height: 1.75;
}

.lbai-generated-content p,
.post_content_container p {
    text-align: justify;
    text-justify: inter-word;
    margin: 0 0 1.15em;
}

.lbai-generated-content h2,
.post_content_container h2 {
    font-size: 1.75em;
    line-height: 1.25;
    font-weight: 700;
    margin: 1.6em 0 0.65em;
}

.lbai-generated-content h3,
.post_content_container h3 {
    font-size: 1.35em;
    line-height: 1.3;
    font-weight: 700;
    margin: 1.35em 0 0.55em;
}

.lbai-generated-content h2:first-child,
.post_content_container h2:first-child,
.lbai-generated-content h3:first-child,
.post_content_container h3:first-child {
    margin-top: 0;
}


.lbai-generated-content ul,
.post_content_container ul,
.lbai-generated-content ol,
.post_content_container ol {
    margin: 0 0 1.25em 1.35em;
    padding-left: 1.25em;
    text-align: justify;
    text-justify: inter-word;
}

.lbai-generated-content ul,
.post_content_container ul {
    list-style-type: disc;
}

.lbai-generated-content li,
.post_content_container li {
    text-align: justify;
    text-justify: inter-word;
    margin: 0 0 0.55em;
    line-height: 1.75;
}

.lbai-generated-content .inserted_image,
.post_content_container .inserted_image,
.inserted_image {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 1.75em auto;
}


.lbai-generated-content .lbai-image-placeholder,
.post_content_container .lbai-image-placeholder,
.lbai-image-placeholder {
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin: 1.75em auto;
    padding: 1.25em;
    border: 2px dashed #c7c7c7;
    border-radius: 6px;
    background: #f8f8f8;
    color: #666;
    font-size: 0.95em;
    text-align: center;
    text-justify: auto;
}

/* Phase 1.6: generated article CTA banner / contact form block. */
.lbai-generated-content .lbai-cta-banner,
.post_content_container .lbai-cta-banner,
.lbai-cta-banner {
    box-sizing: border-box;
    width: 100%;
    margin: 3em auto 2em auto !important;
    padding: 1.6em !important;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 8px;
    background: #faf8f4;
    text-align: center;
    text-justify: auto;
    clear: both !important;
    display: block !important;
}

.lbai-generated-content .lbai-cta-title,
.post_content_container .lbai-cta-title,
.lbai-cta-title {
    margin: 0 0 0.7em !important;
    font-size: 1.35em;
    line-height: 1.25;
    font-weight: 700;
    text-align: center;
    text-justify: auto;
}

.lbai-generated-content .lbai-cta-text,
.post_content_container .lbai-cta-text,
.lbai-cta-text {
    margin: 0 auto 1.2em !important;
    max-width: 760px;
    text-align: center;
    text-justify: auto;
}

.lbai-generated-content .lbai-cta-action,
.post_content_container .lbai-cta-action,
.lbai-cta-action {
    margin: 0.75em 0 1em;
    text-align: center;
    text-justify: auto;
}

.lbai-generated-content .lbai-cta-button,
.post_content_container .lbai-cta-button,
.lbai-cta-button {
    display: inline-block;
    padding: 0.7em 1.25em;
    border-radius: 5px;
    background: #222;
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
}

.lbai-generated-content .lbai-cta-button:hover,
.post_content_container .lbai-cta-button:hover,
.lbai-cta-button:hover {
    text-decoration: none;
    opacity: 0.9;
}

.lbai-generated-content .lbai-cta-form,
.post_content_container .lbai-cta-form,
.lbai-cta-form {
    margin-top: 1em;
    text-align: left;
    text-justify: auto;
}


/* Phase 1.6.1: stronger spacing before generated CTA blocks. */
.lbai-generated-content .lbai-cta-spacer,
.post_content_container .lbai-cta-spacer,
.lbai-cta-spacer {
    display: block !important;
    clear: both !important;
    height: 2.5rem !important;
    line-height: 2.5rem !important;
}

.entry-content .lbai-cta-banner,
.et_pb_post_content .lbai-cta-banner,
.single-post .lbai-cta-banner,
.post_content_container .lbai-cta-banner,
.lbai-generated-content .lbai-cta-banner {
    margin-top: 3rem !important;
    margin-bottom: 2rem !important;
}


/* Phase 1.6.2: inline styles now handle CTA spacing, this is an additional fallback. */
.lbai-cta-spacer { display:block !important; clear:both !important; height:48px !important; line-height:48px !important; font-size:0 !important; }
.lbai-cta-banner { display:block !important; clear:both !important; margin-top:24px !important; margin-bottom:32px !important; padding:26px 24px !important; }
.lbai-cta-form { margin-top:22px !important; }


/* Phase 1.6.8: stronger generated article justification.
   Themes/builders can override paragraph alignment, so these rules are intentionally specific. */
.entry-content .lbai-generated-content,
.entry-content .post_content_container,
.et_pb_post_content .lbai-generated-content,
.et_pb_post_content .post_content_container,
.single-post .lbai-generated-content,
.single-post .post_content_container,
.lbai-generated-content,
.post_content_container {
    text-align: justify !important;
    text-justify: inter-word !important;
    hyphens: auto;
    overflow-wrap: break-word;
}

.entry-content .lbai-generated-content p:not(.lbai-cta-text),
.entry-content .post_content_container p:not(.lbai-cta-text),
.et_pb_post_content .lbai-generated-content p:not(.lbai-cta-text),
.et_pb_post_content .post_content_container p:not(.lbai-cta-text),
.single-post .lbai-generated-content p:not(.lbai-cta-text),
.single-post .post_content_container p:not(.lbai-cta-text),
.lbai-generated-content p:not(.lbai-cta-text),
.post_content_container p:not(.lbai-cta-text),
.lbai-generated-content li,
.post_content_container li {
    text-align: justify !important;
    text-align-last: auto !important;
    text-justify: inter-word !important;
    hyphens: auto;
    overflow-wrap: break-word;
}

.lbai-generated-content .lbai-pricing-note,
.post_content_container .lbai-pricing-note,
.lbai-pricing-note {
    margin: 1.15em 0 !important;
    padding: 0.85em 1em;
    border-left: 4px solid #bc9c22;
    background: #faf8f4;
    text-align: justify !important;
}


/* Phase 1.8.15: stronger generated text justification.
   Some themes override paragraph alignment very specifically, so use scoped
   !important rules for generated article content only. */
body .entry-content .lbai-generated-content,
body .entry-content .post_content_container,
body .lbai-generated-content,
body .post_content_container {
    text-align: justify !important;
    text-justify: inter-word;
    line-height: 1.75;
}

body .entry-content .lbai-generated-content p:not(.lbai-cta-text),
body .entry-content .post_content_container p:not(.lbai-cta-text),
body .lbai-generated-content p:not(.lbai-cta-text),
body .post_content_container p:not(.lbai-cta-text),
body .entry-content .lbai-generated-content li,
body .entry-content .post_content_container li,
body .lbai-generated-content li,
body .post_content_container li {
    text-align: justify !important;
    text-justify: inter-word;
}

body .entry-content .lbai-generated-content ul,
body .entry-content .lbai-generated-content ol,
body .entry-content .post_content_container ul,
body .entry-content .post_content_container ol,
body .lbai-generated-content ul,
body .lbai-generated-content ol,
body .post_content_container ul,
body .post_content_container ol {
    text-align: justify !important;
    text-justify: inter-word;
}
