/* ====== Bazowe ====== */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100vh;
  font-family: "Montserrat", Arial, sans-serif;
  background: url("../img/background-app-light.jpg") no-repeat center center
    fixed;
  background-size: cover;
  overflow: hidden;
}
.app-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  z-index: 0;
}
.app-wrapper > * {
  position: relative;
  z-index: 1;
}

.app-wrapper {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: env(safe-area-inset-top) 20px env(safe-area-inset-bottom) 20px;
  box-sizing: border-box;
  text-align: center;
}
.app-logo {
  max-width: 90px;
  margin-bottom: 15px;
}
.app-title {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #fff;
}
.app-subtitle {
  margin: 5px 0 25px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.app-form {
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}
.app-step {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}
.app-step.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

input {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  outline: none;
  transition: all 0.2s;
}
input:focus {
  border-color: #ff4ecd;
  background: rgba(255, 255, 255, 0.35);
}
input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.app-slogan {
  font-size: 13px;
  color: #fff;
  margin: 0;
  line-height: 1.4;
  text-align: center;
}

/* ====== Zgody (100% namespacing, koniec konfliktów) ====== */
.app-consents {
  width: 100%;
  max-width: 360px;
  text-align: left;
}

/* wiersz zgody */
.app-consent {
  display: flex !important;
  align-items: center;
  gap: 12px;
  margin: 8px 0;
  line-height: 1.5;
  width: 100%;
  cursor: pointer;
}
.app-consent .app-text {
  display: inline !important;
  color: rgba(255, 255, 255, 0.92);
  font-size: 14px;
}

/* linki w tekście – zawsze inline */
.app-consents a {
  display: inline !important;
  color: #ffb3ff;
  text-decoration: underline;
  font: inherit;
}
.app-consents a:hover {
  color: #fff;
}
.app-nowrap {
  white-space: nowrap;
}

/* ====== Elegancki checkbox ====== */
.app-checkbox {
  --size: 20px;
  --radius: 6px;
  --border: rgba(255, 255, 255, 0.6);
  --bg: rgba(255, 255, 255, 0.08);
  --accent: #7b2cff;
  --accent2: #ff4ecd;

  appearance: none;
  -webkit-appearance: none;
  width: var(--size);
  height: var(--size);
  flex: 0 0 var(--size);
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--bg);
  position: relative;
  margin: 0;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s,
    transform 0.16s;
}
.app-checkbox:focus-visible {
  box-shadow: 0 0 0 4px rgba(123, 44, 255, 0.25);
}

/* soft glow */
.app-checkbox::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: calc(var(--radius) + 6px);
  background: radial-gradient(
    closest-side,
    rgba(123, 44, 255, 0.35),
    transparent 70%
  );
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s;
}

.app-checkbox::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 6px;
  height: 10px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translate(-50%, -50%) rotate(45deg);
  opacity: 0;
  transition: transform 0.2s, opacity 0.2s;
}
.app-checkbox:checked::after {
  opacity: 1;
  transform: translate(-50%, -50%) rotate(45deg);
}

/* zaznaczenie */
.app-checkbox:checked {
  border-color: var(--accent2);
  background: linear-gradient(135deg, var(--accent2), var(--accent));
}
.app-checkbox:checked::before {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .app-checkbox,
  .app-checkbox::before,
  .app-checkbox::after {
    transition: none;
  }
}

/* ====== Stopka / przyciski ====== */
.app-footer {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin-top: 20px;
}
.app-prev {
  background: none;
  border: 0;
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  cursor: pointer;
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.2s;
}
.app-prev:hover {
  color: #fff;
}

.app-next,
.app-submit {
  width: 100%;
  padding: 16px;
  border-radius: 30px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 16px;
  background: linear-gradient(135deg, #ff4ecd, #7b2cff);
  color: #fff;
  box-shadow: 0 6px 16px rgba(123, 44, 255, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.app-next:hover,
.app-submit:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(123, 44, 255, 0.6);
}
.app-submit {
  display: none;
}

/* ====== Błędy ====== */
input.error {
  border-color: #ff4d4d;
  animation: shake 0.3s;
}
input.valid {
  border-color: #2ecc71;
}
.error-msg {
  font-size: 13px;
  color: #fff;
  margin-top: -8px;
  margin-bottom: 5px;
  text-align: left;
}

/* ====== Kropki kroków ====== */
.app-progress {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}
.app-progress .step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transition: background 0.3s, transform 0.3s;
}
.app-progress .step-dot.active {
  background: #ff4ecd;
  transform: scale(1.3);
}

/* ====== Animacje ====== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes shake {
  0% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-4px);
  }
  50% {
    transform: translateX(4px);
  }
  75% {
    transform: translateX(-4px);
  }
  100% {
    transform: translateX(0);
  }
}

.app-legal {
  color: #fff;
  font-size: 15px;
}

.step-block {
  display: none;
}
.step-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ccc;
  margin: 0 3px;
}
.step-dot.active {
  background: #e91e63;
}
#prevBtn,
#nextBtn,
#submitBtn {
  margin: 10px 5px;
  padding: 10px 20px;
}

.app-hint {
  display: block;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
  margin-top: 3px;
  text-align: left;
}
/* Select tak jak inputy */
select {
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 15px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  outline: none;
  transition: all 0.2s;
  width: 100%;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
select:focus {
  border-color: #ff4ecd;
  background: rgba(255, 255, 255, 0.35);
}
select option {
  background: #2b0d3a; /* ciemne tło w rozwijanym menu */
  color: #fff;
}
