/* 
  Updated Styles for Multi-step Form 
  with fade-in transitions, modern styling,
  100% page height, and equal-width buttons
*/

/* -------------------------
   1. Base & Reset
-------------------------- */
html, body {
  width: 100%;
  /* height: 100%; */
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;

}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: #f0f2f5; 
  color: #333;
  line-height: 1.4;
}

* {
  box-sizing: border-box;
}

/* -------------------------
   2. Header & Footer
-------------------------- */
.site-header {
  width: 100%;
  background: #fff; /* #4ce0b3 */
  color: #ecf0f1;
  padding: 15px;
  box-sizing: border-box;
  text-align: center;
  flex-shrink: 0;
}
.site-footer {
  width: 100%;
  background: #fff; /* #4ce0b3 */
  color: #ecf0f1;
  padding: 15px;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  bottom: 0;
  flex-shrink: 0;
}
.site-header .header-content {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-footer p {
  max-width: 1200px;
  margin: 0 auto;
}

.logo-container {
  max-width: 1200px;
  display: flex;             
  justify-content: space-between; 
  align-items: center;           
  padding: 0 20px;
}

.logo {
  max-width: 200px;
  height: auto;
}

/* -------------------------
   3. Progress Bar
-------------------------- */
.progress-bar {
  width: 90%;
  max-width: 600px;
  height: 10px;
  margin: 20px auto 0 auto;
  background-color: #d7dadc;
  border-radius: 5px;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  background-color: #3498db; /* accent color */
  width: 0%;
  transition: width 0.3s ease;
}

/* -------------------------
   4. Form Container
-------------------------- */
form {
  width: 95%;
  max-width: 600px;
  margin: 20px auto;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  padding: 25px;
  position: relative;
  display: flex;
  flex-direction: column;
  flex-grow: 1;;
}

/* 
  Multi-step transitions:
  We'll position steps so they fade-in
  from opacity: 0 to 1.
*/
.form-step {
  display: none;         /* hidden by default */
  animation: fadeIn 0.5s ease forwards; /* fade in animation */
  opacity: 0;            /* start invisible so fadeIn can run */
}
.form-step.active {
  display: block;        /* becomes visible & triggers fadeIn */
}

/* fadeIn keyframe for stepping transitions */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(10px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Headings inside the form steps */
h2 {
  
  font-size: 1.5em;
  color: #001e3f;
  text-align: center;
  margin-bottom: 30px;
}

/* -------------------------
   5. Button Grid & Buttons
-------------------------- */
.button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 10px 0;
}

/* 
  Ensure all option buttons in the grid 
  share the same width:
*/
.button-grid .option-btn {
  flex: 1 1 150px; /* each button tries to be ~150px wide, grows/shrinks as needed */
  text-align: center;
}

/* Modern button styles (option-btn + 
   other step controls) */
.option-btn,
#oldYearNextBtn,
#otherMakesNextBtn,
#secondVehicleOldYearNextBtn,
#secondVehicleOtherMakesNextBtn,
#addressNextBtn,
#birthDateNextBtn,
#finalSubmitBtn {
  background: #005cbf;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 20px 20px;
  cursor: pointer;
  font-size: 1.1em;
  font-weight: 600;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
  width: 100%;
  /* margin-top: 10px; */
}
.option-btn:hover,
#oldYearNextBtn:hover,
#otherMakesNextBtn:hover,
#secondVehicleOldYearNextBtn:hover,
#secondVehicleOtherMakesNextBtn:hover,
#addressNextBtn:hover,
#birthDateNextBtn:hover,
#finalSubmitBtn:hover {
  background: #0055af;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.y-n-button-grid {
  flex-direction: column;
  align-items: stretch;
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 10px;
}

.insurance-grid, .credit-button-grid {
  grid-template-columns: repeat(2, 1fr);
  display: grid;
  gap: 10px;
}


/* -------------------------
   6. Back Button
-------------------------- */
.navigation-buttons {
  margin-top: 15px;
  text-align: center;
}
.back-btn {
  background: none; 
  color: #a2d1e7;
  border: none;
  border-radius: 4px;
  padding: 10px 20px;
  cursor: pointer;
  font-size: 0.95em;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
/* .back-btn:hover {
  background: #7f8c8d;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
} */

/* -------------------------
   7. Labels & Inputs
-------------------------- */
label {
  display: block;
  margin: 12px 0 5px;
  font-weight: 500;
}
input, select {
  width: 100%;
  padding: 10px;
  border: 1px solid #4ce0b3;
  border-radius: 4px;
  font-size: 0.95em;
  outline: none;
  margin-bottom: 10px;
  margin-top: 0px;
  font-weight: 600;
  color: #005cbf;
}
input:focus, select:focus {
  border-color: #3498db;
}

/* -------------------------
   8. Fine Print
-------------------------- */
.fine-print {
  font-size: 0.7em;
  color: #777;
  margin-top: 25px;
  line-height: 1.1em;
}

/* -------------------------
   9. Responsive
-------------------------- */
@media (max-width: 600px) {
  .button-grid {
    flex-direction: column;
    align-items: stretch;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
  .navigation-buttons {
    text-align: center;
  }
  #finalSubmitBtn {
    margin-top: 20px;
    width: 100%;
  }
  .credit-button-grid {
    grid-template-columns: repeat(2, 1fr);
    display: flex;
    gap: 10px;
    flex-direction: column;
}
.site-footer {
  position: relative;
}
}


.model-btn {
  font-weight: 400;
}


/* loader */

.loader-spinner {
  margin: 20px auto;
  width: 80px;
  height: 80px;
  border: 8px solid #ccc;
  border-top: 8px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* processing messages */

.processing-messages {
  list-style: none;
  padding: 0;
  margin: 20px auto;
  position: relative;
  min-height: 200px;
  width: fit-content;
}

.processing-messages li {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.5s ease;
  margin-bottom: 15px;
  padding-left: 30px;
  position: absolute;
  width: 100%;
}

.processing-messages li::before {
  content: '✅';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  color: #4CAF50;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.processing-messages li.active {
  opacity: 1;
  transform: translateY(0);
  position: static;
}

.processing-messages li.completed {
  position: relative;
  opacity: 1;
  transform: translateY(0);
}

.processing-messages li.completed::before {
  opacity: 1;
}

.loader-spinner {
  /* Keep your spinner styles here */
  margin: 20px auto;
}

.required {
  display: none
}
