/* =========================
   GLOBAL
========================= */

* {
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  margin: 0;
  background: #F7F5EF;
}

h2 {
  font-weight: 600;
  font-size: 22px;
  margin-bottom: 20px;
  color: #222;
  text-align: center;
}

/* =========================
   HEADER
========================= */

.header {
  background: #627251;
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 58px;
}

.return-btn {
  background: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  text-decoration: none;
  color: #000;
  font-size: 14px;
}

/* =========================
   CONTAINER
========================= */

.container {
  max-width: 900px;
  margin: 40px auto;
  background: #fff;
  padding: 32px;
  border-radius: 16px;
}

/* =========================
   TOP STEPS
========================= */

.top-steps {
  display: flex;
  gap: 12px;
  margin-bottom: 28px;
}

.top-step {
  padding: 8px 14px;
  background: #eff5f1;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.top-step.active {
  background: #627251;
  color: #fff;
}

/* =========================
   PROGRESS BAR
========================= */

.progress-bar {
  height: 10px;
  background: #ddd;
  border-radius: 20px;
  margin-bottom: 32px;
}

.progress-fill {
  height: 100%;
  background: #7ae635;
  border-radius: 20px;
}

.progress-bar {
  position: relative;
}

#progressPercent {
  position: absolute;
  right: 10px;
  top: -22px;
  font-size: 16px;
  font-weight: 600;
  color: #555;
}

/* =========================
   STEPS
========================= */

.step {
  display: none;
}

.step.active {
  display: block;
}

/* =========================
   INPUTS
========================= */

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

input,
textarea {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 14px;
}

/* =========================
   NAV BUTTONS
========================= */

.nav {
  display: flex;
  justify-content: space-between;
  margin-top: 28px;
}

button {
  padding: 10px 24px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  font-weight: 500;
}

.next,
.submit {
  background: linear-gradient(
    90deg,
    #627251 60.84%,
    #4F5C42 90%
  );
  color: #fff;
}

.prev {
  background: #ddd;
}

/* =========================
   CARD GRID
========================= */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

/* =========================
   RADIO CARDS (UNIVERSAL)
========================= */

.card {
  background: #fff;
  border: 1px solid #e6e6e6;
  border-radius: 14px;
  padding: 18px;
  cursor: pointer;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 16px;
  transition: all 0.25s ease;
}

.card:hover {
  border-color: #f36c3d;
}

.card:has(input:checked) {
  border-color: #f36c3d;
  background: #fff4ef;
  box-shadow: 0 6px 14px rgba(243,108,61,0.15);
}

/* Custom radio */

.card input[type="radio"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: #fff;
  position: relative;
  cursor: pointer;
}

.card input[type="radio"]:checked {
  background: #f36c3d;
  border-color: #ffffff;
}

.card input[type="radio"]:checked::after {
  content: '';
  width: 6px;
  height: 6px;
  background: #fff;
  border-radius: 50%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.card span {
  font-size: 15px;
  font-weight: 500;
  color: #222;
}

/* =========================
   IMAGE CARDS
========================= */

.card img {
  width: 56px;
  filter: grayscale(100%);
  transition: filter 0.3s ease;
}

.card:hover img,
.card:has(input:checked) img {
  filter: grayscale(0%);
}

.hair-images img {
  width: 80px;
}

/* =========================
   CHIPS (CHECKBOX)
========================= */

.chip-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.chip {
  min-width: 220px;
  padding: 14px 18px;
  border-radius: 999px;
  border: 1px solid #e2e2e2;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.chip:hover {
  border-color: #f36c3d;
  background: #fff7f3;
}

.chip input {
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 2px solid #ccc;
  position: relative;
}

.chip input:checked {
  background: #f36c3d;
  border-color: #f36c3d;
}

.chip input:checked::after {
  content: '';
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -60%) rotate(45deg);
}

.chip:has(input:checked) {
  background: #fff4ef;
  border-color: #f36c3d;
}

/* =========================
   FORM GROUP / ERRORS
========================= */

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group .error-text {
  min-height: 16px;
  font-size: 12px;
  color: red;
  text-align: center;
}

/* =========================
   FILE UPLOAD
========================= */

.upload-box {
  margin: 24px auto;
  max-width: 520px;
}

.upload-box input {
  display: none;
}

.upload-box label {
  border: 2px dashed #cfecec;
  background: #eef9f9;
  border-radius: 16px;
  padding: 36px;
  text-align: center;
  cursor: pointer;
  transition: 0.25s;
}

.upload-box label:hover {
  border-color: #7bc1c0;
  background: #e6f6f6;
}

.upload-content img {
  width: 48px;
  margin-bottom: 12px;
}

.sample-image {
  max-width: 500px;
display: block; 
margin: 0 auto;
border-radius: 12px;
}
/* =========================
   MOBILE FIXES
========================= */

@media (max-width: 768px) {

  .container {
    padding: 24px;
      }

  .top-steps {
    overflow-x: auto;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .card {
    grid-template-columns: 22px 1fr auto;
    padding: 16px;
  }

  .card img {
    width: 80px;
  }

  .chip {
    width: 100%;
    padding: 14px 18px;
    border-radius: 999px;
    border: 1px solid #e2e2e2;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
  }
}

.sample-image {
  width: 100%;
  margin-left: 20px;
  margin-right: 20px;
display: block; 
margin: 0 auto;
border-radius: 12px;
}

/* =========================
   INTL TEL INPUT FIX
========================= */

.iti {
  width: 100%;
}

.iti__country-list {
  z-index: 9999 !important;
  max-height: 260px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .iti__country-list {
    max-height: 50vh;
  }
}

/* =========================
   FILE UPLOAD – FINAL FIX
========================= */

.upload-label {
  display: block;
  border: 2px dashed #cfecec;
  background: #eef9f9;
  border-radius: 16px;
  padding: 36px;
  cursor: pointer;
  transition: all 0.25s ease;
  text-align: center;
  position: relative;
}

.upload-label:hover {
  border-color: #7bc1c0;
  background: #e6f6f6;
}

.upload-label input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.upload-content p {
  font-size: 14px;
  color: #333;
}

.upload-content span {
  color: #4a6cf7;
  font-weight: 500;
  text-decoration: underline;
}

.upload-content small {
  color: #777;
  font-size: 12px;
}

/* =========================
   FIX MOBILE INPUT WIDTH
========================= */

.iti input {
  width: 100% !important;
}

.form-group {
  width: 100%;
}

/* =========================
   UPLOAD – SELECTED STATE FIX
========================= */

.upload-box label {
  display: flex;
  justify-content: center;
}

.upload-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.upload-content p {
  text-align: center;
  line-height: 1.4;
}

.upload-content p strong {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  color: #222;
}

.upload-content p small {
  display: block;
  font-size: 12px;
  color: #666;
}

.upload-content p small:not(:last-child) {
  margin-bottom: 4px;
}
.form-loader {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.form-loader.active {
  display: flex;
}

.loader-box {
  text-align: center;
  font-family: "Poppins", sans-serif;
  color: #333;
}

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e0e0e0;
  border-top: 4px solid #000;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}