/* =========================
   PPCF BASE (structure)
   ========================= */

.ppcf-form {
  box-sizing: border-box;
  width: 100%;
}

.ppcf-form *,
.ppcf-form *::before,
.ppcf-form *::after {
  box-sizing: border-box;
}

.ppcf-fields {
  display: grid;
  gap: 10px;
}

.ppcf-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 18px;
}

.ppcf-required {
  margin-left: 6px;
  opacity: .8;
}

.ppcf-field input:not([type="checkbox"]):not([type="radio"]),
.ppcf-field textarea,
.ppcf-field select {
  width: 100%;
  padding: 10px 12px;
  border-width: 1px;
  border-style: solid;
  border-radius: 10px;
  outline: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .12s ease, background-color .2s ease;
}

.ppcf-field textarea {
  min-height: 120px;
  resize: vertical;
}

.ppcf-field input:focus,
.ppcf-field textarea:focus,
.ppcf-field select:focus {
  box-shadow: 0 0 0 4px rgba(66, 153, 225, 0.22);
}

.ppcf-error {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.25;
  display: none;
}

.ppcf-error:not(:empty) {
  display: block;
}

/* Checkbox / Radio */
.ppcf-checkbox-label {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-weight: 500;
}

.ppcf-checkbox-label input[type="checkbox"] {
  margin-top: 3px;
}

.ppcf-radio-group {
  display: grid;
  gap: 8px;
}

.ppcf-radio-option {
  display: flex;
  gap: 10px;
  align-items: center;
}

.ppcf-radio-option label {
  margin: 0;
  font-weight: 500;
}

/* Buttons */
.ppcf-submit,
.ppcf-next,
.ppcf-prev,
.ppcf-modal-btn {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s ease, filter .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease;
  user-select: none;
}

.ppcf-submit:active,
.ppcf-next:active,
.ppcf-prev:active,
.ppcf-modal-btn:active {
  transform: translateY(1px);
}

.ppcf-prev[disabled],
.ppcf-next[disabled],
.ppcf-submit[disabled] {
  opacity: .55;
  cursor: not-allowed;
}

/* Content blocks */
.ppcf-block {
  border-radius: 14px;
  padding: 0px 0px;
}

.ppcf-block-heading h2,
.ppcf-block-heading h3,
.ppcf-block-heading h4 {
  margin: 0;
}

.ppcf-block-paragraph {
  line-height: 1.55;
}

.ppcf-block-divider hr {
  border: 0;
  height: 1px;
  opacity: .2;
}

.ppcf-block-image img {
  max-width: 100%;
  border-radius: 14px;
  display: block;
}
.ppcf-block-image.is-align-left { text-align: left; }
.ppcf-block-image.is-align-center { text-align: center; }
.ppcf-block-image.is-align-right { text-align: right; }
.ppcf-block-image.is-align-center img,
.ppcf-block-image.is-align-right img {
  margin-left: auto;
}
.ppcf-block-image.is-align-center img { margin-right: auto; }

/* Steps UI */
.ppcf-steps {
  display: grid;
  gap: 14px;
}

.ppcf-step-title {
  font-weight: 800;
  margin-bottom: 6px;
  font-size: 14px;
  opacity: .9;
}

.ppcf-step-nav {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 0px;
}

.ppcf-step-nav .ppcf-prev {
  flex: 0 0 auto;
}
.ppcf-step-nav .ppcf-next,
.ppcf-step-nav .ppcf-submit {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Progress */
.ppcf-steps-progress {
  display: grid;
  gap: 10px;
}

.ppcf-steps-progress-text {
  font-weight: 700;
  font-size: 13px;
  opacity: .85;
}

.ppcf-progress-bar {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.ppcf-progress-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  transition: width .35s ease;
}

/* Bullets */
.ppcf-steps-bullets {
  list-style: none;
  display: flex;
  gap: 10px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}

.ppcf-bullet-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .12s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}

.ppcf-bullet-index {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

/* Modal */
.ppcf-modal {
  position: fixed;
  inset: 0;
  z-index: 999999;
}

.ppcf-modal-backdrop {
  position: absolute;
  inset: 0;
  backdrop-filter: blur(6px);
  background: rgba(0,0,0,0.35);
}

.ppcf-modal-panel {
  position: relative;
  width: min(540px, calc(100% - 28px));
  margin: 0vh auto 0;
  border-radius: 18px;
  overflow: hidden;
  transform: translateY(8px);
  animation: ppcfPop .22s ease forwards;
}

@keyframes ppcfPop {
  to { transform: translateY(0); }
}

.ppcf-modal-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}

.ppcf-modal-title {
  font-weight: 900;
  font-size: 15px;
}

.ppcf-modal-close {
  margin-left: auto;
  border: 0;
  background: transparent;
  font-size: 22px;
  cursor: pointer;
  opacity: .8;
}

.ppcf-modal-body {
  padding: 14px 16px;
  line-height: 1.55;
}

.ppcf-modal-footer {
  padding: 14px 16px;
  display: flex;
  justify-content: flex-end;
}

/* Small convenience - reCAPTCHA wrapper */
.ppcf-field-recaptcha .ppcf-recaptcha-widget {
  margin-top: 8px;
}


/* Smooth step transitions */
.ppcf-steps {
  position: relative;
}

/* base state - hidden */
.ppcf-step {
  display: none;
  opacity: 0;
  transform: translateX(12px);
  transition: opacity 1500ms ease, transform 1500ms ease;
  will-change: opacity, transform;
}

/* active step - visible */
.ppcf-step.is-active {
  display: block;
  opacity: 1;
  transform: translateX(0);
}

/* entering step (pre-state) */
.ppcf-step.is-entering {
  display: block;
  opacity: 0;
  transform: translateX(12px);
}

/* leaving step (optional) */
.ppcf-step.is-leaving {
  display: block;
  opacity: 0;
  transform: translateX(-12px);
}


@media (prefers-reduced-motion: reduce) {
  .ppcf-step {
    transition: none !important;
    transform: none !important;
  }
}

/* =========================================
   PPCF - Checkbox fields as a responsive grid
   Works with your current markup (1 checkbox = 1 field)
   ========================================= */

/* Make the "fields" container a grid ONLY when it contains checkbox fields */
.ppcf-form .ppcf-fields:has(.ppcf-field-checkbox) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

/* On smaller screens, go single column */
@media (max-width: 640px) {
  .ppcf-form .ppcf-fields:has(.ppcf-field-checkbox) {
    grid-template-columns: 1fr;
  }
}

/* Each checkbox "field" becomes a nice card-ish block in the grid */
.ppcf-form .ppcf-field.ppcf-field-checkbox {
  margin: 0;               /* remove stacking spacing */
  width: 100%;
}

/* Make the checkbox label align nicely (checkbox + text) */
.ppcf-form .ppcf-field.ppcf-field-checkbox .ppcf-checkbox-label {
  display: grid;
  grid-template-columns: 18px 1fr;
  align-items: start;
  gap: 10px;

  /* optional styling */
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}

/* Keep checkbox aligned with first line */
.ppcf-form .ppcf-field.ppcf-field-checkbox .ppcf-checkbox-label input[type="checkbox"] {
  margin: 2px 0 0 0;
}

/* Error should span full width under each card */
.ppcf-form .ppcf-field.ppcf-field-checkbox .ppcf-error {
  grid-column: 1 / -1;
  margin-top: 6px;
}

@media (min-width: 1024px) {
  .ppcf-form .ppcf-fields:has(.ppcf-field-checkbox) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}


.ppcf-form .ppcf-fields:has(.ppcf-field-checkbox) .ppcf-field:not(.ppcf-field-checkbox),
.ppcf-form .ppcf-fields:has(.ppcf-field-checkbox) .ppcf-block {
  grid-column: 1 / -1;
}


/* =========================================
   PPCF - Modern file upload (CSS only)
   ========================================= */

/* Hide the ugly native button but keep input accessible */
.ppcf-form .ppcf-field.ppcf-field-file input[type="file"]{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Make the LABEL look like a nice upload control */
.ppcf-form .ppcf-field.ppcf-field-file > label{
  display: block;
  margin-bottom: 8px;
}

/* Style the clickable "control" using the label + :after helper */
.ppcf-form .ppcf-field.ppcf-field-file{
  position: relative;
}

/* Fake upload box */
.ppcf-form .ppcf-field.ppcf-field-file > label + input[type="file"] + .ppcf-error{
  margin-top: 8px;
}

/* Create a “button + filename” row using a pseudo element */
.ppcf-form .ppcf-field.ppcf-field-file > label::after{
  content: attr(data-ppcf-file-label);
  display: block;

  margin-top: 8px;
  padding: 12px 14px;
  border-radius: 12px;

  border: 1px solid rgba(0,0,0,0.15);
  background: rgba(255,255,255,0.8);

  cursor: pointer;
  transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

/* Hover / focus states */
.ppcf-form .ppcf-field.ppcf-field-file > label:hover::after{
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.08);
  border-color: rgba(0,0,0,0.25);
}

/* Focus ring when tabbing onto the hidden input */
.ppcf-form .ppcf-field.ppcf-field-file input[type="file"]:focus + .ppcf-error,
.ppcf-form .ppcf-field.ppcf-field-file input[type="file"]:focus-visible + .ppcf-error{
  outline: none;
}

/* This part is the accessibility hook: when input is focused, highlight the label */
.ppcf-form .ppcf-field.ppcf-field-file input[type="file"]:focus-visible ~ label::after{
  box-shadow: 0 0 0 3px rgba(99,102,241,0.25);
  border-color: rgba(99,102,241,0.6);
}

/* Make label click open the file dialog */
.ppcf-form .ppcf-field.ppcf-field-file > label{
  cursor: pointer;
}

.ppcf-form .ppcf-field.ppcf-field-file > label:not([data-ppcf-file-label])::after{
  content: "Drop file here or click to upload";
}


.ppcf-form .ppcf-field.ppcf-field-file > label::after{
  text-align: center;
  border-style: dashed;
  padding: 18px 14px;
}





