/* ---------- Base styles (unchanged unless noted) ---------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Roboto', sans-serif;
  margin: 0;
  padding: 0;
  background: rgb(68, 77, 108);
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  text-align: center;
}

header img           { max-width: 200px; margin-top: 20px; }

main {
  width: 100%;
  max-width: 680px;
  padding: 40px 32px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

h1          { font-size: 2rem; margin-bottom: 20px; }
p           { font-size: 1.1rem; margin-bottom: 30px; }
a.button,
button.button,
.next-btn,
.back-btn {
  display: inline-block;
  padding: 8px 12px;
  font-size: .9rem;
  color: #fff;
  background: #24589e;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color .3s;
}
a.button:hover,
button.button:hover,
.next-btn:hover,
.back-btn:hover     { background: #274472; }

form { display: grid; gap: 20px; }

.form-group,
.form-row        { display: flex; flex-direction: column; margin-bottom: 16px; }
.form-row        { flex-direction: row; gap: 40px; align-items: flex-end; }

.address-row .address { flex: 3; }
.address-row .zip     { flex: 1; }
.address-row .city    { flex: 2; }

label         { font-weight: 700; margin-bottom: 6px; text-align: left; }
input,
select,
textarea      { width: 100%; padding: 10px; font-size: 1rem; border: 1px solid #ccc; border-radius: 6px; }
textarea      { resize: vertical; }

progress      { width: 100%; height: 20px; }

/* CONSOLIDATED STEP RULES - NO DUPLICATES */
.step {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  max-width: 600px;
  height: 100%;
  max-height: 460px;
  overflow-y: auto;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fafafa;
  display: flex; 
  flex-direction: column;
  transform: translateX(100%); /* Keep initial positioning */
  /* NO transition here - JS will handle it */
}

.step.active { 
  transform: translateX(0); /* Override the default positioning */
}

.steps-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 100%;
  min-height: 450px;
}

/* guardian / experience hidden by default */
.guardian-fields,
.experience-fields { display: none; }

/* consent popup fixed near center */
#consent-popup {
  position: fixed;            /* take it out of any container flow */
  top: 50%;                   /* 50% down the viewport */
  left: 50%;                  /* 50% across the viewport */
  transform: translate(-50%, -50%); /* shift back by half its own size */
  max-width: 80vw;            /* optional: don’t let it get too wide */
  max-height: 80vh;           /* optional: don’t let it get too tall */
  overflow-y: auto;           /* scroll if content overflows */
  z-index: 10000;             /* sit on top of everything */
  text-align: left;
}

/* ---------- Desktop alignment patch ---------- */
@media (min-width: 769px) {
  /* NO DUPLICATE .step RULES HERE */
  .step {
    max-width: none;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
  }
  
  .step.active {
    border: 1px solid #ccc;
  }

  /* button row: Tilbage left, Næste right, flush with bottom edge */
  .step-buttons {
    display: flex;
    margin-top: auto;
    width: 100%;
    justify-content: flex-start;
  }
  .step-buttons .back-btn  { margin-right: auto; }
  .step-buttons .next-btn  { margin-left: auto; }
}

/* ----- < 768 px tweaks ----- */
@media (max-width: 768px) {
  .step {
    padding: 16px 20px;
    text-align: left;
  }
  
  form { text-align: left; }

  .step-buttons {
    flex-direction: row;
    gap: 16px;
  }
  .step-buttons .back-btn,
  .step-buttons .next-btn {
    width: auto;
    flex: 0 0 auto;
  }
  .step-buttons .next-btn {
    margin-left: auto;
  }
}

@media (max-width: 480px) {
  .step          { padding: 16px; }
  .step-buttons  { gap: 12px; }
}
