/* Pasek "Projekt przykładowy" i okno blokady formularzy, doklejane do stron pokazowych.
   Wszystkie reguły mają prefiks mdf-demo, żeby nie mieszać się ze stylami projektu. */

.mdf-demo-pill,
.mdf-demo-dialog {
  --mdf-navy: #0f1a2e;
  --mdf-navy-line: #2a3a55;
  --mdf-gold: #f2b833;
  --mdf-gold-hover: #f7cb5f;
  --mdf-cream: #fef8ea;
  --mdf-muted: #c3cad6;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: normal;
  text-transform: none;
  box-sizing: border-box;
}

.mdf-demo-pill *,
.mdf-demo-dialog * {
  box-sizing: border-box;
  font: inherit;
  letter-spacing: inherit;
}

.mdf-demo-pill {
  position: fixed;
  z-index: 2147483000;
  left: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: calc(100vw - 32px);
  padding: 8px 8px 8px 16px;
  border: 1px solid var(--mdf-navy-line);
  border-radius: 999px;
  background: var(--mdf-navy);
  color: var(--mdf-cream);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.28);
}

.mdf-demo-pill a,
.mdf-demo-dialog a {
  text-decoration: none;
}

.mdf-demo-label {
  color: var(--mdf-cream);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mdf-demo-label:hover {
  color: var(--mdf-gold);
}

.mdf-demo-cta,
.mdf-demo-primary {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--mdf-gold);
  color: var(--mdf-navy);
  font-weight: 700;
  white-space: nowrap;
  transition: background-color 150ms ease;
}

.mdf-demo-cta:hover,
.mdf-demo-primary:hover {
  background: var(--mdf-gold-hover);
}

.mdf-demo-close {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--mdf-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 150ms ease, color 150ms ease;
}

.mdf-demo-close:hover {
  background: var(--mdf-navy-line);
  color: var(--mdf-cream);
}

.mdf-demo-pill a:focus-visible,
.mdf-demo-pill button:focus-visible,
.mdf-demo-dialog a:focus-visible,
.mdf-demo-dialog button:focus-visible {
  outline: 2px solid var(--mdf-gold);
  outline-offset: 2px;
}

@media (max-width: 479px) {
  .mdf-demo-pill {
    left: 8px;
    right: 8px;
    bottom: 8px;
    max-width: none;
    justify-content: space-between;
  }
}

.mdf-demo-dialog {
  width: min(440px, calc(100vw - 32px));
  margin: auto;
  padding: 32px;
  border: 1px solid var(--mdf-navy-line);
  border-radius: 16px;
  background: var(--mdf-navy);
  color: var(--mdf-cream);
  box-shadow: 0 24px 64px rgb(0 0 0 / 0.4);
}

.mdf-demo-dialog::backdrop {
  background: rgb(8 12 22 / 0.6);
}

.mdf-demo-dialog h2 {
  margin: 0;
  color: var(--mdf-cream);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.25;
}

.mdf-demo-dialog p {
  margin: 16px 0 0;
  color: var(--mdf-muted);
  font-size: 15px;
  line-height: 1.55;
}

.mdf-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.mdf-demo-primary {
  min-height: 40px;
  padding: 8px 20px;
}

.mdf-demo-secondary {
  min-height: 40px;
  margin: 0;
  padding: 8px 20px;
  border: 1px solid var(--mdf-navy-line);
  border-radius: 999px;
  background: transparent;
  color: var(--mdf-cream);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.mdf-demo-secondary:hover {
  background: var(--mdf-navy-line);
}

.mdf-demo-gate {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 24px;
  background: #e9e4da;
  color: #0f1a2e;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  text-align: center;
}

.mdf-demo-gate button {
  min-height: 44px;
  margin: 0;
  padding: 10px 24px;
  border: 0;
  border-radius: 999px;
  background: #0f1a2e;
  color: #fef8ea;
  font: 700 15px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  cursor: pointer;
  transition: background-color 150ms ease;
}

.mdf-demo-gate button:hover {
  background: #2a3a55;
}

.mdf-demo-gate button:focus-visible {
  outline: 2px solid #0f1a2e;
  outline-offset: 3px;
}

.mdf-demo-gate p {
  margin: 0;
  color: #3d4757;
  font-size: 13px;
  line-height: 1.4;
}

@media (prefers-reduced-motion: reduce) {
  .mdf-demo-gate button,
  .mdf-demo-pill *,
  .mdf-demo-dialog * {
    transition: none;
  }
}
