/* ==========================================================================
   1) Base & Reset
   ========================================================================== */
#size-popup, .size-popup-inner, form#size-wizard-form, .wizard-buttons button {
  box-sizing: border-box;
}
#size-popup { font-family: 'Helvetica Neue', Arial, sans-serif; }

/* ==========================================================================
   2) Backdrop & Container
   ========================================================================== */
#size-popup {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 9999;
  align-items: center; justify-content: center;
}

.size-popup-inner {
  background: #fff;
  width: 100%; max-width: 800px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 30px rgba(0,0,0,0.2);
  display: flex; flex-direction: column;
    height: 60vh !important;
    max-height: 60vh !important;

}

/* ==========================================================================
   3) Header
   ========================================================================== */
.sr-popup-header {
  position: relative;
  display: flex; align-items: center;
  padding: 16px 24px;
  background: #f9f9f9;
  border-bottom: 1px solid #e6e6e6;
}

.sr-logo {
  width: 80px;      /* pick whatever max width works for you */
  height: auto;     /* keep aspect ratio */
  max-height: 40px; /* optional cap on height */
  object-fit: contain;
}

.sr-header-title {
  flex-grow: 1;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

.sr-privacy {
  margin-right: 16px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
}
.sr-privacy:hover { text-decoration: underline; }

.sr-close {
  position: absolute;
  top: 16px; right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #999;
  cursor: pointer;
}

/* ==========================================================================
   4) Step Indicators
   ========================================================================== */
.wizard-nav {
  text-align: center;
  padding: 12px 0;
  background: #fff;
}
.step-indicator {
  display: inline-block;
  margin: 0 6px;
  width: 10px; height: 10px;
  background: #ddd;
  border-radius: 50%;
  transition: background 0.2s;
}
.step-indicator.active {
  background: #37a169;
}

/* ==========================================================================
   5) Form & Steps
   ========================================================================== */
form#size-wizard-form {
  padding: 0px 24px 0px 0px;
  background: #fff;
  flex-grow: 1;
}

/* Hide all, show only .active */
form#size-wizard-form .step { display: none; }
form#size-wizard-form .step.active {
    display: flex; flex-wrap: wrap;
    height: 300px;
}

/* SECTION TITLES */
.step h3 {
  width: 100%;
  font-size: 22px;
  margin: 0 0 30px;
  color: #222;
  text-align: center;
}

/* ==========================================================================
   5a) STEP 1: Measurements (Image + Content)
   ========================================================================== */
.step-1 .sr-image {
  flex: 0 0 36%;
  padding-right: 24px;
}
.step-1 .sr-content {
  flex: 1;
}

/* Placeholder image styling */
.sr-image img {
  width: 100%;
  border-radius: 4px;
}

/* ==========================================================================
   5b) STEP 2: Gender & Age (Stacked Fields)
   ========================================================================== */
.step-2 {
  flex-direction: column;
}
.step-2 label {
  font-weight: 500;
  margin-bottom: 6px;
  color: #444;
}
.step-2 select,
.step-2 input {
  width: 100%;
  padding: 10px 12px;
  margin-bottom: 20px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* ==========================================================================
   5c) STEP 3: Fit Selection (Centered Icons)
   ========================================================================== */
.step-3 {
  flex-direction: column;
  align-items: center;
}
.fit-options {
  display: flex;
  justify-content: space-around;
  width: 100%;
}
.fit-label {
  text-align: center;
  cursor: pointer;
}
.fit-label img {
  display: block;
  margin: 0 auto 8px;
  width: 150px; height: 200px;
  border-radius: 4px;
  border: 2px solid transparent;
  transition: border-color 0.2s;
}
.fit-label input {
  display: none;
}
.fit-label input:checked + img {
  border-color: #37a169;
}
.fit-label span {
  display: block;
  font-size: 14px;
  color: #333;
}

/* ==========================================================================
   5d) STEP 4: Result
   ========================================================================== */
.step-4 {
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#size-result {
  font-size: 20px;
  color: #2f855a;
  text-align: center;
  margin-top: 12px;
}

/* ==========================================================================
   6) Input Toggles (Height/Weight)
   ========================================================================== */
.sr-input-toggle {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
}
.sr-input-toggle label {
  font-weight: 500;
  margin-bottom: 6px;
  color: #444;
  width: 100%;
  display: block;
}
.sr-input-toggle input[type="number"] {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.sr-toggle {
  display: flex;
  align-items: center;
  margin-left: 16px;
}
.sr-toggle span {
  font-size: 14px;
  color: #666;
  margin: 0 6px;
}
.sr-toggle input {
  display: none;
}
.sr-toggle label {
  position: relative;
  width: 36px; height: 20px;
  background: #ddd;
  border-radius: 10px;
  cursor: pointer;
}
.sr-toggle label::after {
  content: '';
  position: absolute;
  top: 2px; left: 2px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}
.sr-toggle input:checked + label::after {
  transform: translateX(16px);
}
.sr-toggle input:checked + label {
  background: #37a169;
}
#size-wizard-form .wizard-buttons {
  display: flex !important;
  width: 100%;               /* imasi visos formos pločio */
  justify-content: end;   /* centruoja mygtukus horizontaliai */
  padding: 16px 0;
  background: #fff;
  border-top: 1px solid #e6e6e6;
  box-sizing: border-box;
}
/* ==========================================================================
   7) Navigation Buttons
   ========================================================================== */
.wizard-buttons {
  padding: 16px 24px;   /* whatever spacing you like */
  background: #fff;     /* match your popup background */
  /* optional: add a top border to separate it visually */
  border-top: 1px solid #e6e6e6;
}
.wizard-buttons button {
  padding: 10px 24px;
  font-size: 14px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin-left: 12px;
}
.wizard-buttons .prev {
  background: #e2e8f0;
  color: #333;
}
.wizard-buttons .next {
  background: #68d391;
  color: #fff;
}
.wizard-buttons .submit {
  background: #2f855a;
  color: #fff;
}

.fit-label::before {
  content: attr(data-label);
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  text-align: center;
  margin-bottom: 8px;
}

/* Constrain the side model image */
.step-1 .sr-image img {
  min-width: 300px;
  width: 100%;
  height: auto;
}

@media (max-width: 600px) {
  /* adjust 600px to your breakpoint of choice */
  .step-1 .sr-image {
    display: none;
  }
  /* and let the content fill the space */
  .step-1 .sr-content {
    width: 100%;
  }
}







/* Popup inner as vertical flex */
.size-popup-inner {
  display: flex;
  flex-direction: column;
  width: 90vw;
  max-width: 800px;
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

/* Header */
.sr-popup-header {
  flex: 0 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #e6e6e6;
}
.sr-logo {
  max-width: 80px;
  height: auto;
}
.sr-header-title {
  margin: 0 auto;
  font-size: 1.2rem;
  font-weight: 600;
}

/* Body: flex row */
.sr-popup-body {
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

/* Left image column */
.sr-image {
  flex: 0 0 40%;
  overflow: hidden;
}
/* .sr-image img {
  width: 100%;
  height: 1100px;
  object-fit: cover;
  display: block;
} */

/* Right wizard column */
.sr-wizard-column {
  flex: 1 1 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 16px 24px;
}

/* Step indicators */
.wizard-nav {
  flex: 0 0 auto;
  text-align: center;
  margin-bottom: 12px;
}
.step-indicator {
  display: inline-block;
  width: 8px; height: 8px;
  margin: 0 4px;
  background: #ddd;
  border-radius: 50%;
}
.step-indicator.active {
  background: #6cb33e;
}

/* Form steps */
#size-wizard-form {
  flex: 1 1 auto;
  overflow-y: auto;
}
.step { display: none; }
.step.active { display: block; }

/* Form field styling */
.step label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 500;
}
.step input[type="number"],
.step select {
  width: 100%;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

/* Fit options */
.fit-options {
  display: flex;
  justify-content: space-around;
  margin-top: 16px;
}
.fit-label {
  text-align: center;
  cursor: pointer;
}
.fit-label img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border: 2px solid transparent;
  border-radius: 4px;
}
.fit-label input:checked + img {
  border-color: #6cb33e;
}

/* Buttons at bottom of wizard column */
.wizard-buttons {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  border-top: 1px solid #e6e6e6;
  padding-top: 12px;
}


.button.prev {
  background: #ccc;
  color: #333;
}




.sr-image img {
  width: auto;       
  height: 100%;      
  object-fit: cover; 
  display: block;
}



.sr-popup-header {
  flex: 0 0 auto;
}
.wizard-buttons {
  flex: 0 0 auto;
}

.sr-popup-body {
  flex: 1 1 auto;
  display: flex;
  overflow: hidden;
}

.sr-image {
  flex: 0 0 40%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sr-image img {
  flex: 1 1 auto;
  width: auto;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .size-popup-inner {
    width: 95vw;

  }
  .sr-image {
    flex: 0 0 35%;
  }
  .sr-wizard-column {
    flex: 1 1 65%;
    padding: 12px 16px;
  }
  .fit-label img {
    width: 120px;
    height: 150px;
  }
}

@media (max-width: 480px) {
  .size-popup-inner {
    flex-direction: column;
    width: 100vw;
    max-width: none;
  }

  .sr-image {
    display: none;    /* paslepiam šoną */
  }

  .sr-wizard-column {
    flex: 1 1 auto;
    padding: 16px;
  }

  #size-wizard-form {
    padding: 0;
  }

  .wizard-buttons {
    padding: 8px 16px;
  }

  .fit-label img {
    width: 80px;
    height: 80px;
  }
}
