/* Newsletter Story Block Styles */

:root {
    --color-body: rgb(51, 51, 51);
    --newsletter-story-category-color: #454545;
}

.wp-block-rnmg-newsletter-story {
    /* margin-bottom: 2rem; - moved to table wrapper */
}

.wp-block-rnmg-newsletter-story .story-container {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 2rem;
}

.wp-block-rnmg-newsletter-story .card {
    color: #333;
    border-collapse: collapse;
    box-shadow: none;
    background-color: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 15px;
    margin-bottom: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 16px;
    display: block;
}

.wp-block-rnmg-newsletter-story .tag-container {
    padding: 15px 15px 0;
}

.wp-block-rnmg-newsletter-story .tag-container h3 {
    color: var(--newsletter-story-category-color);
    margin-top: 0;
    margin-bottom: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
}

.wp-block-rnmg-newsletter-story .story-content-container {
    border-collapse: collapse;
    width: 100%;
}

.wp-block-rnmg-newsletter-story .title-container {
    padding: 0 15px;
}

.wp-block-rnmg-newsletter-story .story-title {
    color: #000;
    margin-top: 8px;
    margin-bottom: 0;
    font-family: Helvetica, Arial, sans-serif;
    font-size: 24px;
    font-weight: 700;
    line-height: 26px;
}

.wp-block-rnmg-newsletter-story .header-image-container {
    padding-top: 15px;
}

.wp-block-rnmg-newsletter-story .header-image-container img {
    width: 100%;
    max-width: 688px;
    display: block;
}

.wp-block-rnmg-newsletter-story .source {
    margin-top: 5px;
    margin-bottom: 0;
    padding-left: 10px;
    line-height: 14px;
    display: inline-block;
}

.wp-block-rnmg-newsletter-story .content-container {
    padding: 15px;
}

/* Content styling for paragraphs and list items */
.wp-block-rnmg-newsletter-story .content-container p,
.wp-block-rnmg-newsletter-story .content-container li {
    margin-top: 0;
    margin-bottom: 15px;
    line-height: 20px;
    color: var(--color-body);
    font-size: 16px;
}

.wp-block-rnmg-newsletter-story .content-container li {
    margin-bottom: 15px;
}

.wp-block-rnmg-newsletter-story .content-container p:last-child,
.wp-block-rnmg-newsletter-story .content-container li:last-child {
    margin-bottom: 0;
}

.wp-block-rnmg-newsletter-story .social-container {
    padding-bottom: 15px;
    padding-left: 15px;
}

.wp-block-rnmg-newsletter-story .social-container img {
    width: 25px;
    display: inline-block;
}

/* Editor-specific styles */
.editor-styles-wrapper .wp-block-rnmg-newsletter-story {
    max-width: 100%;
}

.editor-styles-wrapper .wp-block-rnmg-newsletter-story .card {
    margin: 0;
}

.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .content-container {
	font-size: 16px;
}

/* Editor content styling for paragraphs and list items */
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .content-container p,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .content-container li {
    margin-top: 0 !important;
    margin-bottom: 15px !important;
    line-height: 20px !important;
    color: var(--color-body) !important;
    font-family: Helvetica, Arial, sans-serif !important;
    font-size: 16px !important;
}

.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .content-container li {
    margin-bottom: 15px !important;
}

.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .content-container p:last-child,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .content-container li:last-child {
    margin-bottom: 0 !important;
}

/* Override WordPress editor font styles */
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-block-list__layout p,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-block-list__layout li {
    font-family: Helvetica, Arial, sans-serif !important;
    color: var(--color-body) !important;
    font-size: 16px !important;
    line-height: 20px !important;
}

.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-block-list__layout li {
    margin-bottom: 15px !important;
}

/* Ensure the entire block uses the correct font */
.editor-styles-wrapper .wp-block-rnmg-newsletter-story,
.editor-styles-wrapper .wp-block-rnmg-newsletter-story * {
    font-family: Helvetica, Arial, sans-serif !important;
}

/* More aggressive font overrides for editor */
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-block-list__layout,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-block-list__layout *,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-rich-text__editable,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] .block-editor-rich-text__editable * {
    font-family: Helvetica, Arial, sans-serif !important;
}

/* Force font on all text elements */
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] p,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] h1,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] h2,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] h3,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] li,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] div,
.editor-styles-wrapper [data-type="rnmg/newsletter-story"] span {
    font-family: Helvetica, Arial, sans-serif !important;
}

/* Frontend styles */
.wp-block-rnmg-newsletter-story .story-container {
    margin-bottom: 2rem;
}

/* Hide block border */
[data-type="rnmg/newsletter-story"] {
    border: none !important;
    outline: none !important;
}

/* Responsive styles */
@media (max-width: 768px) {
    .wp-block-rnmg-newsletter-story .story-title {
        font-size: 20px;
        line-height: 20px;
    }
    
    .wp-block-rnmg-newsletter-story .header-image-container img {
        max-width: 100%;
    }
} 