/* Critical override for button visibility */
#57 .next-button {
  display: inline-block !important;
}

:root {
  --logo-holder-dimensions: 6rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Calibri, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2rem;
  background-color: #f5f2f2;
  position: relative;
}

.back-arrow {
  width: var(--logo-holder-dimensions);
  height: var(--logo-holder-dimensions);
  position: absolute;
  top: 0;
  left: 0;
  font-size: 2rem;
  cursor: pointer;
  color: #000000;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 200;
  box-sizing: border-box;
}

.back-arrow:hover {
  transform: translateX(-5px);
}

h1 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: #000000;
}

.question-holder {
  width: 100%;
  max-width: 600px;
  margin-bottom: 1rem;
  text-align: center;
  padding: 0 2rem;
  display: none;
}

.goal-container {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: center;
}

.goal-option {
  width: 100%;
  background-color: #fff5cc;
  padding: 1.5rem;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #000000;
  text-align: center;
  font-size: 1.25rem;
  color: #000000;
}

.goal-option.selected {
  background-color: #ffcb00;
  border-width: 3px;
}

.goal-option:active {
  transform: translateY(0);
}

.next-button-holder {
  text-align: center;
}

.next-button {
  width: fit-content;
  padding: 1.2rem 3.4rem;
  margin-top: 2rem;
  background-color: #ffcb00;
  border: 2px solid #000000;
  border-radius: 12px;
  font-size: 1.25rem;
  cursor: pointer;
  color: #000000;
  transition: all 0.3s ease;
}

.next-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.next-button:active {
  transform: translateY(0);
}

.footer {
  display: none;
}

input.goal-option {
  cursor: auto;
  height: 50px;
  line-height: 50px;
  padding: 0 1.5rem;
  text-align: left;
  vertical-align: middle;
}

textarea.goal-option {
  padding: 1rem 1.5rem;
  text-align: left;
  min-height: 120px;
  resize: vertical;
}

/* #2, #4, #61 */
/* .question-holder:nth-child(62) */
.question-holder:nth-child(4),
.question-holder:nth-child(6),
.question-holder:nth-child(63) {
  text-align: left;
  font-size: 1.5rem;
}

/* #5 */
/* Removing this old styling for screen 5 images since we've replaced it with better rules below */
/* .question-holder:nth-child(7) img {
  width: 100px;
  height: 100px;
} */

.logo-holder {
  width: 100%;
  height: var(--logo-holder-dimensions);
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 3rem;
  box-sizing: border-box;
}

.logo-holder>img {
  width: var(--logo-holder-dimensions);
  height: var(--logo-holder-dimensions);
}

.toggle-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  gap: 1rem;
}

.toggle-button {
  position: relative;
  width: 60px;
  height: 30px;
  background-color: #ffcb00;
  border-radius: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid #000000;
}

.toggle-button::before {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.toggle-button.active {
  background-color: #ffcb00;
}

.toggle-button.active::before {
  transform: translateX(30px);
}

.toggle-label {
  font-size: 1rem;
  color: #000000;
  font-weight: bold;
}

.toggle-label:last-child {
  color: rgb(136, 136, 136);
}

.file-upload-container {
  position: relative;
  width: 100%;
  padding: 1.5rem;
  border: 2px dashed #000000;
  border-radius: 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background-color: #fff5cc;
}

.file-upload-container:hover {
  background-color: #ffe680;
}

.file-upload-container input[type="file"] {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
}

.file-list {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.file-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: #ffffff;
  border-radius: 8px;
  border: 1px solid #000000;
}

.file-item span {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.remove-file {
  background: none;
  border: none;
  color: #ff0000;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 0.5rem;
}

.remove-file:hover {
  color: #cc0000;
}

.danger {
  color: red;
}

.circle-loader-container {
  width: 200px;
  height: 200px;
  position: relative;
  margin: 2rem auto;
}

.circle-loader {
  width: 100%;
  height: 100%;
  border: 10px solid #ffcb00;
  border-radius: 50%;
  position: relative;
  overflow: hidden;
}

.circle-loader::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 10px solid #ffffff;
  border-radius: 50%;
  box-sizing: border-box;
}

.circle-loader-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: #ffcb00;
  transition: height 0.1s linear;
}

.circle-loader-percentage {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  font-weight: bold;
  color: #000000;
  z-index: 1;
}

/* #60 */
/* .question-holder:nth-child(62) .next-button {
  display: none;
} */
  
/* Ensure step 60 Next button is initially hidden but can be shown via JavaScript */
#60 .next-button {
  display: none; /* Hidden by default, shown via JS when loader completes */
}
  
/* Ensure the next button in step 57 is always visible */
#57 .next-button {
  display: inline-block !important;
}

.progress-holder {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 0.6rem;
  background-color: #f0f0f0;
  z-index: 100;
}

.progress-bar {
  height: 100%;
  background-color: #ffcb00;
  width: 0%;
  transition: width 0.3s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.submission-success {
  color: green; 
  font-weight: bold; 
  text-align: center; 
  padding: 20px; 
  display: none;
}

.submission-error {
  color: #e74c3c; 
  font-weight: bold; 
  text-align: center; 
  padding: 20px; 
  margin-bottom: 20px;
  display: none;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  background-color: #fff5cc;
}

.error-recovery-options {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  margin-top: 25px;
}

.error-recovery-options .recovery-button {
  width: fit-content;
  padding: 0.8rem 2rem;
  background-color: #ffcb00;
  border: 2px solid #000000;
  border-radius: 12px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #000000;
  transition: all 0.3s ease;
}

.error-recovery-options .recovery-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.error-recovery-options .recovery-button.secondary {
  background-color: #e0e0e0;
  border-color: #888888;
}

.error-recovery-options .recovery-button.secondary:hover {
  background-color: #d0d0d0;
}

.support-message {
  margin-top: 20px;
  font-size: 0.9rem;
  color: #555;
}

.validation-message {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ff6b6b;
  color: white;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 14px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
  z-index: 100;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.validation-message.visible {
  display: block;
  opacity: 1;
}

/* Special styling for Screen 5 (pet selection) */
div[id="5"] {
  max-width: 100%;
}

/* Desktop and tablet layout (horizontal row) */
div[id="5"] .goal-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 1rem;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  overflow-x: auto;
  padding-bottom: 10px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

/* Hide scrollbar for Chrome/Safari/Opera */
div[id="5"] .goal-container::-webkit-scrollbar {
  height: 4px;
}

div[id="5"] .goal-container::-webkit-scrollbar-thumb {
  background: #ffcb00;
  border-radius: 4px;
}

div[id="5"] .goal-option {
  flex: 0 0 auto;
  width: 148px;
  min-width: 148px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  padding-bottom: 0.6rem;
  min-height: 170px;
  margin-bottom: 10px;
  border-radius: 0;
  position: relative;
  z-index: 1;
  border: 2px solid #000000;
  box-sizing: border-box;
}

div[id="5"] img {
  width: 144px;
  height: 144px;
  margin-bottom: 0.2rem;
  object-fit: contain;
}

div[id="5"] .goal-option p {
  margin-top: 0.1rem;
  font-weight: bold;
  font-size: 1.2rem;
}

/* Add specific hover styles for pet selection */
div[id="5"] .goal-option:hover {
  border: 2px solid #000000;
  position: relative;
  z-index: 1;
  background-color: #ffe580;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  margin-top: -2px;
  margin-bottom: 12px;
}

/* Add specific selected styles for pet selection */
div[id="5"] .goal-option.selected {
  border: 3px solid #000000;
  position: relative;
  z-index: 1;
}

/* Medium screens (tablets) */
@media (min-width: 481px) and (max-width: 767px) {
  div[id="5"] .goal-option {
    width: 136px;
    min-width: 136px;
  }
  
  div[id="5"] img {
    width: 132px;
    height: 132px;
  }
  
  div[id="5"] .goal-container {
    max-width: 450px;
  }
}

/* Tablet-specific layout */
@media (min-width: 768px) {
  div[id="5"] .goal-container {
    max-width: 500px;
  }
}

/* Hover effects for desktop */
@media (min-width: 481px) {
  .goal-option:hover {
    background-color: #ffe580;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border: 2px solid #000000;
    position: relative;
    z-index: 1;
  }

  .back-arrow {
    left: 2rem;
  }
}

/* Basic mobile styles - specific responsive overrides moved to mobile-fixes.css */
@media (max-width: 480px) {
  h1 {
    font-size: 1.8rem;
  }

  .goal-option {
    font-size: 1rem;
    padding: 1.2rem;
  }

  body {
    padding: 1rem;
  }

  .back-arrow {
    left: 0rem;
  }
}

/* CSS for weight images on screens 17 and 18 (IDs 21 and 22) */
div[id="21"] .goal-container,
div[id="22"] .goal-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-gap: 15px;
  justify-content: center;
  max-width: 650px;
  margin: 0 auto;
}

div[id="21"] .goal-option,
div[id="22"] .goal-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px;
  border-radius: 0;
  width: 100%;
  max-width: 300px;
  margin: 0 auto;
}

div[id="21"] .goal-option img,
div[id="22"] .goal-option img {
  width: 100%;
  height: auto;
  border-radius: 0;
  margin-bottom: 0.5rem;
}

div[id="21"] .goal-option p,
div[id="22"] .goal-option p {
  margin-top: 5px;
  margin-bottom: 0;
  font-size: 1.1rem;
  font-weight: bold;
  text-align: center;
}

/* Hover effects for the pet body condition options */
div[id="21"] .goal-option:hover,
div[id="22"] .goal-option:hover {
  background-color: #ffe580;
  transform: translateY(-2px);
}

div[id="21"] .goal-option.selected,
div[id="22"] .goal-option.selected {
  border-width: 3px;
  padding: 3px;
}

/* Media query for mobile devices */
@media (max-width: 767px) {
  div[id="21"] .goal-container,
  div[id="22"] .goal-container {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
  
  div[id="21"] .goal-option,
  div[id="22"] .goal-option {
    margin-bottom: 10px;
  }
}

/* Media query for larger desktop screens */
@media (min-width: 1200px) {
  div[id="21"] .goal-container,
  div[id="22"] .goal-container {
    max-width: 700px;
  }
  
  div[id="21"] .goal-option,
  div[id="22"] .goal-option {
    max-width: 330px;
  }
}

/* Enlarged text styling for weight solution message */
.weight-solution-text {
  font-size: 1.3rem;
  line-height: 1.4;
  margin: 1.5rem 0;
  text-align: center;
}

.weight-solution-text strong {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 1rem;
}

@media (max-width: 480px) {
  .weight-solution-text {
    font-size: 1.2rem;
  }
  
  .weight-solution-text strong {
    font-size: 1.5rem;
  }
}

/* Payment button styling */
#payment-button {
  background-color: #ffcb00;
  font-weight: bold;
  padding: 1.4rem 3.6rem;
}

#payment-button:hover {
  background-color: #f0c000;
  transform: translateY(-3px);
  box-shadow: 0 5px 8px rgba(0, 0, 0, 0.15);
}

#submit-payment, #cancel-payment {
  width: 100%;
  max-width: 300px;
}

#cancel-payment {
  background-color: #e0e0e0;
  border-color: #888888;
}

#cancel-payment:hover {
  background-color: #d0d0d0;
}

/* Weight input specific styling (step 23) */
div[id="23"] input.goal-option {
  height: 50px;
  line-height: 50px;
  font-size: 1.25rem;
  text-align: center;
  width: 150px;
  margin: 0 auto;
}

/* Contact info specific styling (step 39) */
div[id="39"] input.goal-option {
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 400px;
}

div[id="39"] h1 {
  margin-top: 1.5rem;
}

/* Breed input specific styling (step 6) */
div[id="6"] input.goal-option {
  width: 100%;
  max-width: 400px;
  text-align: center;
}

/* Date input specific styling (steps 11 and 12) */
div[id="11"] input.goal-option,
div[id="12"] input.goal-option {
  text-align: center;
  width: 100%;
  max-width: 200px;
  margin: 0 auto;
}

/* Safari/iOS specific fixes */
@supports (-webkit-touch-callout: none) {
  input.goal-option {
    line-height: normal;
    padding-top: 14px;
    padding-bottom: 14px;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .progress-holder {
    height: 0.4rem;
  }
  
  .logo-holder {
    margin-top: 1rem;
    margin-bottom: 2rem;
  }
  
  .back-arrow {
    font-size: 2.5rem;
    z-index: 300;
    width: 4rem;
    height: 4rem;
    font-weight: bold;
  }
}

@media (max-width: 480px) {
  .progress-holder {
    height: 0.3rem;
  }
  
  .logo-holder {
    margin-top: 0.8rem;
    margin-bottom: 1.5rem;
  }
  
  .back-arrow {
    font-size: 2.2rem;
    z-index: 300;
    width: 3.5rem;
    height: 3.5rem;
    font-weight: bold;
  }
}
@media (max-width: 767px) {
  /* Mobile-specific fixes are in mobile-fixes.css */
} 