/**
 * Brand 2027 — justified functional exceptions (preview).
 * These carve-outs protect tools/forms/consent semantics and non-marketing chrome.
 */

/* Footer eyebrow is informational chrome, not a marketing kicker chip. */
html body:is(.mkb27-preview,.mkb27-public) .mk-footer-eyebrow,
html body:is(.mkb27-preview,.mkb27-public) footer .mk-footer-eyebrow {
  /* Reset compat kicker paint if a broad selector ever catches it. */
  display: inline !important;
  width: auto !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  color: inherit !important;
  font-weight: inherit !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

/* Calculators / MK360 / payment / form UIs — do not restyle controls. */
html body:is(.mkb27-preview,.mkb27-public) :is(
  .mk-calc,
  .mk360,
  .mk-tools-hub .mk-tool-card form,
  .mk-tools-hub input,
  .mk-tools-hub select,
  .mk-tools-hub textarea,
  .mk-tools-hub button[type="submit"],
  .wpcf7,
  .gform_wrapper,
  .woocommerce,
  form.checkout
) :is(button, input, select, textarea, .button, .btn):not(.cta):not(.mh-btn):not(.mk-button) {
  /* Leave native/plugin chrome; only inherit font where harmless. */
  font-family: var(--mkb27-font);
}

/* Cookie consent — visual-only (logic untouched). Port of sitewide v0.19. */
html body:is(.mkb27-preview,.mkb27-public) :is(.mk-cc-banner, .mk-cc-dialog) {
  font-family: var(--mkb27-font);
  color: var(--mk-navy-text);
  border-color: rgba(39, 81, 155, 0.28);
}
html body:is(.mkb27-preview,.mkb27-public) :is(.mk-cc-banner, .mk-cc-dialog) a {
  color: var(--mkb27-blue);
  text-decoration: underline;
  text-underline-offset: 0.17em;
}
html body:is(.mkb27-preview,.mkb27-public) :is(.mk-cc-banner, .mk-cc-dialog) button {
  background: #FFFFFF;
  border-color: var(--mkb27-blue);
  color: var(--mkb27-blue);
  font: 650 14px / 1.25 var(--mkb27-font);
  border-radius: var(--mkb27-btn-radius);
}
html body:is(.mkb27-preview,.mkb27-public) :is(.mk-cc-banner, .mk-cc-dialog) button:is(.mk-cc-primary, [data-mk-cc-action="reject"]) {
  background: var(--mkb27-blue);
  border-color: var(--mkb27-blue);
  color: #FFFFFF;
}
html body:is(.mkb27-preview,.mkb27-public) .mk-footer-meta button#mk-cc-open.mk-cc-footer-button {
  color: #FFFFFF !important;
  text-decoration: underline;
  text-underline-offset: 0.17em;
}

/* Preview diagnostic badge — never blocks cookie UI */
html body.mkb27-preview::after {
  content: "PODGLĄD 2027 · CENTRAL v0.21";
  position: fixed;
  right: 12px;
  bottom: 12px;
  z-index: 2147483000;
  padding: 9px 13px;
  border-radius: 8px;
  border: 2px solid #E9B538;
  background: #27519B;
  color: #FFFFFF;
  font: 700 12px / 1.3 "Manrope", Arial, sans-serif;
  letter-spacing: 0.02em;
  pointer-events: none;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.24);
}
html body.mkb27-preview:has(.mk-cc-banner:not([hidden]))::after,
html body.mkb27-preview:has(.mk-cc-dialog:not([hidden]))::after,
html body.mkb27-preview:has(#cky-consent-container:not([style*="display: none"]))::after {
  display: none !important;
}
@media (max-width: 600px) {
  html body.mkb27-preview::after {
    bottom: 8px;
    right: 8px;
    font-size: 10px;
  }
}
