/* Modal voucher — strona główna + /pl/pakiety (bez globalnych stylów body) */
:root {
  --cel-primary: #d1291e;
  --cel-muted: #a3a3a3;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  justify-content: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.modal-backdrop.is-open {
  display: flex;
  align-items: flex-start;
}

body.sc-pkg-voucher-open {
  overflow: hidden;
}

.modal {
  width: 100%;
  max-width: 420px;
  max-height: min(92vh, 720px);
  margin: auto;
  padding: 1.25rem 1.35rem 1.35rem;
  background: #262626;
  border: 1px solid #333;
  border-radius: 4px;
  overflow-y: auto;
  overscroll-behavior: contain;
  flex-shrink: 0;
  color: #fff;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
}

.modal h3 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
}

.modal-voucher-preview {
  margin: 0.65rem 0;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid #404040;
  line-height: 0;
  max-height: 132px;
  background: #0a0a0a;
}

.modal-voucher-preview img {
  width: 100%;
  height: 132px;
  display: block;
  object-fit: cover;
  object-position: top center;
}

.modal-sub {
  margin: 0 0 1rem;
  color: var(--cel-muted);
  font-size: 0.875rem;
}

.modal label {
  display: block;
  margin: 0.5rem 0 0.2rem;
  font: 500 10px/1 ui-monospace, monospace;
  color: #737373;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.modal input,
.modal textarea {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border: 1px solid #404040;
  border-radius: 3px;
  background: #161616;
  color: #fff;
  font: inherit;
  box-sizing: border-box;
}

.modal textarea {
  min-height: 4.5rem;
  resize: vertical;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--cel-muted);
}

.modal-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  position: sticky;
  bottom: 0;
  padding-top: 0.75rem;
  background: linear-gradient(180deg, rgba(38, 38, 38, 0) 0%, #262626 35%);
}

.btn-cancel,
.btn-submit {
  flex: 1;
  padding: 0.75rem;
  border-radius: 3px;
  font: 700 10px/1 inherit;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}

.btn-cancel {
  border: 1px solid #404040;
  background: transparent;
  color: #d4d4d4;
}

.btn-submit {
  border: none;
  background: var(--cel-primary);
  color: #fff;
}

.result {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 3px;
  font-size: 0.85rem;
  background: #161616;
}

.result.ok {
  border: 1px solid #22c55e;
}

.result.err {
  border: 1px solid #ef4444;
  color: #fca5a5;
}

.result a {
  color: var(--cel-primary);
}

.sc-pkg-auth-gate {
  margin-top: 0.5rem;
}

.sc-pkg-auth-hint {
  margin: 0 0 1rem;
  color: var(--cel-muted);
  font-size: 0.875rem;
  line-height: 1.5;
}

.sc-pkg-auth-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
