/* RB - Pop-up zapisu do newslettera (MKT-002, wygląd 1.1.0: oferta po lewej, zdjęcie po prawej). */
.rbnl[hidden],
.rbnl [hidden] {
  display: none !important;
}

.rbnl {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

html.rbnl-open {
  overflow: hidden;
}

.rbnl__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 24, 24, 0.55);
  opacity: 0;
  transition: opacity 0.2s ease-out;
}

.rbnl__dialog {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 30rem;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
  border-radius: 0.5rem;
  background: #fff;
  color: #232323;
  /* wyraźny cień całego okna: na przyciemnionym tle słabszy był niewidoczny */
  box-shadow: 0 1.75rem 4.5rem rgba(0, 0, 0, 0.55), 0 0.5rem 1.25rem rgba(0, 0, 0, 0.3);
  text-align: left;
  opacity: 0;
  transform: translateY(0.75rem);
  transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.rbnl__dialog:focus {
  outline: none;
}

.rbnl--in .rbnl__backdrop {
  opacity: 1;
}

.rbnl--in .rbnl__dialog {
  opacity: 1;
  transform: none;
}

.rbnl__main {
  flex: 1 1 auto;
  min-width: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1.75rem 2rem 1rem;
}

.rbnl__media {
  display: none;
}

.rbnl__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #232323;
  cursor: pointer;
}

.rbnl__close:hover {
  color: #f3a455;
}

.rbnl__close:focus-visible,
.rbnl__later:focus-visible {
  outline: 2px solid #232323;
  outline-offset: 2px;
}

/* napis nad rabatem i znaczek rabatu */
.rbnl__head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 3rem 0.75rem 0;
}

.rbnl__kicker,
.rbnl__badge {
  margin: 0;
  border-radius: 0.25rem;
  background: #fdeadb;
  color: #f3a455;
  font-weight: 700;
}

.rbnl__kicker {
  padding: 0.3125rem 0.75rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.rbnl__badge {
  padding: 0.125rem 0.75rem;
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.rbnl__title {
  margin: 0 0 0.375rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
  text-transform: none;
  color: #232323;
}

.rbnl__text {
  margin: 0 0 0.875rem;
  font-size: 0.9375rem;
  line-height: 1.45;
  color: #3d3d3d;
}

/* ramka z przykładem oszczędności */
.rbnl__save {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin: 0 0 1rem;
  padding: 0.625rem 0.875rem;
  border-radius: 0.375rem;
  background: #fdf0e4;
}

.rbnl__save-icon {
  flex: 0 0 auto;
  color: #f3a455;
  fill: none; /* motyw wypełnia ikony svg kolorem - tu sam kontur */
}

.rbnl__save-text {
  margin: 0;
  padding-left: 0.875rem;
  border-left: 1px solid #e9b98f;
  line-height: 1.3;
}

.rbnl__save-example {
  display: block;
  font-size: 0.875rem;
  color: #3d3d3d;
}

.rbnl__save-amount {
  display: block;
  font-size: 1.1875rem;
  font-weight: 700;
  color: #f3a455;
}

.rbnl__label {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
}

.rbnl .rbnl__input.form-control {
  height: 2.875rem;
  padding: 0 0.875rem;
  border: 1px solid #bdbdbd;
  border-radius: 0.375rem;
  background: #fff;
  color: #232323;
  font-size: 1rem; /* 16 px: telefon nie powiększa strony po wejściu w pole */
}

.rbnl .rbnl__input.form-control:focus {
  border-color: #f3a455;
  box-shadow: 0 0 0 2px rgba(243, 164, 85, 0.3);
}

/* zgody (rb_legal albo własna): mniejsze i spokojniejsze od oferty */
.rbnl .rbl-nl,
.rbnl__consent {
  margin: 0.75rem 0 0.875rem;
  color: #3d3d3d;
}

.rbnl__consent {
  font-size: 0.8125rem;
  line-height: 1.5;
}

.rbnl .rbl-nl__req,
.rbnl .rbl-nl__clause,
.rbnl .rbl-nl__more {
  color: #5c5c5c;
  font-size: 0.6875rem;
  line-height: 1.45;
}

.rbnl .rbl-nl a,
.rbnl__consent a {
  color: inherit;
  text-decoration: underline;
}

.rbnl__msg {
  margin: 0 0 0.75rem;
  padding: 0.5rem 0.75rem;
  background: #fdecea;
  border-left: 3px solid #c0392b;
  color: #8a1f14;
  font-size: 0.8125rem;
  line-height: 1.4;
}

.rbnl .rbnl__submit.btn {
  display: block;
  width: 100%;
  min-height: 3rem;
  border-color: #f3a455;
  border-radius: 0.375rem;
  background: #f3a455;
  color: #fff;
  font-size: 1.0625rem;
  font-weight: 700;
  text-transform: none;
}

.rbnl .rbnl__submit.btn:hover,
.rbnl .rbnl__submit.btn:focus {
  border-color: #e8923a;
  background: #e8923a;
  color: #fff;
}

.rbnl__hint {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  line-height: 1.4;
  text-align: center;
  color: #5c5c5c;
}

.rbnl__done {
  padding-bottom: 1rem;
}

.rbnl__done-title {
  margin: 0.5rem 0 0.375rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.rbnl__done p {
  font-size: 0.9375rem;
  line-height: 1.5;
}

.rbnl__later {
  display: block;
  margin: 0.125rem auto 0;
  padding: 0.5rem 1rem;
  border: 0;
  background: transparent;
  color: #3d3d3d;
  font-size: 0.8125rem;
  text-decoration: underline;
  cursor: pointer;
}

.rbnl__later:hover {
  color: #232323;
}

/* komputer i tablet: zdjęcie po prawej ze skośną krawędzią */
@media (min-width: 768px) {
  .rbnl__dialog {
    max-width: 55rem;
  }

  .rbnl__main {
    padding: 2rem 1.25rem 1rem 2.5rem;
  }

  .rbnl__head {
    margin-right: 0;
  }

  .rbnl__media {
    position: relative;
    display: block;
    flex: 0 0 39%;
    background: #fdeadb;
    clip-path: polygon(3rem 0, 100% 0, 100% 100%, 0 100%);
  }

  .rbnl__media picture {
    position: absolute;
    inset: 0;
    clip-path: polygon(calc(3rem + 0.625rem) 0, 100% 0, 100% 100%, 0.625rem 100%);
  }

  .rbnl__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 35% 60%;
  }
}

/* niski ekran (laptop): rabat obok napisu, ciaśniejsze odstępy - okno mieści się bez przewijania */
@media (min-width: 768px) and (max-height: 800px) {
  .rbnl__main {
    padding-top: 1.5rem;
  }

  .rbnl__head {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 0.75rem;
  }

  .rbnl__badge {
    font-size: 1.625rem;
  }

  .rbnl__text {
    margin-bottom: 0.625rem;
  }

  .rbnl__save {
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.875rem;
  }
}

/* telefon: okno od dołu ekranu, bez zdjęcia */
@media (max-width: 575.98px) {
  .rbnl {
    align-items: flex-end;
    padding: 0;
  }

  .rbnl__dialog {
    max-width: none;
    max-height: 92vh;
    max-height: 92dvh;
    border-radius: 0.75rem 0.75rem 0 0;
    transform: translateY(1.5rem);
  }

  .rbnl__main {
    padding: 1.25rem 1.25rem 0.75rem;
  }

  .rbnl__head {
    flex-direction: row-reverse;
    justify-content: flex-end;
    align-items: center;
    gap: 0.625rem;
    margin-bottom: 0.625rem;
  }

  .rbnl__badge {
    font-size: 1.5rem;
  }

  .rbnl__title {
    font-size: 1.3125rem;
  }

  .rbnl__save-icon {
    width: 36px;
    height: 33px;
  }

  .rbnl__save-amount {
    font-size: 1.0625rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rbnl__backdrop,
  .rbnl__dialog {
    transition: none;
    transform: none;
  }
}
