/* ═══════════════════════════════════════════════════════════
   COOKIE CONSENT BANNER — Instalator24 (HVAC themed)
   Brand: navy + orange, position: bottom-right card
   ═══════════════════════════════════════════════════════════ */

.inst24-consent {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  max-width: 580px;
  z-index: 999999;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 25px 70px rgba(8,23,70,0.25), 0 0 0 1px rgba(8,23,70,0.05);
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.35s ease, transform 0.35s ease;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  color: #3d4460;
  pointer-events: none;
}
.inst24-consent--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.inst24-consent__inner {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon body" "actions actions";
  gap: 16px;
  padding: 24px 26px;
}

.inst24-consent__icon {
  grid-area: icon;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #de982f, #f0b55a);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 8px 24px rgba(222,152,47,0.35);
}

.inst24-consent__body { grid-area: body; min-width: 0; }

.inst24-consent__title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18px;
  font-weight: 800;
  color: #081746;
  margin: 0 0 8px;
  line-height: 1.3;
}

.inst24-consent__text {
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
  color: #4a506a;
}

.inst24-consent__link {
  color: #de982f;
  text-decoration: underline;
  font-weight: 600;
  white-space: nowrap;
}
.inst24-consent__link:hover { color: #c17f1a; }

/* Details (granular controls) */
.inst24-consent__details {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #eef0f6;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 40vh;
  overflow-y: auto;
}

.inst24-consent__cat {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 14px;
  background: #f7f8fc;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.inst24-consent__cat:hover { background: #eef0f6; }

.inst24-consent__cat span:first-child { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.inst24-consent__cat strong {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #081746;
}
.inst24-consent__cat small {
  font-size: 12px;
  line-height: 1.5;
  color: #6b7494;
}

/* Checkbox-hidden, custom switch */
.inst24-consent__cat input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.inst24-consent__switch {
  width: 42px;
  height: 24px;
  background: #d8dce8;
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
  margin-top: 4px;
  transition: background 0.2s;
}
.inst24-consent__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.inst24-consent__cat input:checked ~ .inst24-consent__switch { background: #de982f; }
.inst24-consent__cat input:checked ~ .inst24-consent__switch::after { transform: translateX(18px); }
.inst24-consent__cat input:focus-visible ~ .inst24-consent__switch { outline: 3px solid #de982f; outline-offset: 2px; }

/* Locked category (always on) */
.inst24-consent__cat--locked { cursor: default; }
.inst24-consent__cat--locked:hover { background: #f7f8fc; }
.inst24-consent__toggle--on {
  font-size: 11px;
  font-weight: 700;
  color: #16a34a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  background: rgba(34,197,94,0.1);
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-top: 4px;
}

/* Action buttons */
.inst24-consent__actions {
  grid-area: actions;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid #eef0f6;
  margin-top: 4px;
  align-items: center;
}

.inst24-consent__btn {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 13.5px;
  padding: 11px 22px;
  border-radius: 10px;
  cursor: pointer;
  border: 0;
  transition: all 0.2s;
  letter-spacing: 0.2px;
}
.inst24-consent__btn--primary {
  background: #de982f;
  color: #fff;
  box-shadow: 0 4px 14px rgba(222,152,47,0.35);
  flex: 1 1 auto;
  min-width: 160px;
}
.inst24-consent__btn--primary:hover { background: #c17f1a; transform: translateY(-1px); }

.inst24-consent__btn--outline {
  background: #fff;
  color: #081746;
  border: 1.5px solid #d8dce8;
}
.inst24-consent__btn--outline:hover { border-color: #081746; }

.inst24-consent__btn--text {
  background: transparent;
  color: #6b7494;
  padding: 11px 12px;
  text-decoration: underline;
  margin-left: auto;
}
.inst24-consent__btn--text:hover { color: #081746; }

.inst24-consent__btn:focus-visible { outline: 3px solid #de982f; outline-offset: 2px; }

/* ───── Mobile ───── */
@media (max-width: 640px) {
  .inst24-consent {
    bottom: 0;
    left: 0;
    right: 0;
    max-width: none;
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -10px 30px rgba(8,23,70,0.18);
  }
  .inst24-consent__inner {
    padding: 18px 16px 16px;
    gap: 10px;
    grid-template-columns: 1fr;
    grid-template-areas: "body" "actions";
  }
  .inst24-consent__icon { display: none; }
  .inst24-consent__title { font-size: 16px; line-height: 1.3; }
  .inst24-consent__text { font-size: 13px; line-height: 1.55; }
  .inst24-consent__details { max-height: 36vh; padding-top: 14px; gap: 10px; }
  .inst24-consent__cat { padding: 12px 14px; }
  .inst24-consent__cat small { font-size: 11.5px; }
  .inst24-consent__actions {
    flex-direction: column-reverse;
    align-items: stretch;
    border-top: 1px solid #eef0f6;
    padding-top: 12px;
    margin-top: 4px;
    gap: 8px;
  }
  .inst24-consent__btn {
    width: 100%;
    min-width: 0;
    padding: 13px 18px;
    font-size: 14px;
    min-height: 48px;
  }
  .inst24-consent__btn--text { margin-left: 0; text-align: center; min-height: 44px; padding: 11px 12px; }
}

@media (max-width: 380px) {
  .inst24-consent__inner { padding: 16px 14px 14px; }
  .inst24-consent__title { font-size: 15px; }
  .inst24-consent__text { font-size: 12.5px; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .inst24-consent { transition: none; }
}

/* Footer "Ustawienia cookies" link styling */
.footer-cookies-link {
  background: transparent;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 0;
  font: inherit;
  text-decoration: underline;
}
.footer-cookies-link:hover { color: var(--orange); }
