/* WMSC Cookie Consent — odporne na globalne style motywu (line-height nagłówków itd.) */

body.mw-site .mw-cookie-bar,
body.mw-site .mw-cookie-modal {
  --wmsc-cookie-accent: #E63946;
  --wmsc-cookie-accent-hover: #d12b39;
  --wmsc-cookie-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --wmsc-cookie-heading: Archivo, var(--wmsc-cookie-font);
  font-family: var(--wmsc-cookie-font);
  letter-spacing: normal;
}

/* === Pasek cookies === */
body.mw-site .mw-cookie-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10000;
  background: #fff;
  box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.12), 0 -2px 8px rgba(0, 0, 0, 0.06);
  padding: 0;
}

body.mw-site .mw-cookie-bar[hidden] {
  display: none !important;
}

body.mw-site .mw-cookie-bar-inner {
  max-width: 640px;
  margin: 0 auto;
  padding: 28px 28px 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

body.mw-site .mw-cookie-bar-content {
  min-width: 0;
}

body.mw-site .mw-cookie-bar-title {
  margin: 0 0 12px;
  font-family: var(--wmsc-cookie-heading);
  font-size: 21px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

body.mw-site .mw-cookie-bar-text {
  margin: 0 auto;
  max-width: 52ch;
  font-size: 14px;
  line-height: 1.65;
  color: #6b7280;
}

body.mw-site .mw-cookie-bar-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

body.mw-site .mw-cookie-bar-btn {
  font-family: var(--wmsc-cookie-heading);
  font-weight: 700;
  font-size: 15px;
  min-height: 50px;
  padding: 13px 28px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.3;
  letter-spacing: normal;
  -webkit-tap-highlight-color: transparent;
}

body.mw-site .mw-cookie-bar-btn:not(.mw-cookie-bar-btn--outline) {
  background: var(--wmsc-cookie-accent);
  color: #fff;
  order: -1;
}

body.mw-site .mw-cookie-bar-btn:not(.mw-cookie-bar-btn--outline):hover {
  background: var(--wmsc-cookie-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

body.mw-site .mw-cookie-bar-btn--outline {
  background: #fff;
  color: #374151;
  border: 1.5px solid #d1d5db;
}

body.mw-site .mw-cookie-bar-btn--outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

body.mw-site .mw-cookie-bar-btn:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.2);
}

@media (min-width: 480px) {
  body.mw-site .mw-cookie-bar-inner {
    padding: 32px 36px 28px;
  }

  body.mw-site .mw-cookie-bar-actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 14px;
  }

  body.mw-site .mw-cookie-bar-btn {
    width: auto;
    flex: 1;
    min-width: 140px;
  }

  body.mw-site .mw-cookie-bar-btn:not(.mw-cookie-bar-btn--outline) {
    order: 0;
    flex: 1.4;
  }
}

@media (min-width: 768px) {
  body.mw-site .mw-cookie-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 24px;
    border-radius: 18px;
    max-width: 520px;
  }

  body.mw-site .mw-cookie-bar-inner {
    padding: 28px 32px 26px;
    gap: 22px;
  }

  body.mw-site .mw-cookie-bar-title {
    font-size: 20px;
  }
}

body.mw-site.mw-cookie-bar-visible .call-fab {
  bottom: 210px;
}

@media (min-width: 768px) {
  body.mw-site.mw-cookie-bar-visible .call-fab {
    bottom: 18px;
  }
}

/* === Modal === */
body.mw-site .mw-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

body.mw-site .mw-cookie-modal[hidden] {
  display: none !important;
}

body.mw-site .mw-cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  cursor: pointer;
  animation: wmsc-cookie-fade-in 0.25s ease;
}

body.mw-site .mw-cookie-modal-box {
  position: relative;
  width: 100%;
  max-width: 540px;
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2), 0 8px 24px rgba(0, 0, 0, 0.1);
  animation: wmsc-cookie-slide-in 0.3s ease;
}

@keyframes wmsc-cookie-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wmsc-cookie-slide-in {
  from { opacity: 0; transform: scale(0.96) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

body.mw-site .mw-cookie-modal-inner {
  padding: 28px 28px 32px;
}

body.mw-site .mw-cookie-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

body.mw-site .mw-cookie-modal-title {
  margin: 0;
  flex: 1;
  min-width: 0;
  padding-right: 8px;
  font-family: var(--wmsc-cookie-heading);
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

body.mw-site .mw-cookie-modal-close {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #f3f4f6;
  color: #374151;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

body.mw-site .mw-cookie-modal-close:hover {
  background: #e5e7eb;
  color: #111;
}

body.mw-site .mw-cookie-modal-close:focus {
  outline: none;
  box-shadow: 0 0 0 2px #64748b;
}

body.mw-site .mw-cookie-modal-desc {
  margin: 0 0 28px;
  font-size: 15px;
  line-height: 1.7;
  color: #4b5563;
  letter-spacing: normal;
}

body.mw-site .mw-cookie-modal-preferences-title {
  margin: 0 0 18px;
  font-family: var(--wmsc-cookie-heading);
  font-size: 16px;
  font-weight: 800;
  color: #111827;
  line-height: 1.35;
  letter-spacing: normal;
}

body.mw-site .mw-cookie-modal-categories {
  display: grid;
  gap: 12px;
  margin: 0 0 28px;
}

body.mw-site .mw-cookie-category-block {
  padding: 16px 18px;
  border: 1px solid #e8eaed;
  border-radius: 14px;
  background: #fafbfc;
}

body.mw-site .mw-cookie-category-block--required {
  background: #fff;
}

body.mw-site .mw-cookie-category-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
  border: none;
  font-weight: 700;
  font-size: 15px;
  color: #111827;
  line-height: 1.4;
}

body.mw-site .mw-cookie-category-name {
  letter-spacing: normal;
}

body.mw-site .mw-cookie-category-block--required .mw-cookie-category-always {
  font-weight: 600;
  font-size: 13px;
  color: var(--wmsc-cookie-accent);
  white-space: nowrap;
}

body.mw-site .mw-cookie-category-desc {
  margin: 10px 0 0;
  padding: 0;
  font-size: 13.5px;
  line-height: 1.6;
  color: #6b7280;
  font-weight: 400;
  letter-spacing: normal;
}

body.mw-site .mw-cookie-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 28px;
  flex-shrink: 0;
  cursor: pointer;
}

body.mw-site .mw-cookie-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

body.mw-site .mw-cookie-toggle-slider {
  position: absolute;
  inset: 0;
  background: #d1d5db;
  border-radius: 28px;
  transition: background 0.2s ease;
}

body.mw-site .mw-cookie-toggle-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

body.mw-site .mw-cookie-toggle input:checked + .mw-cookie-toggle-slider {
  background: var(--wmsc-cookie-accent);
}

body.mw-site .mw-cookie-toggle input:focus + .mw-cookie-toggle-slider {
  box-shadow: 0 0 0 2px #64748b;
}

body.mw-site .mw-cookie-toggle input:checked + .mw-cookie-toggle-slider::before {
  transform: translateX(22px);
}

body.mw-site .mw-cookie-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 4px;
  padding-top: 8px;
}

body.mw-site .mw-cookie-modal-btn {
  font-family: var(--wmsc-cookie-heading);
  font-weight: 800;
  font-size: 15px;
  min-height: 50px;
  padding: 12px 24px;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  width: 100%;
  line-height: 1.3;
  letter-spacing: normal;
}

body.mw-site .mw-cookie-modal-btn:focus {
  outline: none;
  box-shadow: 0 0 0 2px #64748b;
}

body.mw-site .mw-cookie-modal-btn--primary {
  background: var(--wmsc-cookie-accent);
  color: #fff;
}

body.mw-site .mw-cookie-modal-btn--primary:hover {
  background: var(--wmsc-cookie-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(230, 57, 70, 0.3);
}

body.mw-site .mw-cookie-modal-btn--outline {
  background: #fff;
  color: #374151;
  border: 1.5px solid #d1d5db;
}

body.mw-site .mw-cookie-modal-btn--outline:hover {
  background: #f9fafb;
  border-color: #9ca3af;
  color: #111827;
}

@media (max-width: 480px) {
  body.mw-site .mw-cookie-modal {
    padding: 14px;
  }

  body.mw-site .mw-cookie-modal-inner {
    padding: 22px 20px 26px;
  }

  body.mw-site .mw-cookie-modal-title {
    font-size: 20px;
  }

  body.mw-site .mw-cookie-modal-desc {
    font-size: 14px;
    margin-bottom: 24px;
  }

  body.mw-site .mw-cookie-category-block {
    padding: 14px 16px;
  }

  body.mw-site .mw-cookie-modal-btn {
    min-height: 52px;
  }
}
