/* DCG Smart Bar – pasek nad nagłówkiem */

.dcg-smart-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99999;
  font-family: "Poppins", sans-serif;
  line-height: 1.5;
  box-sizing: border-box;
}

.dcg-smart-bar *,
.dcg-smart-bar *::before,
.dcg-smart-bar *::after {
  box-sizing: border-box;
}

/* Przesunięcie elementów motywu zakotwiczonych u góry o wysokość smart baru.
   --dcg-sb-height ustawia JS na podstawie realnej wysokości paska.
   Motyw: header#header (fixed top:0 / top:62px <900px), .above-header-info
   (fixed top:0, widoczny <900px), main (margin-top: var(--header-height)).
   Na desktopie smart bar jest u samej góry (top:0); na mobile wchodzi POD
   czerwony pasek .above-header-info (patrz media query niżej). */
:root {
  --dcg-sb-height: 0px;
}

header#header {
  top: var(--dcg-sb-height) !important;
}

main {
  margin-top: calc(var(--header-height, 0px) + var(--dcg-sb-height)) !important;
}

@media (max-width: 899px) {
  /* Na mobile czerwony pasek motywu (.above-header-info, top:0, wys. 62px)
	   zostaje na samej górze, a smart bar wchodzi POD niego – zgodnie z projektem
	   (czerwony pasek → smart bar → nagłówek). */
  .dcg-smart-bar {
    top: 62px;
  }

  header#header {
    top: calc(62px + var(--dcg-sb-height)) !important;
  }
}

/* Wymiary wg Figmy: padding 4px 16px, gap 12px, wysokość ~37px (hug). */
.dcg-smart-bar__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 4px 16px;
}

.dcg-smart-bar .dcg-smart-bar__text {
  font-size: 14px;
  font-weight: 500;
}

/* Kolor z pola ACF (kolor tekstu) wymuszony także na elementach WYSIWYG.
   Motyw nadaje <p> własny kolor, który nadpisywał dziedziczenie z paska. */
.dcg-smart-bar .dcg-smart-bar__text,
.dcg-smart-bar .dcg-smart-bar__text p,
.dcg-smart-bar .dcg-smart-bar__text span,
.dcg-smart-bar .dcg-smart-bar__text strong,
.dcg-smart-bar .dcg-smart-bar__text b,
.dcg-smart-bar .dcg-smart-bar__text a,
.dcg-smart-bar .dcg-smart-bar__countdown {
  color: var(--dcg-sb-text, #ffffff) !important;
}

.dcg-smart-bar__text p {
  margin: 0;
}

.dcg-smart-bar__text a {
  text-decoration: underline;
}

.dcg-smart-bar .dcg-smart-bar__countdown {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

/* Przycisk CTA – kolory dziedziczy z motywu (.a-primary-btn--red);
   tu nadpisujemy wymuszaną przez motyw wysokość (height:56px, padding:17px 24px).
   Selektor "a.dcg-smart-bar__cta" ma wyższą specyficzność niż ".new-styles .a-primary-btn". */
.dcg-smart-bar a.dcg-smart-bar__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  height: auto;
  min-height: 0;
  padding: 7px 18px;
  font-size: 13px;
  line-height: 1.3;
}

.dcg-smart-bar__cta-arrow {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 0;
}

.dcg-smart-bar__cta-arrow svg {
  display: block;
  width: 10px;
  height: 8px;
}

/* Tablet / mobile */
@media (max-width: 768px) {
  .dcg-smart-bar__inner {
    padding: 4px 12px;
    gap: 10px;
  }

  .dcg-smart-bar__text,
  .dcg-smart-bar .dcg-smart-bar__countdown {
    font-size: 12px;
  }
}
