/**
 * CDSWerx Post Content Widget Styles
 * 
 * Base styles for the post content widget.
 * Most styling is handled via Elementor controls.
 *
 * @package CDSWerx_Widget_Library
 * @since 2.5.0
 */

/* Base wrapper */
.cdswerx-post-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Ensure proper spacing for block elements */
.cdswerx-post-content > *:first-child {
    margin-top: 0;
}

.cdswerx-post-content > *:last-child {
    margin-bottom: 0;
}

/* Page links for paginated posts */
.cdswerx-post-content .cdswerx-page-links {
    clear: both;
    margin: 1.5em 0;
    padding: 1em 0;
    border-top: 1px solid #eee;
}

.cdswerx-post-content .page-links-title {
    margin-right: 0.5em;
    font-weight: 600;
}

.cdswerx-post-content .cdswerx-page-links span {
    display: inline-block;
    margin: 0 0.25em;
    padding: 0.25em 0.5em;
}

/* WordPress block compatibility */
.cdswerx-post-content .wp-block-image {
    margin-bottom: 1em;
}

.cdswerx-post-content .wp-block-image img {
    max-width: 100%;
    height: auto;
}

/* Gutenberg blocks spacing */
.cdswerx-post-content .wp-block-group,
.cdswerx-post-content .wp-block-columns {
    margin-bottom: 1.5em;
}

/* Table styling */
.cdswerx-post-content table {
    width: 100%;
    margin-bottom: 1em;
    border-collapse: collapse;
}

.cdswerx-post-content th,
.cdswerx-post-content td {
    padding: 0.5em;
    border: 1px solid #ddd;
}

/* Blockquote base — default spacing only; all other styling via Elementor controls */
.cdswerx-post-content blockquote {
    margin: 1.5em 0;
}

/* ============================================
   Blockquote Icon Wrapper Layouts
   Injected by post-content-widget.js
   ============================================ */

.cdswerx-pc-bq-wrapper {
    position: relative;
}

.cdswerx-pc-bq-wrapper--top,
.cdswerx-pc-bq-wrapper--above-after {
    display: flex;
    flex-direction: column;
}

/* Icon elements */
.cdswerx-pc-bq__open-icon,
.cdswerx-pc-bq__close-icon {
    font-size: 40px;
    line-height: 1;
    transition: color 0.3s ease-in-out;
}

.cdswerx-pc-bq__open-icon i,
.cdswerx-pc-bq__close-icon i {
    color: inherit;
    line-height: 1;
}

.cdswerx-pc-bq__open-icon svg,
.cdswerx-pc-bq__close-icon svg {
    width: 1em;
    height: auto;
    fill: currentColor;
    stroke: currentColor;
    display: block;
}

/* Inline variant — floats inside the blockquote */
.cdswerx-pc-bq__open-icon--inline {
    float: left;
    margin-right: 0.5em;
    line-height: 1em;
    display: inline-flex;
    align-items: center;
}

.cdswerx-pc-bq__open-icon--inline svg {
    display: inline;
}

/* Code blocks */
.cdswerx-post-content pre,
.cdswerx-post-content code {
    font-family: monospace;
    background: #f5f5f5;
    padding: 0.2em 0.4em;
    border-radius: 3px;
}

.cdswerx-post-content pre {
    padding: 1em;
    overflow-x: auto;
}

.cdswerx-post-content pre code {
    padding: 0;
    background: none;
}