/* Pouze prvky vytvořené pluginem. Běžnou typografii článku, H2 a H3 plugin globálně nepřepisuje. */
.rjae-embed {
    box-sizing: border-box;
    width: 532px;
    max-width: 100%;
    margin: 24px auto;
    overflow: hidden;
}
.rjae-embed .rjae-social-iframe {
    display: block;
    width: 100%;
    max-width: 100%;
    border: 0;
    background: transparent;
}
.rjae-embed[style*="--rre-embed-ratio"] .rjae-social-iframe {
    aspect-ratio: var(--rre-embed-ratio);
    height: auto;
}
.rjae-embed--youtube .rjae-social-iframe { aspect-ratio: 16 / 9; height: auto; }
.rjae-embed--facebook .rjae-social-iframe { min-height: 500px; height: 680px; }
.rjae-embed--tiktok {
    width: 420px;
}
.rjae-embed--tiktok .rjae-social-iframe {
    aspect-ratio: 9 / 16;
    height: auto;
    min-height: 0;
}
.rjae-embed__ratio { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.rjae-embed__ratio iframe { position: absolute; inset: 0; display: block; width: 100%; height: 100%; border: 0; }
.rjae-embed-fallback { margin: 8px 0 0; font-size: 15px; }
.rjae-embed-fallback a { font-weight: 700; text-decoration: underline; }

@media (max-width: 600px) {
    .rjae-embed--facebook .rjae-social-iframe { min-height: 460px; height: 620px; }
    .rjae-embed--tiktok { width: min(100%, 380px); }
}

.wp-block-quote.rjae-highlight-quote {
    box-sizing: border-box;
    width: 400px;
    max-width: 100%;
    margin: 28px auto;
    padding: 0 20px;
    border-left: 3px solid currentColor;
    border-right: 3px solid currentColor;
    text-align: center;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 800;
}
.wp-block-quote.rjae-highlight-quote p,
.wp-block-quote.rjae-highlight-quote cite { font: inherit; }

.rjae-commercial-badge {
    box-sizing: border-box;
    display: inline-block;
    margin: 0 10px 8px 0;
    padding: 3px 8px;
    border: 2px solid #7b3fb6;
    background: #fff;
    color: #7b3fb6;
    font-size: 21px;
    line-height: 1.15;
    font-weight: 800;
    text-transform: uppercase;
    vertical-align: baseline;
}

.rjae-info-box {
    box-sizing: border-box;
    width: 532px;
    max-width: 100%;
    margin: 28px auto;
    padding: 20px 22px;
    background: #f1e8f8;
    color: #161616;
    border: 1px solid #d8c4e9;
}
.rjae-info-box .rjae-info-box__title {
    margin: 0 0 12px;
    color: #161616;
    font-weight: 800;
}
.rjae-info-box__text,
.rjae-info-box__text p {
    font-size: 20px;
    line-height: 1.55;
    font-weight: 400;
    color: #161616;
}
.rjae-info-box__text p:last-child { margin-bottom: 0; }

.rjae-poll {
    box-sizing: border-box;
    width: 420px;
    max-width: 100%;
    margin: 28px auto;
    padding: 20px;
    background: #fde9ef;
    color: #111;
    border: 1px solid #efc8d4;
}
.rjae-poll__question {
    margin: 0 0 16px;
    color: #111;
    font-size: 24px !important;
    line-height: 1.25;
    font-weight: 800 !important;
}
.rjae-poll__answers { display: grid; gap: 9px; }
.rjae-poll__answer {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 9px 10px;
    background: rgba(255,255,255,.72);
    border: 1px solid rgba(0,0,0,.08);
    cursor: pointer;
    font-size: 18px;
    line-height: 1.35;
    font-weight: 400;
}
.rjae-poll__answer input { margin-top: 4px; }
.rjae-poll__vote {
    margin-top: 14px;
    padding: 9px 16px;
    border: 0;
    border-radius: 3px;
    background: #242424;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}
.rjae-poll__vote:hover { opacity: .88; }
.rjae-poll__status { margin-top: 10px; font-size: 15px; font-weight: 700; }
.rjae-poll__results { margin-top: 14px; display: grid; gap: 8px; }
.rjae-poll__result { font-size: 16px; }
.rjae-poll__result-bar { height: 8px; margin-top: 4px; background: rgba(0,0,0,.1); overflow: hidden; }
.rjae-poll__result-bar > span { display: block; height: 100%; background: #333; }

@media (max-width: 600px) {
    .rjae-embed,
    .rjae-info-box,
    .rjae-poll { width: 100%; }
    .wp-block-quote.rjae-highlight-quote { width: 100%; padding-left: 20px; padding-right: 20px; font-size: 21px; }
    .rjae-commercial-badge { font-size: 19px; }
}

/* 1.0.0 – vybraný text vložený do levého/pravého bočního bloku. */
.rjae-side-text {
    box-sizing: border-box;
    width: 250px;
    max-width: 45%;
    margin-top: 8px;
    margin-bottom: 12px;
    padding: 10px 12px;
    background: #f7f7f7;
    color: inherit;
    font: inherit;
    line-height: 1.5;
}
.rjae-side-text--left {
    float: left;
    margin-right: 20px;
}
.rjae-side-text--right {
    float: right;
    margin-left: 20px;
}

@media (max-width: 600px) {
    .rjae-side-text {
        float: none !important;
        width: 100%;
        max-width: 100%;
        margin: 18px 0;
    }
}

/* Komerční označení před ručně vyplněným perexem v aktuální šabloně Rejpák.cz.
   Šablona perex escapuje přes esc_html(), proto se badge nevkládá do excerpt HTML. */
body.rjae-commercial-post.single-post .single-article .article-lead:not(:has(.rjae-commercial-badge))::before {
    content: "\1F4E3  KOMERČNÍ SDĚLENÍ";
    box-sizing: border-box;
    display: table;
    margin: 0 0 10px;
    padding: 3px 8px;
    border: 2px solid #7b3fb6;
    background: #fff;
    color: #7b3fb6;
    font-size: clamp(14px, 3.5vw, 21px);
    max-width: 100%;
    overflow-wrap: anywhere;
    line-height: 1.15;
    font-weight: 800;
    text-transform: uppercase;
}

.rjae-embed--youtube iframe { min-height: 200px; }
.rjae-embed--other iframe { height: 400px; }
.rre-embed-status { padding: 12px; border: 1px solid #dedede; font-size: 14px; line-height: 1.5; }
.rre-embed-status[hidden], .rjae-poll__results[hidden] { display: none !important; }
.rjae-commercial-badge { max-width: 100%; overflow-wrap: anywhere; font-size: clamp(15px, 3.5vw, 21px); }
/* Bez JS zajistí označení skutečný serverový štítek u obsahu; pro známou šablonu
   zůstává také CSS označení před escapovaným perexem. S JS je jediný štítek u perexu. */
body.rjae-commercial-post .single-article:has(.article-lead) .rre-commercial-content-label { display: none; }

/* 1.3.0 – požadovaná finální typografie citace a bočního textu. */
.wp-block-quote.rjae-highlight-quote {
    box-sizing: border-box;
    width: 532px;
    max-width: 100%;
    margin: 28px auto;
    padding: 4px 20px;
    border: 0;
    border-left: 2px solid #7b3fb6;
    text-align: center;
    font-size: 21px;
    line-height: 1.5;
    font-weight: 800;
    font-style: italic;
}
.wp-block-quote.rjae-highlight-quote p,
.wp-block-quote.rjae-highlight-quote cite {
    font: inherit;
    font-weight: 800;
    font-style: italic;
}
.rjae-side-text {
    width: 250px;
    max-width: 45%;
    padding: 12px 14px;
    background: #f3ecfa;
    border: 0;
    outline: 0;
    box-shadow: none;
    font-weight: 800;
    line-height: 1.5;
}

/* === 1.4.0: oficiální sociální embedy – bez vlastních placeholderů === */
.rjae-embed {
    clear: both;
    width: 532px;
    max-width: 100%;
    margin: 24px auto;
}
.rjae-embed--instagram,
.rjae-embed--facebook,
.rjae-embed--x {
    overflow: visible;
}
/* Šablona nesmí na oficiální blockquote přidat vlastní citaci/čáru. Rozměry iframe
   ponecháváme SDK Instagram/Facebook/X – žádná výška ani position se nevynucuje. */
.rjae-embed--instagram blockquote.instagram-media,
.rjae-embed--x blockquote.twitter-tweet {
    box-sizing: border-box !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    border: 0 !important;
    outline: 0 !important;
}
.rjae-embed--instagram blockquote.instagram-media::before,
.rjae-embed--instagram blockquote.instagram-media::after,
.rjae-embed--x blockquote.twitter-tweet::before,
.rjae-embed--x blockquote.twitter-tweet::after {
    content: none !important;
    display: none !important;
}
.rjae-embed--instagram iframe,
.rjae-embed--facebook iframe,
.rjae-embed--x iframe {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}
.rjae-embed--youtube .rjae-social-iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    min-height: 200px;
    border: 0;
}


/* === 1.4.1: formátování vytvořené přímo z označeného textu === */
.rjae-inline-quote {
    display: block !important;
    box-sizing: border-box !important;
    width: min(100%, 700px) !important;
    max-width: 100% !important;
    margin: 20px auto !important;
    padding: 10px 18px !important;
    border: 0 !important;
    border-left: 2px solid #79539c !important;
    background: transparent !important;
    text-align: center !important;
    font-weight: 800 !important;
    font-style: italic !important;
    line-height: 1.5 !important;
}
.rjae-inline-side-left,
.rjae-inline-side-right {
    display: block !important;
    box-sizing: border-box !important;
    width: 250px !important;
    max-width: 45% !important;
    padding: 12px 14px !important;
    background: #f3ecfa !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
}
.rjae-inline-side-left { float: left !important; margin: 8px 20px 12px 0 !important; }
.rjae-inline-side-right { float: right !important; margin: 8px 0 12px 20px !important; }
@media (max-width: 600px) {
    .rjae-inline-side-left,
    .rjae-inline-side-right {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 14px 0 !important;
    }
}

/* 1.4.2: social embed nesmí zdědit dekorativní čáry blockquote ze šablony. */
.rjae-embed blockquote,
.rjae-embed blockquote.instagram-media,
.rjae-embed blockquote.twitter-tweet {
    border: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    outline: 0 !important;
    text-decoration: none !important;
}
.rjae-embed blockquote::before,
.rjae-embed blockquote::after,
.rjae-embed blockquote.instagram-media::before,
.rjae-embed blockquote.instagram-media::after,
.rjae-embed blockquote.twitter-tweet::before,
.rjae-embed blockquote.twitter-tweet::after {
    content: none !important;
    display: none !important;
    border: 0 !important;
}
.rjae-embed--instagram iframe[data-instgrm-payload-id] {
    display: block !important;
    width: 100% !important;
    max-width: 540px !important;
    min-height: 540px !important;
    margin: 0 auto !important;
    border: 0 !important;
}
.rjae-embed--facebook .rjae-social-iframe,
.rjae-embed--youtube .rjae-social-iframe {
    display: block !important;
    border: 0 !important;
}

/* 1.4.4: standardní boční odstavec – bez rámečku a technického boxu. */
.rjae-side-left,
.rjae-side-right {
    display: block !important;
    box-sizing: border-box !important;
    width: 250px !important;
    max-width: 45% !important;
    padding: 12px 14px !important;
    background: #f3ecfa !important;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    font-weight: 800 !important;
    line-height: 1.5 !important;
}
.rjae-side-left {
    float: left !important;
    margin: 8px 20px 12px 0 !important;
    text-align: left !important;
}
.rjae-side-right {
    float: right !important;
    margin: 8px 0 12px 20px !important;
    text-align: left !important;
}
@media (max-width: 600px) {
    .rjae-side-left,
    .rjae-side-right {
        float: none !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 14px 0 !important;
    }
}

/* 2.0.0: Instagram je přímý oficiální embed iframe; bez závislosti na embed.js. */
.rjae-embed--instagram .rjae-instagram-iframe {
    display: block !important;
    width: 100% !important;
    max-width: 540px !important;
    height: 745px !important;
    min-height: 540px !important;
    margin: 0 auto !important;
    border: 0 !important;
}
@media (max-width: 600px) {
    .rjae-embed--instagram .rjae-instagram-iframe { height: 700px !important; }
}

/* 2.1.0: jednoduchá vlastní galerie vložená redakčním systémem. */
.rre-inline-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;margin:20px 0!important;clear:both!important}
.rre-inline-gallery img{display:block!important;width:100%!important;aspect-ratio:16/10!important;object-fit:cover!important;height:auto!important;border-radius:3px!important}
@media(max-width:700px){.rre-inline-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* 2.1.3 – fotografický kredit z nové redakce. Specifické ::before přebíjí starší generické Foto/© Foto prefixy. */
body.single-post .single-article .article-content figcaption.rre-photo-source,
body.single-post .single-article figcaption.rre-featured-source-caption,
figcaption.rre-photo-source,
figcaption.rre-featured-source-caption{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    max-width:100%;
    margin-top:8px;
    color:#666;
    font-size:12.5px;
    line-height:1.45;
    font-style:italic;
    font-weight:600;
}
body.single-post .single-article .article-content figcaption.rre-photo-source::before,
body.single-post .single-article figcaption.rre-featured-source-caption::before,
figcaption.rre-photo-source::before,
figcaption.rre-featured-source-caption::before{
    content:"Foto: "!important;
    font-weight:800!important;
}

/* Boční blok vytvořený vlastním editorem – text článku jej obtéká. */
body.single-post .single-article .article-content > aside.rjae-inline-side-left,
body.single-post .single-article .article-content > aside.rjae-inline-side-right{
    box-sizing:border-box;
    display:block;
    width:250px;
    max-width:45%;
    padding:10px 12px;
    background:#f4eef9;
    color:inherit;
    font:inherit;
    font-weight:700;
    line-height:1.5;
}
body.single-post .single-article .article-content > aside.rjae-inline-side-left{float:left;margin:8px 20px 12px 0}
body.single-post .single-article .article-content > aside.rjae-inline-side-right{float:right;margin:8px 0 12px 20px}
@media(max-width:600px){
    body.single-post .single-article .article-content > aside.rjae-inline-side-left,
    body.single-post .single-article .article-content > aside.rjae-inline-side-right{float:none!important;width:100%;max-width:100%;margin:18px 0!important}
}

/* 2.2.7 – boční text článku, site-specific pastelové pozadí. */
.rjae-side-text,
.rjae-inline-side-left,
.rjae-inline-side-right,
body.single-post .single-article .article-content > aside.rjae-inline-side-left,
body.single-post .single-article .article-content > aside.rjae-inline-side-right{background:#f1ebf8!important;border:1px solid #d7c7e8!important;color:#2f2638!important;box-shadow:none!important}

/* === 2.2.14: Rejpák – komerční štítek pouze na začátku skutečného perexu === */
/*
 * Šablona Rejpák 2.1.3 vykresluje ruční post_excerpt jako <p class="article-lead">.
 * Text perexu se nijak nemění; štítek je čistě prezentační ::before.
 */
body.rjae-commercial-post.single-post .single-article .article-lead {
    font-weight: 800 !important;
}
body.rjae-commercial-post.single-post .single-article .article-lead::before {
    content: "Komerční sdělení / ";
    display: inline-block;
    box-sizing: border-box;
    margin: 0 8px 0 0;
    padding: 2px 6px;
    border: 0;
    border-radius: 2px;
    background: #7b3fb6;
    color: #ffffff;
    font-family: inherit;
    font-size: 15px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: 0;
    text-decoration: none;
    text-transform: none;
    vertical-align: 0.06em;
    white-space: nowrap;
}
@media (max-width: 520px) {
    body.rjae-commercial-post.single-post .single-article .article-lead::before {
        font-size: 15px;
        margin-right: 6px;
        padding: 2px 5px;
    }
}
