:is(#rich-editor, .news-body){white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.7}


:is(#rich-editor, .news-body){white-space:normal;position:relative}

:is(#rich-editor, .news-body) [data-contact-free-text]{white-space:pre-wrap}
:is(#rich-editor, .news-body) img{max-width:none;margin:15px 0}

:is(#rich-editor, .news-body) p:has(img + br){display:flow-root}

:is(#rich-editor, .news-body) > p:has(> img){margin:0 0 15px;clear:both}
:is(#rich-editor, .news-body) > p:has(> img) img{display:block;max-width:100%;margin:15px 0}

:is(#rich-editor, .news-body) img[align="center"]{display:block;float:none!important;margin:15px auto!important;max-width:100%}


:is(#rich-editor, .news-body) img,.article-image{cursor:zoom-in}

:is(#rich-editor, .news-body) p:has(> img + img){display:flow-root;clear:both}

:is(#rich-editor, .news-body) img[style*="position: absolute"]{margin:0!important}


/* NOTIKUMU_IZKARTOJUMS */
#rich-editor [data-event-layout="columns"],
:is(#rich-editor, .news-body) [data-event-layout="columns"] {
    display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
    gap:20px;clear:both;margin:16px 0;
}

#rich-editor [data-event-layout="cards"],
:is(#rich-editor, .news-body) [data-event-layout="cards"] {
    display:grid;grid-template-columns:repeat(3,minmax(0,1fr));
    gap:20px;clear:both;margin:20px 0;
}

#rich-editor [data-event-layout] > div,
:is(#rich-editor, .news-body) [data-event-layout] > div {
    min-width:0;padding:16px;border:1px solid #e2e8f0;
    border-radius:8px;background:#fff;
}

#rich-editor [data-event-layout] img,
:is(#rich-editor, .news-body) [data-event-layout] img {max-width:100%;height:auto}

#rich-editor table,:is(#rich-editor, .news-body) table {
    width:100%;border-collapse:collapse;margin:16px 0;clear:both;
}

#rich-editor th,#rich-editor td,
:is(#rich-editor, .news-body) th,:is(#rich-editor, .news-body) td {
    border:1px solid #cbd5e1;padding:9px;
    text-align:left;vertical-align:top;
}

@media(max-width:750px) {
    #rich-editor [data-event-layout="columns"],
    #rich-editor [data-event-layout="cards"],
    :is(#rich-editor, .news-body) [data-event-layout="columns"],
    :is(#rich-editor, .news-body) [data-event-layout="cards"] {
        grid-template-columns:1fr;
    }}


/* NOTIKUMU_BRIVIE_BLOKI */
#rich-editor [data-event-block],
:is(#rich-editor, .news-body) [data-event-block] {
    position:absolute;box-sizing:border-box;
    min-width:140px;min-height:90px;
    padding:36px 12px 12px;
    border:1px solid #cbd5e1;border-radius:8px;
    background:#fff;overflow-wrap:anywhere;
}

#rich-editor [data-event-block] img,
:is(#rich-editor, .news-body) [data-event-block] img {max-width:100%}

#rich-editor [data-event-block] table,
:is(#rich-editor, .news-body) [data-event-block] table {
    width:100%;border-collapse:collapse;
}

#rich-editor [data-event-block] td,
#rich-editor [data-event-block] th,
:is(#rich-editor, .news-body) [data-event-block] td,
:is(#rich-editor, .news-body) [data-event-block] th {
    padding:7px;border:1px solid #cbd5e1;
}

@media(max-width:700px) {
    :is(#rich-editor, .news-body) [data-event-block] {
        position:static!important;
        width:100%!important;height:auto!important;
        margin:12px 0;
    }}

/* NOTIKUMU_BLOKA_AUGSTUMS */
:is(#rich-editor, .news-body) [data-event-block] {
    min-height: max-content;
    overflow: visible;
    padding: 0;
}

:is(#rich-editor, .news-body) [data-event-block] > p {
    margin: 0;
}

/* NOTIKUMU_BLOKA_SĀNU_ATKĀPE */
:is(#rich-editor, .news-body) [data-event-block] {
    padding-left: 2mm;
    padding-right: 2mm;
}

:is(#rich-editor, .news-body) [data-event-block] {
    min-height: max-content;
    overflow: hidden;
}

:is(#rich-editor, .news-body) [data-event-block="button"],
:is(#rich-editor, .news-body) [data-event-block="button"] a {
    background:#000;color:#fff;
}

:is(#rich-editor, .news-body) [data-event-block="button"] a {
    display:flex;align-items:center;justify-content:center;
    width:100%;height:100%;text-align:center;text-decoration:none;
}

@media(max-width:800px){
    body :is(#rich-editor, .news-body).event-mobile-body{height:auto!important;min-height:0!important;white-space:normal!important}

    body :is(#rich-editor, .news-body).event-mobile-body .event-mobile-empty{display:none!important}

    body :is(#rich-editor, .news-body).event-mobile-body :is([data-event-block],.event-mobile-positioned,[data-contact-free-text]){
        position:relative!important;inset:auto!important;transform:none!important;
        float:none!important;width:100%!important;max-width:100%!important;
        min-width:0!important;height:auto!important;min-height:0!important;
        max-height:none!important;margin:12px 0!important;box-sizing:border-box;
        white-space:normal!important;overflow:visible!important;
    }

    body :is(#rich-editor, .news-body).event-mobile-body [data-event-block]{padding:2mm!important}

    body :is(#rich-editor, .news-body).event-mobile-body .event-mobile-spaced{margin-top:12px!important;margin-bottom:12px!important;padding-top:2mm!important;padding-bottom:2mm!important}

    body :is(#rich-editor, .news-body).event-mobile-body :is(p,h2,h3,li){height:auto!important;min-height:0!important;white-space:normal!important;line-height:1.6!important}

    body :is(#rich-editor, .news-body).event-mobile-body :is(span,font,strong,b,i,em){line-height:normal!important;white-space:normal!important}

    body :is(#rich-editor, .news-body).event-mobile-body img{position:static!important;inset:auto!important;transform:none!important;float:none!important;max-width:100%!important;height:auto!important;margin:15px 0!important;box-sizing:border-box}

    body :is(#rich-editor, .news-body).event-mobile-body [data-event-block="button"] a{height:auto!important;min-height:44px;white-space:normal;box-sizing:border-box}}
[data-event-canvas-width] {display:none!important}
:is(#rich-editor, .news-body) [data-event-block] {
    position: absolute;
    box-sizing: border-box;
    min-width: 140px;
    min-height: 0;
    padding: 0 2mm;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background-color: transparent;
    background-image: none;
    box-shadow: 0 12px 48px rgba(15,23,42,.32), 0 4px 24px rgba(15,23,42,.20);
    overflow: hidden !important;
    overflow-wrap: anywhere;
}
:is(#rich-editor, .news-body) [data-event-block] > p {margin:0}
:is(#rich-editor, .news-body) [data-event-block] img {
    max-width:100%;
    box-shadow:0 12px 48px rgba(15,23,42,.32),0 4px 24px rgba(15,23,42,.20);
}
:is(#rich-editor, .news-body) [data-event-block="button"] {
    min-width:40px;
    min-height:30px !important;
    max-height:var(--event-button-height, none);
    background:#000;
    color:#fff;
}
:is(#rich-editor, .news-body) [data-event-block="button"] a {
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    height:100%;
    background:#000;
    color:#fff;
    text-align:center;
    text-decoration:none;
}

/* Identical text flow in the event editor and the public article. */
:is(#rich-editor, .news-body){font-family:Arial,sans-serif;font-size:16px;line-height:1.7}
:is(#rich-editor, .news-body) [data-event-block],
:is(#rich-editor, .news-body) [data-event-block] :is(p,div,span,font,b,strong,i,em,h1,h2,h3,h4,h5,h6,li){white-space:break-spaces}

:is(#rich-editor, .news-body) img:is([align="left"],[style*="float: left"],[style*="float:left"]){margin:15px 15px 15px 0!important}
:is(#rich-editor, .news-body) img:is([align="right"],[style*="float: right"],[style*="float:right"]){margin:15px 0 15px 15px!important}
