/* Reset & base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', sans-serif;
  background-color: #f5f5f5;
  color: #333;
  margin: 0;
  padding: 40px 20px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
}

form {
  background: #ffffff;               /* crisp clean white */           /* a bit more rounded for softness */
  max-width: 800px;
  width: 100%;
  padding: 40px 50px 50px 50px;    /* more generous padding for breathing room */
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12); /* softer, smoother shadow */
  font-family: 'Roboto', sans-serif;  /* use Roboto font for modern feel */
  color: #333333;                   /* dark gray text for easy reading */
  transition: box-shadow 0.3s ease;
}

/* Progress Bar */
.progressbar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 30px;
  padding: 0;
  counter-reset: step;
  max-width: 800px;
  width: 100%;
  list-style: none;
}

.progressbar li {
  position: relative;
  text-align: center;
  flex: 1;
  font-weight: 600;
  font-size: 14px;
  color: #bbb;
  cursor: default;
}

.progressbar li::before {
  content: counter(step);
  counter-increment: step;
  width: 36px;
  height: 36px;
  line-height: 36px;
  border: 3px solid #bbb;
  display: block;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background: #bbb;
  color: #f5f5f5;
  font-weight: bold;
  transition: all 0.3s ease;
}



.progressbar li:first-child::after {
  content: none;
}

.progressbar li.active {
  color: #4f46e5;
}

.progressbar li.active::before {
  border-color: #4f46e5;
  background: #4f46e5;
  color: white;
}

.progressbar li.active + li::after {
  background: #4f46e5;
}

/* Step Sections */
.step-section {
  display: none;
  animation: fadeIn 1s ease forwards;
}

.step-section.active {
  display: block;
}

@keyframes fadeIn {
  from {opacity: 0; transform: translateY(10px);}
  to {opacity: 1; transform: translateY(0);}
}

/* Input and label styling */
form tr {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  align-items: center;
}

form th, form td {
  padding: 0;
  border: none;
}

form th {
  width: 30%;
  font-weight: 600;
  color: #555;
  padding-right: 15px;
  text-align: right;
  font-size: 15px;
}

form td {
  width: 70%;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
  width: 100%;
  padding: 10px 14px;
  

  border: 1px solid #ddd;
  height: 50px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  font-family: inherit;
  resize: vertical;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 6px #4f46e5aa;
  outline: none;
}

/* Checkboxes & Radios container */
.fs-checklist.v3-checklist {
  padding-left: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.fs-checklist.v3-checklist li {
  width: 48%;
}

.fs-checklist.yesno li {
  width: 7%;
}

.fs-checklist.v3-checklist label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  color: #444;
}

.fs-checklist.v3-checklist input[type="checkbox"],
.fs-checklist.v3-checklist input[type="radio"] {
  margin-right: 8px;
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #4f46e5;
  flex-shrink: 0;
}

/* Buttons */
button[type="button"], input[type="submit"] {
  background-color: #4f46e5;
  border: none;
  color: white;

  font-size: 12px;
  padding: 12px 28px;
  border-radius: 20px;
  cursor: pointer;
  margin: 10px 8px 0 0;
  box-shadow: 0 6px 15px rgba(79, 70, 229, 0.4);
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
  user-select: none;
  min-width: 110px;
}
h2{
  letter-spacing: 3px;
  font-weight: lighter;
}
.button-wrapper {
  display: flex;
  justify-content: center;
  width: 100%;
}

button[type="button"]:hover, input[type="submit"]:hover {
  background-color: #3730a3;
  box-shadow: 0 8px 20px rgba(55, 48, 163, 0.7);
}

button[type="button"]:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  box-shadow: none;
}


/* Floating Labels */
.input-group {
  position: relative;
  margin-bottom: 20px;
}
.input-group textarea {
  width: 100%;
  padding: 20px 10px 10px;
  font-size: 15px;
  border: 1px solid #ddd;
  resize: vertical;
  border-radius: 6px;
  height: 120px;
  box-sizing: border-box;
  font-family: inherit;
  background: transparent;
}
.input-group input {
  width: 100%;
  padding: 14px 12px 6px;
  font-size: 16px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group label {
  position: absolute;
  left: 10px;
  top: 15px;
  background-color: #ffffff;
  padding: 0 4px;
  color: #222222;
  transition: all 0.2s ease;
  font-size: 14px;
  pointer-events: none;
}

.input-group input:focus + label,
.input-group input:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 14px;
  color: #4f46e5;
  letter-spacing: 1px;
}

 .input-group textarea:focus + label,
.input-group textarea:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 13px;
  color: #4f46e5;
  font-weight: 500;
}

.address {
display: flex;
flex-wrap: wrap;
gap: 12px;
}

.address-field {
width: 100%;
max-width: 100%;
flex: 1 1 150px; /* This allows wrapping at around 300px */
box-sizing: border-box;
position: relative;
}

.address-field input {
  width: 100%;
  padding: 12px;
}

.address-field label {
  position: absolute;
  left: 12px;
  top: 14px;
  background: white;
  padding: 0 4px;
  color: #999;
  font-size: 15px;
  transition: all 0.2s ease;
  pointer-events: none;
}

.address-field input:focus + label,
.address-field input:not(:placeholder-shown) + label {
  top: -8px;
  left: 10px;
  font-size: 14px;
  color: #4f46e5;
  letter-spacing: 1px;
}

.progressbar li::after {
content: none !important;
display: none !important;
}


/* Responsive tweaks */
@media (max-width: 600px) {
  form tr {
    flex-direction: column;
    align-items: flex-start;
  }
  form th, form td {
    width: 100%;
    text-align: left;
    padding: 4px 0;
  }
  .fs-checklist.v3-checklist li {
    width: 100%;
  }
  .input-group textarea {
    
    padding-top: 30px;
    height: 120px;
  }
  .progressbar {
    flex-wrap: wrap;
    
  }

  .progressbar li {
    width: 100%;
    font-size: 10px;
  }
  .input-group textarea:focus + label,
  .input-group textarea:not(:placeholder-shown) + label {
    top: -8px;
    font-size: 10px;
    color: #4f46e5;
    font-weight: 500;
  }
  
}
