/* Seznam Diskuze SAFE 1.2.1 — only Seznam Like bar and own discussion page.
 * Visual adjustments only; no modifications to existing Like API or counts.
 */

/* The official Seznam button supports these CSS custom properties for its
 * seamless layout. Applies to BOTH existing Like buttons (top + bottom).
 * Do not change the entity, iframe, click handlers or Seznam loader.
 */
body.single-post .rpn-sls-bar .rpn-sls-seznam-like {
  --primary-color: #171717 !important;
  --count-color: #171717 !important;
  --hover-color: #E30613 !important;
  --active-color: #E30613 !important;
}
body.single-post .rpn-sls-bar .rpn-sls-seznam-like:hover,
body.single-post .rpn-sls-bar .rpn-sls-seznam-like:focus-within {
  --count-color: #E30613 !important;
}

/* Only the button inserted by the Seznam Diskuze plugin, in the BOTTOM bar. */
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:link,
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:visited {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: Inter, Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 400 !important;
  line-height: 1.4 !important;
  letter-spacing: normal !important;
  color: #171717 !important;
  text-decoration: none !important;
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 2px;
  margin: 0;
  min-height: 24px;
}
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:hover,
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:focus-visible,
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:active {
  color: #E30613 !important;
  text-decoration: underline !important;
}
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}
body.single-post .rpn-sls-bar--bottom a.sd-discussion-link svg {
  display: block;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
}

/* Own discussion page only. Preserve its layout and original embed. */
.fakthusty-sd-page {width:min(920px,calc(100% - 32px));max-width:100%;margin:32px auto 65px;box-sizing:border-box}
.fakthusty-sd-page .sd-back {margin:0 0 23px;font-size:16px}
.fakthusty-sd-page h1 {font-size:clamp(25px,3vw,38px);line-height:1.25;margin:8px 0 18px}
.fakthusty-sd-page .sd-description {line-height:1.65;margin:0 0 28px}
.fakthusty-sd-page .sd-widget-area {width:100%;max-width:100%;min-height:100px;overflow:visible}
.fakthusty-sd-page .sd-discussion-mount {width:100%;max-width:100%}
.fakthusty-sd-page .sd-status {line-height:1.5;padding:12px 0}
.fakthusty-sd-page .sd-status:empty {display:none}
.fakthusty-sd-page .sd-next {border-top:1px solid #d6d6d6;padding-top:20px;margin-top:40px}
.fakthusty-sd-page .sd-next ul {list-style:disc;padding-left:22px}
.fakthusty-sd-page .sd-next li {margin:10px 0;line-height:1.45}

/* The theme's global link color must not bleed into discussion-page links.
 * :visited stays dark; hover, keyboard focus and click are site-accented.
 */
.fakthusty-sd-page nav.sd-next li a:link,
.fakthusty-sd-page nav.sd-next li a:visited,
.fakthusty-sd-page nav.sd-back a:link,
.fakthusty-sd-page nav.sd-back a:visited {
  color: #171717 !important;
  text-decoration-color: currentColor;
}
.fakthusty-sd-page nav.sd-next li a:hover,
.fakthusty-sd-page nav.sd-next li a:focus-visible,
.fakthusty-sd-page nav.sd-next li a:active,
.fakthusty-sd-page nav.sd-back a:hover,
.fakthusty-sd-page nav.sd-back a:focus-visible,
.fakthusty-sd-page nav.sd-back a:active {
  color: #E30613 !important;
  text-decoration-color: currentColor;
}

@media (max-width: 700px) {
  body.single-post .rpn-sls-bar--bottom {column-gap:12px}
  body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:link,
  body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:visited {
    font-size: 15px !important;
    gap: 4px;
  }
  body.single-post .rpn-sls-bar--bottom a.sd-discussion-link svg {width:19px;height:19px;flex-basis:19px}
  body.single-post .rpn-sls-bar--bottom .rpn-sls-share__label {display:none}
}
@media (max-width: 360px) {
  body.single-post .rpn-sls-bar--bottom {gap:8px}
  body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:link,
  body.single-post .rpn-sls-bar--bottom a.sd-discussion-link:visited {font-size:14px !important}
}


/* MOBILE SINGLE-ROW BAR: Same row across phones and desktops.
 * Keep Like + Discussion + Facebook + X side by side; only hide the SHARE
 * label below 680px. Never reparent/recreate the Seznam Like component.
 * Scoped to the two known Seznam Like bars, not the global site header.
 */
@media (max-width: 680px) {
  body.single-post .rpn-sls-bar.rpn-sls-bar--bottom,
  body.single-post .rpn-sls-bar.rpn-sls-bar--top {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: clamp(4px, 1.4vw, 8px) !important;
    padding-left: 2px !important;
    padding-right: 2px !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  body.single-post .rpn-sls-bar--top > .rpn-sls-like,
  body.single-post .rpn-sls-bar--bottom > .rpn-sls-like {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
    align-self: center;
  }
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link,
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link:link,
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link:visited {
    align-self: center;
    min-width: 0 !important;
    max-width: 100% !important;
    flex: 0 1 auto !important;
    gap: 3px !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1.25 !important;
    font-size: clamp(13px, 3.4vw, 15px) !important;
    white-space: nowrap !important;
  }
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link svg {
    flex: 0 0 17px !important;
    width: 17px !important;
    height: 17px !important;
  }
  body.single-post .rpn-sls-bar--top > .rpn-sls-share,
  body.single-post .rpn-sls-bar--bottom > .rpn-sls-share {
    display: flex !important;
    flex-flow: row nowrap !important;
    justify-content: flex-end !important;
    align-items: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: max-content !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    gap: clamp(3px, 1.4vw, 9px) !important;
    white-space: nowrap !important;
  }
  body.single-post .rpn-sls-bar--top .rpn-sls-share__label,
  body.single-post .rpn-sls-bar--bottom .rpn-sls-share__label {
    display: none !important;
  }
  body.single-post .rpn-sls-bar--top .rpn-sls-share__icon,
  body.single-post .rpn-sls-bar--bottom .rpn-sls-share__icon {
    width: 19px !important;
    height: 19px !important;
    min-width: 19px !important;
    min-height: 19px !important;
    flex: 0 0 19px !important;
  }
}
@media (max-width: 360px) {
  body.single-post .rpn-sls-bar.rpn-sls-bar--top,
  body.single-post .rpn-sls-bar.rpn-sls-bar--bottom {
    gap: 3px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link,
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link:link,
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link:visited {
    font-size: 13px !important;
    gap: 2px !important;
  }
  body.single-post .rpn-sls-bar--bottom > a.sd-discussion-link svg {
    width: 16px !important;
    height: 16px !important;
    flex-basis: 16px !important;
  }
  body.single-post .rpn-sls-bar--bottom > .rpn-sls-share,
  body.single-post .rpn-sls-bar--top > .rpn-sls-share {gap: 4px !important;}
  body.single-post .rpn-sls-bar--bottom .rpn-sls-share__icon,
  body.single-post .rpn-sls-bar--top .rpn-sls-share__icon {
    width: 17px !important;
    height: 17px !important;
    min-width: 17px !important;
    min-height: 17px !important;
    flex-basis: 17px !important;
  }
}

/* Responsive container for the dedicated discussion page; never alter the
 * Seznam login, third-party iframe height, internal controls or page header.
 */
@media (max-width: 760px) {
  body .fakthusty-sd-page {
    width: calc(100% - 24px) !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 18px auto 40px !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere;
  }
  body .fakthusty-sd-page h1 {
    font-size: clamp(22px, 5.8vw, 30px) !important;
    line-height: 1.28 !important;
    overflow-wrap: anywhere;
    hyphens: auto;
  }
  body .fakthusty-sd-page h2 {
    font-size: clamp(19px, 4.8vw, 25px) !important;
    line-height: 1.3 !important;
    overflow-wrap: anywhere;
  }
  body .fakthusty-sd-page .sd-description,
  body .fakthusty-sd-page .sd-back,
  body .fakthusty-sd-page .sd-next,
  body .fakthusty-sd-page .sd-status {
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }
  body .fakthusty-sd-page .sd-widget-area,
  body .fakthusty-sd-page .sd-discussion-mount {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  body .fakthusty-sd-page .sd-discussion-mount > * {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
  body .fakthusty-sd-page .sd-discussion-mount iframe {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    display: block;
    /* Height is owned by the Seznam embed and is NOT overridden. */
  }
  body .fakthusty-sd-page .sd-next ul {
    max-width: 100%;
    min-width: 0;
    padding-left: 21px !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }
  body .fakthusty-sd-page .sd-next a { overflow-wrap: anywhere; }
}

