:root {
  --violet: rgb(109, 109, 212);
  --dark-gray: #525252;
  --bg: #f5f5f7;
  --shadow: 0 6px 22px rgba(82, 67, 194, 0.18);
  --radius: 8px;
  --input-radius: 5px;
}

/* jeśli już gdzieś masz tę definicję, możesz ją pominąć */
@font-face {
  font-family: "ahamono";
  src: url("/fonts/ahamono.woff2") format("woff2");
}

/* tło strony – jeśli globalnie masz inne body, to to możesz pominąć
   albo zmienić tylko tło pod formularz */
body {
  background: var(--bg);
  font-family: ahamono, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

/* === UKŁAD JAK W PIERWSZEJ WERSJI === */

.container {
    display:flex;
    width:100%;
    margin-top:200px;
}

.centered {
    display:flex;
    height:calc(100dvh - 200px);
    margin:0 auto;
    width:360px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    padding: 24px 16px;
}

@media (min-width: 700px) {
    .centered {
        height:calc(100dvh - 200px);
    }
}

/* === KARTA / BOX FORMULARZA – WYGLĄD JAK W DRUGIEJ WERSJI === */

.part {
    width:100%;
    margin: 10px 0;
    display:flex;
    justify-content: center;
    align-items: stretch;
    flex-direction: column;

    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 20px 18px 24px;
}

/* link "Zaloguj się" w dolnej części – drugi .part */
.part:last-child {
    background: transparent;
    box-shadow: none;
    padding: 10px 0 0;
    align-items: center;
}

/* === FORMULARZ === */

#register_form {
  display: flex;
  flex-direction: column;
  /* gap: 14px; */
}

/* kontener z ikonką i inputem */
.input-container {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--violet);
  border-radius: var(--input-radius);
  padding: 8px 10px;
  background: #fff;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input-container:focus-within {
  border-color: var(--violet);
  box-shadow: 0 0 0 3px rgba(110, 99, 230, 0.18);
}

.input-container img {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  opacity: 0.8;
}

.input-container input {
  background-color: transparent;
  border: 0;
  outline: 0;
  text-align: left;
  font-size: 1rem;
  width: 100%;
  color: var(--dark-gray);
  font-family: ahamono, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  flex: 1 1 auto;
}

.input-container input::placeholder {
  color: #9c9c9c;
}

/* miejsce na error pod inputem */
.error-message {
  min-height: 1.15rem;
  font-size: 0.8rem;
  color: #d14242;
  padding-top: 3px;
  width: 100%;
  text-align: center;
}

/* przycisk Zarejestruj */

#submitButton {
  margin-top: 4px;
  display: block;
  width: 100%;
  border: 0;
  cursor: pointer;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  font-family: ahamono, system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
  padding: 12px 14px;
  border-radius: var(--input-radius);
  background-color: var(--violet);
  box-shadow: 0 6px 16px rgba(110, 99, 230, 0.35);
  transition: transform 0.05s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

#submitButton:hover {
  filter: brightness(1.02);
}

#submitButton:active {
  transform: translateY(1px);
}

#submitButton:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
}

/* komunikat pod formularzem */
.part p.message,
.message {
  margin-top: 10px;
  text-align: center;
  font-size: 0.9rem;
  color: var(--dark-gray);
}

.part p {
    padding:10px;
}

/* linki pod formularzem */

.part a {
    color: var(--violet);
    text-decoration: none;
}

.part a.register {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.part a.reminder {
    text-align: center;
    margin-top:1rem;
}

/* loader */

.loader {
    display: flex;
    justify-content: space-between;
    width: 150px;
    margin:0 auto;
}

.dot {
    width: 19px;
    height: 19px;
    background-color:#fff;
    border-radius: 50%;
    animation: growShrink .8s infinite ease-in-out;
}

.dot:nth-child(1) { animation-delay: 0s; }
.dot:nth-child(2) { animation-delay: 0.1s; }
.dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes growShrink {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.2); }
}

.hidden {
    display:none;
}

/* === CUSTOM CHECKBOX (RODO / REGULAMIN) – DOSTOSOWANY DO NOWEJ PALETY === */

.label-check-custom {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
    user-select: none;
    font-weight: normal !important;
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin: 4px 0 8px;
    width:100%;
}

.label-check-custom input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmarkC {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #ffffff;
    border: 1px solid var(--violet);
    border-radius: 4px;
}

.label-check-custom:hover input ~ .checkmarkC {
    background-color: #f1f0ff;
}

.label-check-custom input:checked ~ .checkmarkC {
    background-color: var(--violet);
    border-color: var(--violet);
}

/* "ptaszek" */
.checkmarkC:after {
    content: "";
    position: absolute;
    display: none;
}

.label-check-custom input:checked ~ .checkmarkC:after {
    display: block;
}

.label-check-custom .checkmarkC:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* linki w treści checkboxa */
.label-check-custom a {
    text-decoration-line: underline;
    text-decoration-style: dotted!important;
    text-decoration-color: var(--violet)!important;
    text-underline-offset: 3px!important;
    color: var(--violet);
}

/* przycisk pokaż/ukryj hasło */
.toggle-password {
  border: 0;
  background: transparent;
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 26px; /* stała szerokość przycisku */
}

.toggle-password img {
  width: 30px;
  height: 30px;
  opacity: 0.6;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.toggle-password:hover img {
  opacity: 0.95;
  transform: scale(1.03);
}

/* stan, gdy hasło jest odsłonięte – lekko podbijamy ikonę
   (jak będziesz miał eye-off.svg, możesz tutaj też podmienić src w JS) */
.toggle-password.is-visible img {
  opacity: 1;
}

/* responsywność */

@media (max-width: 480px) {
  .centered {
    width: 100%;
  }
  .part {
    padding: 18px 14px 22px;
  }
  .input-container {
    gap: 8px;
  }
}
