/* ============================================================
   COMPONENTS.CSS — Reusable UI components
   aventium.ai static rebuild
   Etap 1.2: Buttons, Site Header, Site Footer
   Depends on: tokens.css, base.css (must be loaded first)
   ============================================================ */


/* ==========================================================
   SEKCJA 1: BUTTONS
   ========================================================== */

.btn {
  /* Reset */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  /* Wygląd */
  padding: 0.875rem 1.75rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  /* Przejścia */
  transition:
    background-color var(--duration-base) var(--ease-default),
    border-color     var(--duration-base) var(--ease-default),
    color            var(--duration-base) var(--ease-default),
    transform        var(--duration-fast) var(--ease-default),
    box-shadow       var(--duration-base) var(--ease-default);
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Primary — cyan fill */
.btn--primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
  border-color: var(--primary);
}

.btn--primary:hover {
  background-color: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-foreground);
  transform: scale(1.02);
  box-shadow: var(--shadow-glow-cyan);
}

.btn--primary:active {
  transform: scale(0.98);
}

/* Outline — transparent z cyan bordem */
.btn--outline {
  background-color: transparent;
  color: var(--primary);
  border-color: var(--primary);
}

.btn--outline:hover {
  background-color: var(--primary-10);
  color: var(--primary);
}

/* Large modifier */
.btn--large {
  padding: 1.125rem 2.5rem;
  font-size: 1.125rem;
}


/* ==========================================================
   SEKCJA 2: SITE HEADER
   ========================================================== */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: var(--z-header);
  /* Domyślnie przezroczysty */
  background-color: transparent;
  border-bottom: 1px solid transparent;
  transition:
    background-color var(--duration-slow) var(--ease-default),
    border-color     var(--duration-slow) var(--ease-default),
    backdrop-filter  var(--duration-slow) var(--ease-default);
}

/* Po przewinięciu — blur + ciemne tło */
.site-header.is-scrolled {
  background-color: rgba(15, 13, 46, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom-color: transparent;
}

.site-header__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

/* Logo */
.site-header__logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.site-header__logo img {
  height: 56px;
  width: auto;
}


/* ----------------------------------------------------------
   Hamburger button — tylko mobile
   ---------------------------------------------------------- */

.site-header__hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  color: var(--foreground);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: color var(--transition-fast);
  /* Tylko na mobile — ukrywamy na desktop poniżej */
}

.site-header__hamburger:hover {
  color: var(--primary);
}

.site-header__hamburger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

/* Ikona hamburger — przełączanie open/close przez klasę na nav */
.site-header__hamburger-icon--close {
  display: none;
}

/* Gdy menu otwarte: pokaż X, ukryj 3 kreski */
.primary-nav.is-open ~ * .site-header__hamburger-icon--open,
.site-header.has-open-menu .site-header__hamburger-icon--open {
  display: none;
}

.site-header.has-open-menu .site-header__hamburger-icon--close {
  display: block;
}

/* Prostsze podejście — JS toggleuje klasę na headerze */
.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-icon--open {
  display: none;
}

.site-header__hamburger[aria-expanded="true"] .site-header__hamburger-icon--close {
  display: block;
}


/* ----------------------------------------------------------
   Primary nav — desktop
   ---------------------------------------------------------- */

.primary-nav__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.primary-nav__link {
  position: relative;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--muted-foreground);
  text-decoration: none;
  padding-bottom: 2px;
  transition: color var(--duration-fast) ease;
}

.primary-nav__link:hover {
  color: var(--foreground);
}

/* Animowane podkreślenie */
.primary-nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: var(--primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--duration-base) ease;
}

.primary-nav__link:hover::after,
.primary-nav__link.is-active::after {
  transform: scaleX(1);
}

.primary-nav__link.is-active {
  color: var(--foreground);
}


/* ----------------------------------------------------------
   Responsywność — mobile first
   ---------------------------------------------------------- */

/* Mobile: hamburger widoczny, nav schowany */
@media (max-width: 767px) {
  .primary-nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: rgba(15, 13, 46, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    /* Schowany — przesuń w górę i wygaś */
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition:
      transform var(--duration-slow) var(--ease-default),
      opacity   var(--duration-slow) var(--ease-default);
  }

  .primary-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .primary-nav__list {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1rem 1.5rem 1.5rem;
  }

  .primary-nav__list > li {
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  .primary-nav__list > li:last-child {
    border-bottom: none;
    padding-top: 1rem;
  }

  .primary-nav__link {
    display: block;
    padding: 0.875rem 0;
    font-size: var(--text-base);
    color: var(--foreground);
  }

  .primary-nav__link::after {
    display: none; /* Na mobile bez podkreślenia — za ciasno */
  }

  .primary-nav__list .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Desktop: hamburger schowany, nav widoczna */
@media (min-width: 768px) {
  .site-header__hamburger {
    display: none;
  }

  .primary-nav {
    /* Reset mobile styles */
    position: static;
    transform: none;
    opacity: 1;
    pointer-events: auto;
    background: none;
    backdrop-filter: none;
    border: none;
  }
}


/* ==========================================================
   SEKCJA 3: SITE FOOTER
   ========================================================== */

.site-footer {
  background-color: var(--footer-bg);
  padding-top: 4rem;
  padding-bottom: 2rem;
}

/* Grid 3 kolumny (desktop) / 1 kolumna (mobile) */
.site-footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

@media (min-width: 768px) {
  .site-footer__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

/* Kolumna brand */
.site-footer__col--brand .site-footer__logo img {
  height: 62px;
  width: auto;
}

.site-footer__tagline {
  font-style: italic;
  color: var(--primary);
  font-size: var(--text-sm);
  margin-top: 1rem;
  max-width: none; /* override base.css p */
}

.site-footer__slogan {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  margin-top: 0.5rem;
  max-width: none;
}

.footer__social {
  margin-top: var(--space-4);
}

.footer__social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--muted-foreground);
  border-radius: var(--radius-sm);
  transition: color 0.2s ease, background-color 0.2s ease;
}

.footer__social-link:hover {
  color: var(--primary);
  background-color: rgba(255, 255, 255, 0.05);
}

/* Nagłówki kolumn */
.site-footer__heading {
  /* Reset base.css h2 */
  font-size: var(--text-xs);
  font-weight: var(--font-semibold);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin-bottom: 1rem;
  max-width: none;
  /* Upewnij się że linia bazowa h2 nie nadpisuje */
  line-height: var(--leading-normal);
}

/* Lista nawigacyjna w stopce */
.site-footer__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.site-footer__list a {
  color: var(--foreground);
  text-decoration: none;
  font-size: var(--text-sm);
  transition: color var(--transition-fast);
}

.site-footer__list a:hover {
  color: var(--primary);
}

/* Adres firmy */
.site-footer__address {
  font-style: normal;
  line-height: 1.7;
  color: var(--muted-foreground);
  font-size: var(--text-sm);
}

/* Dolna belka */
.site-footer__bottom {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
}

@media (min-width: 768px) {
  .site-footer__bottom {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.site-footer__copyright {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  max-width: none;
}

.site-footer__legal {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-footer__legal a,
.site-footer__legal .site-footer__link-button {
  color: var(--muted-foreground);
  font-size: var(--text-sm);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.site-footer__legal a:hover,
.site-footer__legal .site-footer__link-button:hover {
  color: var(--primary);
}


/* ==========================================================
   SEKCJA 4: LINK-BUTTON — button stylowany jak link
   ========================================================== */

.site-footer__link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
}

.site-footer__link-button:hover {
  color: var(--primary);
}

.site-footer__link-button:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 2px;
}


/* ==========================================================
   SEKCJA 5: FINAL CTA — przeniesione z home.css
   Reużywane przez: index.html (.cta) i automatyzacja.html (.cta.auto-cta-final)
   ========================================================== */

.cta {
  position: relative;
  overflow: hidden;
  /* background: var(--background) domyślne — hex pattern jako overlay */
}


/* ----------------------------------------------------------
   FinalCTA — tło: hex SVG (opacity 0.03 — bardzo subtelne)
   ---------------------------------------------------------- */

.cta__hex-bg {
  position: absolute;
  inset: 0;
  background-image: var(--hex-pattern-url);
  background-size: 60px 52px;
  background-repeat: repeat;
  opacity: 0.03;               /* oryginał: opacity-[0.03] */
  pointer-events: none;
  z-index: 0;
}


/* ----------------------------------------------------------
   FinalCTA — wrapper treści (nad hex bg)
   ---------------------------------------------------------- */

.cta__inner {
  position: relative;
  z-index: 10;
  text-align: center;
}


/* ----------------------------------------------------------
   FinalCTA — nagłówek (font-size i max-width dziedziczone z base.css h2)
   ---------------------------------------------------------- */

.cta__heading {
  text-align: center;
  margin-inline: auto;
  margin-bottom: var(--space-6);    /* 24px — oryginał: mb-6 */
}


/* ----------------------------------------------------------
   FinalCTA — lead paragraph
   ---------------------------------------------------------- */

.cta__lead {
  max-width: var(--text-max-sm);    /* 700px */
  margin-inline: auto;
  margin-bottom: var(--space-20);   /* 80px — oryginał: mb-20 */
  font-size: var(--text-lg);        /* 18px mobile */
  line-height: var(--leading-relaxed);
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .cta__lead {
    font-size: var(--text-xl);      /* 22px desktop — oryginał: md:text-[22px] */
  }
}


/* ----------------------------------------------------------
   FinalCTA — rząd przycisków (gdy są 2 przyciski, np. /automatyzacja)
   backup: flex-col sm:flex-row gap-4 justify-center mb-6
   ---------------------------------------------------------- */

.cta__buttons {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);              /* 16px */
  justify-content: center;
  align-items: center;
  margin-bottom: var(--space-6);
}

@media (min-width: 640px) {
  .cta__buttons {
    flex-direction: row;
  }
}


/* ----------------------------------------------------------
   FinalCTA — główny przycisk CTA (rozszerza .btn .btn--primary)
   ---------------------------------------------------------- */

.cta__btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);              /* 8px — oryginał: mr-2 na ikonie */
  font-size: var(--text-base);
  padding: 1rem 2rem;               /* py-4 px-8 */
  font-weight: var(--font-semibold);
  transition:
    transform var(--duration-fast) var(--ease-default),
    box-shadow var(--duration-fast) var(--ease-default),
    background-color var(--duration-fast) var(--ease-default);
}

.cta__btn:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-glow-cyan-strong);  /* 0 0 30px rgba(6,182,212,0.4) */
  background-color: var(--primary-hover);       /* #22D3EE */
}

.cta__btn:active {
  transform: scale(0.98);
}


/* ----------------------------------------------------------
   FinalCTA — nota pod buttonem
   ---------------------------------------------------------- */

.cta__note {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  margin-top: var(--space-6);       /* 24px — oryginał: mt-6 */
  max-width: none;                  /* reset: reset.css ustawia max-width: 75ch na p */
  text-align: center;
}


/* ==========================================================
   SEKCJA 6: INDUSTRIES — przeniesione z home.css
   Reużywane przez: index.html (.industries) i automatyzacja.html (.auto-industries)
   UWAGA: .industries { background-color } zostaje w home.css (homepage-specific:
          var(--surface-alt) #181540 vs var(--section-alt) #15123A na /automatyzacja)
   ========================================================== */

/* ----------------------------------------------------------
   Industries — nagłówek + lead
   ---------------------------------------------------------- */

.industries__heading {
  text-align: center;
  margin-inline: auto;
  margin-bottom: var(--space-6);    /* 24px — oryginał: mb-6 */
}

.industries__lead {
  text-align: center;
  max-width: var(--text-max-sm);    /* 700px */
  margin-inline: auto;
  margin-bottom: var(--space-20);   /* 80px — oryginał: mb-20 */
  font-size: var(--text-lg);        /* 18px mobile — oryginał: text-lg */
  line-height: var(--leading-relaxed);
  color: var(--muted-foreground);
}

@media (min-width: 768px) {
  .industries__lead {
    font-size: var(--text-xl);      /* 22px desktop — oryginał: md:text-[22px] */
  }
}


/* ----------------------------------------------------------
   Industries — grid kafelek (2 kol. mobile → 4 kol. ≥768px)
   Oryginał: grid-cols-2 md:grid-cols-4 gap-4 md:gap-6 max-w-4xl
   max-w-4xl = 896px — z 7 kafelkami drugi rząd ma 3 (rwany, jak w oryginale)
   ---------------------------------------------------------- */

.industries__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;                         /* 16px — oryginał: gap-4 */
  max-width: 896px;                  /* max-w-4xl */
  margin-inline: auto;
  margin-bottom: var(--space-10);    /* 40px — oryginał: mb-10 */
}

@media (min-width: 768px) {
  .industries__grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;                     /* 24px — oryginał: md:gap-6 */
  }
}


/* ----------------------------------------------------------
   Industries — pojedynczy kafelek
   ---------------------------------------------------------- */

.industries__tile {
  background-color: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);      /* 16px */
  padding: var(--space-5);           /* 20px — oryginał: p-5 */
  text-align: center;
  transition:
    transform var(--duration-base) var(--ease-default),
    border-color var(--duration-base) var(--ease-default),
    box-shadow var(--duration-base) var(--ease-default);
}

@media (min-width: 768px) {
  .industries__tile {
    padding: var(--space-6);         /* 24px — oryginał: md:p-6 */
  }
}

.industries__tile:hover {
  transform: translateY(-4px);
  border-color: var(--border-primary-strong);
  box-shadow: var(--shadow-glow-cyan);
}

/* Ikona kafelka (32px, wyśrodkowana) */
.industries__tile-icon {
  width: 32px;
  height: 32px;
  color: var(--primary);
  display: block;
  margin-inline: auto;
  margin-bottom: var(--space-3);     /* 12px — oryginał: mb-3 */
  transition:
    transform var(--duration-base) var(--ease-default),
    filter var(--duration-base) var(--ease-default);
}

.industries__tile:hover .industries__tile-icon {
  transform: scale(1.1);
  filter: drop-shadow(0 0 8px rgba(6, 182, 212, 0.4));
}

/* Nazwa branży (h3 — override base.css 24px → 14px) */
.industries__tile-name {
  font-size: var(--text-sm);         /* 14px — oryginał: text-sm */
  font-weight: var(--font-semibold);
  color: var(--foreground);
  margin-bottom: var(--space-1);     /* 4px — oryginał: mb-1 */
  max-width: none;
}

/* Opis branży */
.industries__tile-desc {
  font-size: var(--text-xs);         /* 12px — oryginał: text-xs */
  color: var(--muted-foreground);
  line-height: var(--leading-relaxed);
}


/* ----------------------------------------------------------
   Industries — footer "Twoja branża nie jest na liście?"
   (używany na homepage, nieobecny na /automatyzacja)
   ---------------------------------------------------------- */

.industries__footer {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  margin-inline: auto;              /* centruje blok (reset.css: max-width 75ch bez margin-inline) */
}

.industries__contact {
  color: var(--primary);
  font-weight: var(--font-medium);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);               /* 4px */
}

.industries__contact:hover {
  text-decoration: underline;
}

.industries__contact svg {
  transition: transform var(--duration-fast) var(--ease-default);
}

.industries__contact:hover svg {
  transform: translateX(4px);
}


/* ============================================================
   SEKCJA 7: FILLOUT MODAL
   Natywny <dialog> HTML5 — focus trap i Escape wbudowane
   Interakcja: js/modal.js
   ============================================================ */

.fillout-modal {
  /* Reset natywnego stylowania <dialog> */
  border: none;
  padding: 0;
  background: transparent;

  /* Layout */
  width: 90vw;
  max-width: 800px;
  height: 85vh;
  max-height: 800px;

  /* Wizualne */
  border-radius: var(--radius);          /* 16px */
  background: var(--card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* Wyśrodkowanie — nadpisuje natywne position:absolute top:0 left:0 */
  margin: auto;
  position: fixed;
  inset: 0;
}

/* Backdrop */
.fillout-modal::backdrop {
  background: rgba(15, 13, 46, 0.85);
  backdrop-filter: blur(8px);
}

/* Przycisk X */
.fillout-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 10;

  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--foreground);

  width: 40px;
  height: 40px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-default);
}

.fillout-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Iframe */
.fillout-modal__iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: var(--radius);
  display: block;
}

/* Mobile: pełny ekran */
@media (max-width: 768px) {
  .fillout-modal {
    width: 100vw;
    height: 100svh;
    max-width: 100vw;
    max-height: 100svh;
    border-radius: 0;
  }

  .fillout-modal__iframe {
    border-radius: 0;
  }
}


/* ============================================================
   SEKCJA 8: COOKIE CONSENT
   Banner (position fixed bottom) + Modal ustawień
   Interakcja: js/cookies.js
   ============================================================ */

/* ----------------------------------------------------------
   Cookie Banner
   ---------------------------------------------------------- */

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;

  background: rgba(28, 26, 69, 0.96);  /* var(--card) #1C1A45 z alpha */
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 1rem 0;

  /* Slide-up animation */
  transform: translateY(100%);
  transition: transform 300ms ease;
}

/* Widoczny: js dodaje .is-visible */
.cookie-banner.is-visible {
  transform: translateY(0);
}

.cookie-banner__inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

@media (min-width: 768px) {
  .cookie-banner__inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.cookie-banner__text {
  flex: 1;
  max-width: 600px;
}

.cookie-banner__title {
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  color: var(--foreground);
  margin-bottom: 0.25rem;
  max-width: none;
}

.cookie-banner__desc {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  max-width: none;
}

.cookie-banner__link {
  color: var(--primary);
  text-decoration: underline;
}

.cookie-banner__link:hover {
  color: var(--primary-hover);
}

.cookie-banner__buttons {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}

@media (min-width: 640px) {
  .cookie-banner__buttons {
    flex-direction: row;
    align-items: center;
  }
}


/* ----------------------------------------------------------
   Cookie Modal — ustawienia szczegółowe
   ---------------------------------------------------------- */

.cookie-modal {
  /* Reset natywnego <dialog> */
  border: none;
  padding: 0;
  background: transparent;

  /* Layout */
  width: 90vw;
  max-width: 600px;
  max-height: 700px;

  /* Wizualne */
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);

  /* Wyśrodkowanie */
  margin: auto;
  position: fixed;
  inset: 0;
}

.cookie-modal::backdrop {
  background: rgba(15, 13, 46, 0.85);
  backdrop-filter: blur(8px);
}

.cookie-modal__inner {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 700px;
  overflow-y: auto;
}

@media (max-width: 640px) {
  .cookie-modal__inner {
    padding: 1.5rem;
  }
}

/* Nagłówek */
.cookie-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-shrink: 0;
}

.cookie-modal__title {
  font-size: 1.5rem;            /* 24px */
  font-weight: var(--font-bold);
  color: var(--foreground);
  margin: 0;
  max-width: none;
}

/* Przycisk X — identyczny z .fillout-modal__close */
.cookie-modal__close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid var(--border);
  color: var(--foreground);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--duration-fast) var(--ease-default);
}

.cookie-modal__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Body */
.cookie-modal__body {
  flex: 1;
}

.cookie-modal__desc {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  line-height: var(--leading-relaxed);
  margin-bottom: 1.5rem;
  max-width: none;
}


/* ----------------------------------------------------------
   Cookie Toggle — pojedynczy przełącznik
   ---------------------------------------------------------- */

.cookie-toggle {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.cookie-toggle:last-child {
  border-bottom: none;
}

.cookie-toggle__info {
  flex: 1;
  padding-right: 1rem;
}

.cookie-toggle__name {
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  color: var(--foreground);
  margin-bottom: 0.25rem;
  max-width: none;
}

.cookie-toggle__desc {
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  line-height: var(--leading-relaxed);
  max-width: none;
}

/* Toggle switch */
.cookie-toggle__switch {
  position: relative;
  width: 48px;
  height: 26px;
  display: block;
  flex-shrink: 0;
  margin-top: 0.125rem;   /* optyczne wyrównanie z pierwszą linią tekstu */
}

.cookie-toggle__switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.cookie-toggle__slider {
  position: absolute;
  inset: 0;
  background: var(--border);
  border-radius: 13px;
  cursor: pointer;
  transition: background 200ms ease;
}

.cookie-toggle__slider::before {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: var(--foreground);
  border-radius: 50%;
  transition: transform 200ms ease;
}

/* Stan ON */
.cookie-toggle__switch input:checked ~ .cookie-toggle__slider {
  background: var(--primary);
}

.cookie-toggle__switch input:checked ~ .cookie-toggle__slider::before {
  transform: translateX(22px);
}

/* Disabled (Niezbędne) */
.cookie-toggle__switch input:disabled ~ .cookie-toggle__slider {
  opacity: 0.5;
  cursor: not-allowed;
}


/* ----------------------------------------------------------
   Cookie Modal — stopka
   ---------------------------------------------------------- */

.cookie-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.cookie-modal__link {
  color: var(--primary);
  text-decoration: underline;
  font-size: var(--text-sm);
}

.cookie-modal__link:hover {
  color: var(--primary-hover);
}


/* ============================================================
   FOOTER META — data aktualizacji + copyright
   ============================================================ */

.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--muted-foreground);
  margin-bottom: var(--space-4);
}

.footer-meta__updated time {
  color: var(--foreground);
}

@media (max-width: 640px) {
  .footer-meta {
    flex-direction: column;
    text-align: center;
    gap: var(--space-2);
  }
}
