/**
 * Paste from Constant Contact - Frontend Styles
 * Styles for pasted content on the published page/post
 */

/* Pasted Constant Contact Content Container */
.cc-pasted-content {
    max-width: 600px !important;
    margin: 20px auto !important;
    padding: 0 !important;
    clear: both !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Ensure it works within post content */
.entry-content .cc-pasted-content,
.post-content .cc-pasted-content,
article .cc-pasted-content {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Table-to-Div converted content */
.cc-table-content {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.cc-row {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 10px;
    clear: both !important;
}

.cc-cell {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 10px 0;
    box-sizing: border-box !important;
}

/* Responsive images - very aggressive */
.cc-responsive-img,
.cc-pasted-content img,
.cc-table-content img,
.cc-row img,
.cc-cell img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
}

/* Remove any inline width/height on images */
.cc-pasted-content img[width],
.cc-pasted-content img[height] {
    width: auto !important;
    height: auto !important;
}

/* Text blocks */
.cc-pasted-content p {
    margin: 10px 0;
    line-height: 1.6;
    max-width: 100% !important;
}

.cc-pasted-content h1,
.cc-pasted-content h2,
.cc-pasted-content h3,
.cc-pasted-content h4 {
    margin: 15px 0 10px;
    line-height: 1.4;
    max-width: 100% !important;
}

/* All divs inside pasted content */
.cc-pasted-content div,
.cc-pasted-content > div,
.cc-table-content > div {
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Links styling */
.cc-pasted-content a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure content doesn't break layout */
.cc-pasted-content,
.cc-pasted-content * {
    overflow: hidden;
    box-sizing: border-box;
}

/* Override any remaining table styles if they slip through */
.cc-pasted-content table,
.entry-content .cc-pasted-content table,
.post-content .cc-pasted-content table {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.cc-pasted-content table tr,
.cc-pasted-content table td,
.cc-pasted-content table th {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cc-pasted-content {
        max-width: 100% !important;
        padding: 0 15px !important;
        margin: 20px auto !important;
    }
}

/* Fix for WordPress themes with wide content areas */
.alignwide .cc-pasted-content,
.alignfull .cc-pasted-content {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Fallback styles for content pasted before plugin update (without wrapper) */
.entry-content .cc-table-content,
.post-content .cc-table-content,
article .cc-table-content {
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

/* Aggressive image containment for any orphaned content */
.entry-content img.cc-responsive-img,
.post-content img.cc-responsive-img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    display: block !important;
    margin: 10px auto !important;
}

