/*
Theme Name:   Zagłębie.NEWS
Theme URI:    https://zaglebie.news
Description:  Motyw potomny ColorMag dla portalu zaglebie.news.
Author:       zaglebie.news
Template:     colormag
Version:      0.1.0
Requires PHP: 8.3
Text Domain:  zaglebie
License:      GPL-2.0-or-later
*/

/* Style portalu dodajemy tutaj; ColorMag ładuje ten plik automatycznie (get_stylesheet_uri). */

/* --- Udostępnianie pod wpisem (inc/share.php) --- */
.zn-share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 28px 0 12px; padding: 0; }
.zn-share a.zn-share__btn,
.zn-share a.zn-share__btn:visited {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  box-sizing: border-box; width: 44px; height: 44px; padding: 0; margin: 0;
  border: 1px solid #dcdcdc; border-radius: 8px; background: #fff;
  color: #2b2b2b; line-height: 1; text-decoration: none; box-shadow: none;
  transition: border-color .15s ease, color .15s ease;
}
.zn-share a.zn-share__btn svg { width: 20px; height: 20px; display: block; flex: none; }
.zn-share a.zn-share__btn:hover,
.zn-share a.zn-share__btn:focus-visible { border-color: #0E8A3E; color: #0E8A3E; }
.zn-share__msg { font-size: 13px; color: #0E8A3E; margin-left: 4px; }

/* --- Przycisk „Zgłoś temat” w menu głównym --- */
.cm-primary-nav ul li.zn-menu-cta { display: flex; align-items: center; margin-left: 8px; }
.cm-primary-nav ul li.zn-menu-cta > a {
  background: #E30613; color: #fff; border-radius: 6px; padding: 8px 14px; line-height: 1.2;
  font-weight: 600; transition: background-color .15s ease;
}
.cm-primary-nav ul li.zn-menu-cta > a:hover,
.cm-primary-nav ul li.zn-menu-cta > a:focus-visible { background: #b8050f; color: #fff; }
.cm-primary-nav ul li.zn-menu-cta:hover > a { color: #fff; }

/* Pasek PILNE: jeden wiersz, długie tytuły ucinane wielokropkiem. */
.cm-header-builder .newsticker li { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --- Tagi pod artykułem (inc/share.php) --- */
.zn-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 28px 0 0; }
.zn-tags__label { font-weight: 600; color: #2b2b2b; }
.zn-tags__list { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.zn-tags__list li { margin: 0; }
.zn-tags__list a {
  display: inline-block; padding: 4px 10px; border: 1px solid #dcdcdc; border-radius: 999px;
  font-size: 14px; color: #2b2b2b; text-decoration: none; background: #fff;
}
.zn-tags__list a:hover, .zn-tags__list a:focus-visible { border-color: #0E8A3E; color: #0E8A3E; }

/* --- Lewy slot reklamowy 160×600 (inc/ads.php) --- */
.zn-ad--left { display: none; }
@media (min-width: 1500px) {
  /* Kolumna od początku treści (pod menu) do stopki; reklama przykleja się przy przewijaniu. */
  /* overflow-x: hidden (ColorMag) psuje position: sticky — clip nie tworzy kontenera przewijania. */
  html body, html body:not(.woocommerce-page).cm-normal-container { position: relative; overflow-x: clip; overflow-y: visible; }
  .zn-ad--left {
    display: block; position: absolute; z-index: 5; top: 360px; bottom: 420px;
    left: calc((100vw - 1140px) / 2 - 180px); width: 160px;
  }
  .zn-ad--left > * { position: sticky; top: 40px; }
  .admin-bar .zn-ad--left { top: 392px; }
  .admin-bar .zn-ad--left > * { top: 72px; }
}
.zn-ad__placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 160px; height: 600px; box-sizing: border-box; border: 1px dashed #c7c7c7;
  background: #f4f4f4; color: #8a8a8a; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; text-align: center;
}
.zn-ad__placeholder small { font-size: 12px; text-transform: none; }
