/* ===== MODAL REJESTRACJA (APP: top + scroll + footer) ===== */

.hs24-modal{
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 18px;
  padding-top: 90px; /* obniżenie okna */
}

.hs24-modal__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 20, 0.35);
  backdrop-filter: blur(6px);
}

/* Karta jako flex-kolumna */
.hs24-modal__dialog{
  position: relative;
  width: min(560px, 100%);
  max-height: min(86vh, 820px);

  background: #fff;
  border-radius: 22px;
  box-shadow: 0 25px 70px rgba(0,0,0,.25);
  margin-top: -40px;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* klucz: scroll tylko w środku */
}

/* ===== TOP: stały ===== */
.hs24-modal__top{
  flex: 0 0 auto;
  padding: 20px 18px 12px;

  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;

  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,.06);
}

.hs24-modal__title{
  margin: 0;
  font-size: 32px;
  line-height: 1.05;
  font-weight: 900;
  letter-spacing: -0.4px;
}

.hs24-modal__subtitle{
  margin: 6px 0 0 0;
  color: #666;
  font-size: 14px;
}

.hs24-modal__close{
  flex: 0 0 auto;
  border: none;
  background: #f2f2f7;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  cursor: pointer;
  font-size: 20px;
  line-height: 44px;
}

.hs24-modal__close:hover{ filter: brightness(0.97); }

/* ===== CONTENT: TYLKO TO SIĘ PRZEWIJA ===== */
.hs24-modal__content{
  flex: 1 1 auto;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  padding: 14px 18px 10px;
}

/* ===== FOOTER: stały ===== */
.hs24-modal__footer{
  flex: 0 0 auto;
  padding: 12px 18px 18px;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.06);
}

/* wrapper */
.register-wrapper{ padding: 0; max-width: 100%; }

/* pola */
.field{ margin: 14px 0; }
.field label{ display:block; font-size: 13px; margin-bottom: 6px; color: #333; }

.field input{
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1.6px solid #b3b3b3;
  font-size: 16px;
  outline: none;
  background: #fff;
}

.field input:focus{
  border-color:#6b58a5;
  box-shadow: 0 0 0 3px rgba(107,88,165,.14);
}

.field input.invalid{ border-color:#d10000; }

.field .error{
  display:block;
  margin-top: 6px;
  font-size: 12px;
  color:#d10000;
  font-weight: 700;
}

/* alert */
.register-alert{
  display:none;
  padding: 12px 14px;
  border-radius: 14px;
  margin: 10px 0 14px;
  font-weight: 800;
  font-size: 13px;
}

.register-alert.error{
  background:#ffe5e5;
  border:1px solid #ffb6b6;
  color:#9a0000;
}

.register-alert.success{
  background:#e6fff0;
  border:1px solid #bdf0cf;
  color:#0f6a38;
}

/* przycisk */
.register-btn{
  width:100%;
  border:none;
  padding: 16px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 900;
  cursor:pointer;
  color:#fff;
  background: linear-gradient(135deg,#6b58a5,#7a68b7);
}

.register-btn:active{ transform: scale(.99); }

@media (max-width: 480px){
  .hs24-modal{ padding: 12px; padding-top: 70px; }
  .hs24-modal__dialog{ border-radius: 18px; max-height: 88vh; }
  .hs24-modal__top{ padding: 16px 14px 10px; }
  .hs24-modal__content{ padding: 12px 14px 10px; }
  .hs24-modal__footer{ padding: 10px 14px 14px; }
  .hs24-modal__title{ font-size: 26px; }
}


.hs24-modal{ z-index: 2147483647 !important; }
.hs24-modal__backdrop{ z-index: 2147483646 !important; }
.hs24-modal__dialog{ z-index: 2147483647 !important; position: relative; }

/* iOS/Android: upewnij się że fixed działa jak trzeba */
html, body { position: relative; }