/*============================================================================================*/
/* Your custom styles below */
/*============================================================================================*/

/* Mobile-friendly responsive styles for password page */
@media (max-width: 768px) {
    body {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    header {
        padding: 1rem 0;
        flex-shrink: 0;
    }
    
    header .container-fluid {
        padding: 0 1rem;
    }
    
    header img {
        max-width: 150px;
        height: auto;
    }
    
    .wrapper_centering {
        flex: 1;
        display: flex;
        align-items: center;
        padding: 1rem 0;
        min-height: 0;
    }
    
    .container_centering {
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
    }
    
    .main_title_1 {
        margin-bottom: 1.5rem !important;
    }
    
    .main_title_1 h3 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .main_title_1 div {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }
    
    .card {
        margin: 0 1rem;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }
    
    .main_question {
        font-size: 1.25rem !important;
        margin-bottom: 1rem !important;
    }
    
    .form-group {
        margin-bottom: 1rem !important;
    }
    
    .form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        height: auto;
    }
    
    .submit {
        width: 100%;
        padding: 0.75rem;
        font-size: 1.1rem;
        margin-top: 1rem;
    }
    
    #bottom-wizard {
        margin-top: 1.5rem !important;
    }
}

/* Mobile survey layout - hide left panel and maximize question space */
@media (max-width: 768px) {
    /* Hide the header on mobile to maximize space */
    header {
        display: none !important;
    }
    
    /* Hide the left panel with survey heading and content */
    .col-xl-4.col-lg-4 {
        display: none !important;
    }
    
    /* Make the wizard container take full width */
    .col-xl-7.col-lg-7 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    /* Ensure wrapper stretches full height but allows natural scrolling */
    .wrapper_centering {
        min-height: 100vh !important; /* Full viewport height */
        height: auto !important; /* Allow expansion beyond viewport if needed */
        display: block !important;
        padding: 0 !important;
        overflow: visible !important; /* Override overflow: hidden */
        margin: 0 auto 0 !important; /* Remove negative margin */
    }
    
    .container_centering {
        display: block !important;
        padding: 20px 0 45px 0 !important; /* Reduced top padding since no header */
        min-height: calc(100vh - 65px) !important; /* Full height minus footer only */
        height: auto !important; /* Allow expansion if content is longer */
        vertical-align: top !important; /* Override table-cell alignment */
    }
    
    /* Remove table display that constrains height */
    .wrapper_centering {
        display: block !important;
    }
    
    /* Allow wizard container to expand naturally */
    #wizard_container {
        min-height: auto !important;
        height: auto !important;
    }
    
    /* Remove height constraints from middle wizard */
    #middle-wizard {
        min-height: auto !important;
        height: auto !important;
    }
    
    /* Remove max-height constraints from containers */
    .question_container {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
    
    .multiple-choice-container {
        max-height: none !important;
        overflow: visible !important;
        padding-right: 0 !important;
    }
    
    /* Ensure proper spacing on mobile */
    .step {
        width: 100%;
        padding: 0 1rem;
    }
    
    /* Adjust textarea height for mobile */
    .form-control[style*="height:180px"] {
        height: 120px !important;
    }
    
    /* Ensure buttons are properly sized */
    .submit {
        width: 100%;
        margin-top: 1rem;
    }
    
    /* Adjust progress bar container spacing */
    #detail-progress-bar-wrapper {
        margin: 0.5rem 0;
    }
    
    /* Remove any remaining height constraints from the container */
    .container {
        height: auto !important;
        min-height: 100% !important; /* Ensure container takes full height */
    }
    
    /* Ensure the row doesn't constrain height */
    .row {
        height: auto !important;
        min-height: 100% !important; /* Ensure row takes full height */
        align-items: flex-start !important; /* Override center alignment */
    }
}

@media (min-width: 769px) {
    .wrapper_centering {
        min-height: 100vh;
    }
    
    header img {
        max-width: 200px;
        height: auto;
    }
}

/* Ensure form inputs are properly sized */
.form-group input[type="password"],
.form-group input[type="text"] {
    width: 100%;
    box-sizing: border-box;
}

/* Improve button accessibility */
.submit {
    min-height: 44px;
    cursor: pointer;
}

/* Ensure proper spacing on all devices */
.step {
    width: 100%;
}

.multiple-choice-container {
    max-height: 35vh; /* Set maximum height */
    overflow-y: auto; /* Add scroll if content overflows */
    padding-right: 10px;
  }

  /* Style the scrollbar track */
.multiple-choice-container::-webkit-scrollbar-track {
    -webkit-border-radius: 3px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.2); /* You can adjust the color and opacity */
  }
  
  /* Style the scrollbar thumb (the part you drag) */
  .multiple-choice-container::-webkit-scrollbar-thumb {
    -webkit-border-radius: 3px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.4); /* You can adjust the color and opacity */
  }
  
  /* Style the scrollbar size */
  .multiple-choice-container::-webkit-scrollbar {
    width: 8px;
  }

.question_container {
    max-height: 20vh; /* 25% of the viewport height */
    overflow-y: auto; /* Add vertical scrollbar if necessary */
    padding-right: 10px; /* Add space for the scrollbar */
    margin-bottom: 10px;
  }

    /* Style the scrollbar track */
  .question_container::-webkit-scrollbar-track {
    -webkit-border-radius: 3px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.2); /* You can adjust the color and opacity */
  }
  
  /* Style the scrollbar thumb (the part you drag) */
  .question_container::-webkit-scrollbar-thumb {
    -webkit-border-radius: 3px;
    border-radius: 3px;
    background-color: rgba(0, 0, 0, 0.4); /* You can adjust the color and opacity */
  }
  
  /* Style the scrollbar size */
  .question_container::-webkit-scrollbar {
    width: 8px;
  }

  /* To hide sections like the next button */
.hidden {
  display: none;
}

.loader {
  width: 20px; /* Smaller width for inside a button */
  height: 20px; /* Smaller height for inside a button */
  margin: auto; /* Center loader in the button */
  animation: circle infinite .95s linear;
  border: 2px solid transparent;
  border-top-color: #333; /* Make top border visible */
  border-radius: 100%;
}

button.submit.loader-button {
  display: inline-block; /* Aligns to the right */
  float: right; /* Right align in its container */
  padding: 0; /* Adjust padding to fit loader */
  width: 110px; /* Width to fit the loader */
  height: 40px; /* Height to fit the loader */
  background: #ffcc00; /* Background color */
  border: none; /* No border */
  color: transparent; /* Hide text */
  transition: background .5s ease; /* Smooth transition for background */
  cursor: default; /* Default cursor to indicate it's not clickable */
  display: none; /* Hide by default */
}

@keyframes circle {
  to { transform: rotate(360deg); }
}

#loader-div {
  text-align: right;
  margin-top: 30px;
}

/* Skip button styling - override default btn_1 and submit styles */
button.submit.skip-button {
  padding: 1px 8px !important;
  font-size: 11px !important;
  line-height: 1 !important;
  height: 20px !important;
  min-height: 20px !important;
  margin-left: 10px !important;
  display: inline-block !important;
  vertical-align: middle !important;
  background: #ffcc00 !important;
  color: #111 !important;
  border: none !important;
  border-radius: 3px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  transition: background .5s ease !important;
  width: auto !important;
}

button.submit.skip-button:hover {
  background: #fff !important;
}
