/* ==============================================================
 * Baner zgód (cookies) + okno ustawień + przycisk 🍪
 * ============================================================== */

#cb-cookie-banner.nk-cc-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  gap: 16px 28px;
  padding: 18px max(16px, calc((100vw - 1260px) / 2));
  background: rgba(0, 0, 0, 0.95);
  border-top: 2px solid orange;
  color: #ddd;
  font-size: 13px;
  line-height: 1.55;
  text-align: left;
  box-shadow: 0 -6px 30px rgba(0, 0, 0, 0.6);
}

.nk-cc-text {
  flex: 1;
  min-width: 0;
}
.nk-cc-text p {
  margin: 4px 0 0;
}
.nk-cc-title {
  display: block;
  color: #fff;
  font: 600 15px/1.3 "Poppins", sans-serif;
}
.nk-cc-links a {
  color: orange;
  text-decoration: underline;
}
.nk-cc-links a:hover {
  color: #fff;
}

.nk-cc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* "Akceptuję" i "Odrzucam" – celowo identyczne (równorzędny wybór) */
.nk-cc-btn {
  min-width: 140px;
  padding: 9px 18px;
  border: 2px solid orange;
  border-radius: 4px;
  background: orange;
  color: #000;
  font: 600 13px/1.2 "Poppins", sans-serif;
  cursor: pointer;
  transition: 0.25s;
}
.nk-cc-btn:hover,
.nk-cc-btn:focus-visible {
  background: #fff;
  border-color: #fff;
  color: #000;
}
.nk-cc-btn-outline {
  background: transparent;
  color: #fff;
}
.nk-cc-btn-link {
  min-width: 0;
  border-color: transparent;
  background: transparent;
  color: #fff;
  text-decoration: underline;
}
.nk-cc-btn-link:hover {
  background: transparent;
  border-color: transparent;
  color: orange;
}

/* Okno ustawień */
.nk-cc-modal {
  position: fixed;
  inset: 0;
  z-index: 100002;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.7);
}
.nk-cc-dialog {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 28px 22px;
  background: #111;
  border: 1px solid #333;
  border-top: 3px solid orange;
  border-radius: 6px;
  color: #ccc;
  font-size: 13px;
  line-height: 1.55;
  outline: none;
}
.nk-cc-dialog h3 {
  margin: 0 0 8px;
  color: #fff;
  font: 600 20px/1.3 "Poppins", sans-serif;
}
.nk-cc-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: 0;
  background: none;
  color: #aaa;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.nk-cc-close:hover {
  color: orange;
}
.nk-cc-cat {
  margin: 12px 0;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 6px;
}
.nk-cc-cat p {
  margin: 6px 0 0;
}
.nk-cc-cat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  cursor: pointer;
}
.nk-cc-cat-name {
  color: #fff;
  font-weight: 600;
}
.nk-cc-cat-name em {
  margin-left: 6px;
  color: #8c8;
  font-style: normal;
  font-weight: 400;
  font-size: 12px;
}
.nk-cc-dialog .nk-cc-actions {
  margin-top: 16px;
}

/* Przełącznik */
.nk-cc-switch {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  position: relative;
  width: 42px;
  height: 24px;
  margin: 0;
  border-radius: 24px;
  background: #555;
  cursor: pointer;
  transition: 0.2s;
}
.nk-cc-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: 0.2s;
}
.nk-cc-switch:checked {
  background: orange;
}
.nk-cc-switch:checked::after {
  left: 21px;
}
.nk-cc-switch:disabled {
  opacity: 0.6;
  cursor: default;
}
.nk-cc-switch:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Przycisk zmiany zgody */
#nk-cc-open {
  position: fixed;
  left: 14px;
  bottom: 14px;
  z-index: 1001;
  width: 40px;
  height: 40px;
  border: 1px solid #444;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.85);
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.75;
  transition: 0.25s;
}
#nk-cc-open:hover {
  opacity: 1;
  border-color: orange;
}

@media (max-width: 860px) {
  #cb-cookie-banner.nk-cc-bar {
    flex-direction: column;
    align-items: stretch;
    max-height: 70vh;
    overflow-y: auto;
  }
  .nk-cc-actions .nk-cc-btn {
    flex: 1;
  }
}

.elementor-editor-active #nk-cc-open,
.elementor-editor-active .nk-cc-modal {
  display: none !important;
}

/* Gdy widać baner – okienko godzin nad nim, nie pod nim */
@media (min-width: 861px) {
  body:has(#cb-cookie-banner) #opening-hours-popup {
    bottom: 200px;
  }
}
