/* =====================================================================
   AUDYTEL — WEBINAR ITK 25.06.2026 — STYLES
   =====================================================================
   Plik: audytel-itk.css
   Lokalizacja: /wp-content/themes/generatepress-child/css/audytel-itk.css

   Brand color: #922221 (Audytel)
   Hover/active: #7A1C1B

   Komponent:
   - Floating expanding pill po prawej stronie, pionowo wycentrowane
   - top: 50% + przesunięcie żeby nie kolidowało gdyby równolegle
     pokazywała się pastylka ESG (jednak normalnie wyklucza się
     wzajemnie warunkiem URL — albo /esg/ albo /informatyka-i-telekomunikacja/)
   - Stan spoczynku: kółko 86×86 z napisem "WEBINAR / 25.06"
     z lekkim bounce'em żeby przyciągnąć uwagę
   - Hover/focus: rozwija się w prostokąt z pełną treścią
   - Podwójna ramka: 3px czerwona + 5px biała inset (jak ESG)

   Scope: .audytel-itk-* — nie nadpisuje innych elementów.
   ===================================================================== */


/* ===== RESET LOKALNY ===== */
.audytel-itk-pill,
.audytel-itk-pill * {
  box-sizing: border-box;
}

.audytel-itk-pill a {
  text-decoration: none !important;
  color: inherit !important;
}


/* =========================================================
   KONTENER GŁÓWNY — floating, prawy bok, pionowo wycentrowany
   ========================================================= */
.audytel-itk-pill {
  position: fixed;
  top: 50%;
  right: 24px;
  transform: translateY(-50%);
  z-index: 9990;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

/* Stan po 3 sekundach — JS dodaje .is-revealed */
.audytel-itk-pill.is-revealed {
  opacity: 1;
  pointer-events: auto;
}

/* Stan startowy / po zamknięciu */
.audytel-itk-pill.is-hidden,
.audytel-itk-pill.is-closed {
  display: none;
}


/* =========================================================
   LINK GŁÓWNY — flex container kółka i tekstu
   Podwójna ramka: 3px czerwona + 5px biała inset
   ========================================================= */
.audytel-itk-pill__link {
  display: flex;
  align-items: center;
  background: #922221;
  border: 3px solid #922221;
  border-radius: 999px;
  box-shadow:
    inset 0 0 0 5px #ffffff,
    0 8px 22px rgba(146, 34, 33, 0.45);
  width: 86px;
  height: 86px;
  overflow: hidden;
  transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              border-radius 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.2s ease,
              background 0.2s ease;
  cursor: pointer;
  animation: itkPillBounce 2.4s ease-in-out infinite;
}

/* Rozszerzenie na hover / focus / aktywny stan — staje się prostokątem */
.audytel-itk-pill:hover .audytel-itk-pill__link,
.audytel-itk-pill:focus-within .audytel-itk-pill__link,
.audytel-itk-pill.is-expanded .audytel-itk-pill__link {
  width: 320px;
  border-radius: 18px;
  background: #7A1C1B;
  border-color: #7A1C1B;
  box-shadow:
    inset 0 0 0 5px #ffffff,
    0 12px 32px rgba(146, 34, 33, 0.6);
  animation: none; /* po rozwinięciu zatrzymujemy bounce */
}

/* Bounce-animacja kółka — lekkie skakanie żeby przyciągnąć uwagę */
@keyframes itkPillBounce {
  0%, 100% { transform: translateY(0); }
  15%      { transform: translateY(-6px); }
  30%      { transform: translateY(0); }
  45%      { transform: translateY(-3px); }
  60%      { transform: translateY(0); }
}


/* =========================================================
   KÓŁKO Z NAPISEM "WEBINAR" + "25.06"
   ========================================================= */
.audytel-itk-pill__circle {
  flex-shrink: 0;
  width: 86px;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.audytel-itk-pill__badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
  transition: transform 0.3s ease;
}

.audytel-itk-pill__badge-line1 {
  font-size: 11px;
  letter-spacing: 0.12em;
  font-weight: 700;
  margin-bottom: 3px;
}

.audytel-itk-pill__badge-line2 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.92;
}

.audytel-itk-pill:hover .audytel-itk-pill__badge {
  transform: scale(1.05);
}


/* =========================================================
   TEKST W PROSTOKĄCIE — ukryty domyślnie, fade-in przy rozwinięciu
   ========================================================= */
.audytel-itk-pill__text {
  display: flex;
  flex-direction: column;
  padding: 0 22px 0 8px;
  white-space: nowrap;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.25s ease 0.1s, transform 0.25s ease 0.1s;
  color: #ffffff;
}

.audytel-itk-pill:hover .audytel-itk-pill__text,
.audytel-itk-pill:focus-within .audytel-itk-pill__text,
.audytel-itk-pill.is-expanded .audytel-itk-pill__text {
  opacity: 1;
  transform: translateX(0);
}

.audytel-itk-pill__eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.78;
  margin-bottom: 4px;
}

.audytel-itk-pill__title {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}

.audytel-itk-pill__cta {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.95;
  letter-spacing: 0.02em;
}


/* =========================================================
   PRZYCISK ZAMKNIĘCIA (×) — pojawia się tylko na hover
   ========================================================= */
.audytel-itk-pill__close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
  color: #555;
  padding: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.2s ease, transform 0.2s ease, background 0.15s ease;
}

.audytel-itk-pill:hover .audytel-itk-pill__close,
.audytel-itk-pill:focus-within .audytel-itk-pill__close,
.audytel-itk-pill.is-expanded .audytel-itk-pill__close {
  opacity: 1;
  transform: scale(1);
}

.audytel-itk-pill__close:hover {
  background: #f5f5f5;
  color: #922221;
}


/* =========================================================
   MOBILE — kółko na prawym boku, tap rozwija prostokąt
   ========================================================= */
@media (max-width: 768px) {
  .audytel-itk-pill {
    right: 16px;
  }

  /* Domyślnie samo kółko */
  .audytel-itk-pill__link {
    width: 86px;
  }

  /* Po tapie JS dodaje .is-expanded — wtedy prostokąt się rozwija */
  .audytel-itk-pill.is-expanded .audytel-itk-pill__link,
  .audytel-itk-pill:focus-within .audytel-itk-pill__link {
    width: 280px;
  }

  /* Tekst pokazuje się dopiero przy rozwinięciu */
  .audytel-itk-pill__text {
    opacity: 0;
    transform: translateX(-8px);
  }
  .audytel-itk-pill.is-expanded .audytel-itk-pill__text,
  .audytel-itk-pill:focus-within .audytel-itk-pill__text {
    opacity: 1;
    transform: translateX(0);
  }

  /* X widoczny dopiero przy rozwinięciu */
  .audytel-itk-pill__close {
    opacity: 0;
    transform: scale(0.7);
  }
  .audytel-itk-pill.is-expanded .audytel-itk-pill__close,
  .audytel-itk-pill:focus-within .audytel-itk-pill__close {
    opacity: 1;
    transform: scale(1);
  }

  .audytel-itk-pill__title { font-size: 15px; }
}

/* Bardzo małe ekrany — zwiń kółko */
@media (max-width: 380px) {
  .audytel-itk-pill__link {
    width: 72px;
    height: 72px;
  }

  .audytel-itk-pill__circle {
    width: 72px;
    height: 72px;
  }

  .audytel-itk-pill__badge-line1 { font-size: 10px; }
  .audytel-itk-pill__badge-line2 { font-size: 11px; }
}

/* Respect prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .audytel-itk-pill__link {
    animation: none;
  }
}
