/* Форма TZ Junior — в стилистике лендинга */

.tzj-page,
.tzj-page * {
  box-sizing: border-box;
}

.tzj-page {
  min-height: 100vh;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(ellipse 100% 60% at 50% -15%, rgba(237, 252, 141, 0.1), transparent),
    #1a1a1a;
  color: #f3f4f6;
  padding: 1.25rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.tzj-wrap {
  width: 100%;
  max-width: min(36rem, 100%);
  min-width: 0;
}

.tzj-card {
  background: #1f1f1f;
  border: 1px solid #374151;
  border-radius: 0.875rem;
  padding: 2rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  animation: tzj-fade 0.45s ease-out;
  max-width: 100%;
  min-width: 0;
  overflow-x: clip;
}

.tzj-nav {
  margin-bottom: 1rem;
}

.tzj-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: #edfc8d;
  text-decoration: none;
  font-size: 0.9rem;
  transition: opacity 0.2s;
}

.tzj-back:hover {
  opacity: 0.88;
}

.tzj-back::before {
  content: "←";
}

#applicationForm {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

@keyframes tzj-fade {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.tzj-title {
  color: #edfc8d;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 1.75rem;
  text-align: center;
}

.tzj-group {
  margin-bottom: 1.25rem;
  min-width: 0;
  max-width: 100%;
}

.tzj-group label {
  display: block;
  color: #9ca3af;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}

.tzj-group input[type="text"],
.tzj-group input[type="email"],
.tzj-group input[type="tel"],
.tzj-group input[type="url"],
.tzj-group select {
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 0.85rem 1rem;
  background: #2a2a2a;
  border: 2px solid transparent;
  border-radius: 0.5rem;
  font-size: 1rem;
  color: #f9fafb;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}

.tzj-group input::placeholder {
  color: #6b7280;
}

.tzj-group input:focus,
.tzj-group select:focus {
  background: #111827;
  border-color: #edfc8d;
}

.tzj-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239ca3af' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.tzj-group.turnstile-group {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 4rem;
  max-width: 100%;
  overflow: hidden;
}

.tzj-group.turnstile-group > * {
  max-width: 100%;
}

.tzj-check {
  margin-top: 1rem;
}

.tzj-check label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  cursor: pointer;
  color: #d1d5db;
  font-size: 0.875rem;
  line-height: 1.45;
}

.tzj-check input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  min-width: 1.15rem;
  margin-top: 0.15rem;
  accent-color: #edfc8d;
  cursor: pointer;
}

.tzj-err {
  display: none;
  color: #fca5a5;
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.tzj-err.active,
.error-message.active {
  display: block;
}

.tzj-group.error input,
.tzj-group.error select {
  border-color: #f87171;
  background: #2a1515;
}

.tzj-submit {
  position: relative;
  z-index: 10;
  width: 100%;
  padding: 1rem;
  margin-top: 1.75rem;
  background: #edfc8d;
  color: #111827;
  border: none;
  border-radius: 0.75rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: filter 0.2s, transform 0.2s;
}

.tzj-submit:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.tzj-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.tzj-msg {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
  display: none;
}

.tzj-msg.success {
  display: block;
  background: rgba(34, 197, 94, 0.15);
  color: #86efac;
  border: 1px solid rgba(34, 197, 94, 0.35);
}

.tzj-msg.error {
  display: block;
  background: rgba(239, 68, 68, 0.12);
  color: #fecaca;
  border: 1px solid rgba(248, 113, 113, 0.35);
}

.tzj-loading {
  opacity: 0.65;
  pointer-events: none;
}

@media (max-width: 640px) {
  .tzj-card {
    padding: 1.35rem;
  }
  .tzj-title {
    font-size: 1.25rem;
  }
}
