@import url(https://fonts.googleapis.com/css?family=Montserrat);

/*basic reset*/
* {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
  background: #6441A5; /* fallback for old browsers */
  background: -webkit-linear-gradient(to left, #6441A5, #2a0845); /* Chrome 10-25, Safari 5.1-6 */
}

body {
  font-family: montserrat, arial, verdana;
  background: transparent;
}

/* Student Application: keep form content left-aligned */
#app-msform {
  text-align: left;
}

#demo-msform fieldset, #app-msform fieldset {
  background: white;
  border: 0 none;
  border-radius: 0px;
  box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
  padding: 20px 30px;
  box-sizing: border-box;
  width: 80%;
  margin: 0 10%;

  /*stacking fieldsets above each other*/
  position: relative;
}

.step-pane {
  display: none;
}

.step-pane.active {
  display: block;
}

.preview-kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px dashed rgba(0, 0, 0, .1);
}

.preview-kv:last-child {
  border-bottom: 0;
}

.form-error {
  font-size: .875rem;
  color: #dc3545;
}

input.form-control,
select.form-select {
  height: calc(2.375rem + 2px);
  padding-top: .375rem;
  padding-bottom: .375rem;
  line-height: 1.5;
  border-radius: .375rem;
}

#app-msform .form-check-input {
  cursor: pointer;
  accent-color: #0d6efd;
}

/* Student Application: fieldset (shadow) full width like alerts */
#app-msform fieldset {
  width: 100%;
  margin: 0;
}

/*Hide all except first fieldset (demo form only; app form uses .step-pane.active) */
#demo-msform fieldset:not(:first-of-type) {
  display: none;
}

#app-msform fieldset.step-pane {
  display: none;
}

#app-msform fieldset.step-pane.active {
  display: block;
}

/*inputs (exclude checkbox/radio — they have their own rules below) */
#demo-msform input:not([type="checkbox"]):not([type="radio"]), #demo-msform textarea,
#app-msform input:not([type="checkbox"]):not([type="radio"]), #app-msform textarea {
  padding: 15px;
  border: 1px solid #ccc;
  border-radius: 0px;
  margin-bottom: 10px;
  width: 100%;
  box-sizing: border-box;
  font-family: montserrat;
  color: #2C3E50;
  font-size: 13px;
}

#demo-msform input:not([type="checkbox"]):not([type="radio"]):focus, #demo-msform textarea:focus,
#app-msform input:not([type="checkbox"]):not([type="radio"]):focus, #app-msform textarea:focus {
  -moz-box-shadow: none !important;
  -webkit-box-shadow: none !important;
  box-shadow: none !important;
  border: 1px solid #6F1418;
  outline-width: 0;
  transition: All 0.5s ease-in;
  -webkit-transition: All 0.5s ease-in;
  -moz-transition: All 0.5s ease-in;
  -o-transition: All 0.5s ease-in;
}

#app-msform .form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding-left: 0;
  margin-bottom: 0;
}

#app-msform .form-check .form-check-input {
  float: none;
  flex-shrink: 0;
  width: 1.1em;
  height: 1.1em;
  padding: 0;
  margin: 0;
}
#app-msform .form-check .form-check-label {
  margin: 0;
}

#confirm-profile {
  width: 1.1em;
  padding: 0;
  margin: 0;
  accent-color: #6F1418;
}
#confirm-profile:checked { 
  background-color: #6F1418; 
  border-color: #6F1418; 
}

/* Step 1 "Next" button: light maroon when disabled (not confirmed) */
#to-step-2:disabled {
  background-color: #B78A8C;
  border-color: #B78A8C;
  color: #fff;
  opacity: 1;
  cursor: not-allowed;
}

/*buttons*/
#demo-msform .action-button, #app-msform .action-button {
  width: 100px;
  background: #6F1418;
  font-weight: bold;
  color: white;
  border: 0 none;
  border-radius: 25px;
  cursor: pointer;
  padding: 10px 5px;
  margin: 10px 5px;
}

#demo-msform .action-button:hover, #demo-msform .action-button:focus,
#app-msform .action-button:hover, #app-msform .action-button:focus {
  box-shadow: 0 0 0 2px white, 0 0 0 3px #6F1418;
}

#demo-msform .action-button-previous, #app-msform .action-button-previous {
  width: 100px;
  background: #C5C5F1;
  font-weight: bold;
  color: white;
  border: 0 none;
  border-radius: 25px;
  cursor: pointer;
  padding: 10px 5px;
  margin: 10px 5px;
}

#demo-msform .action-button-previous:hover, #demo-msform .action-button-previous:focus,
#app-msform .action-button-previous:hover, #app-msform .action-button-previous:focus {
  box-shadow: 0 0 0 2px white, 0 0 0 3px #C5C5F1;
}

/*headings*/
.fs-title {
  font-size: 18px;
  text-transform: uppercase;
  color: #2C3E50;
  margin-bottom: 10px;
  letter-spacing: 2px;
  font-weight: bold;
}

.fs-subtitle {
  font-weight: normal;
  font-size: 13px;
  color: #666;
  margin-bottom: 20px;
}

/*progressbar*/
#demo-progressbar, #app-progressbar {
  margin-bottom: 30px;
  overflow: hidden;
  /*CSS counters to number the steps*/
  counter-reset: step;
}

#demo-progressbar li, #app-progressbar li {
  list-style-type: none;
  color: white;
  text-transform: uppercase;
  font-size: 9px;
  width: 33.33%;
  float: left;
  position: relative;
  letter-spacing: 1px;
}

#demo-progressbar li:before, #app-progressbar li:before {
  content: counter(step);
  counter-increment: step;
  width: 24px;
  height: 24px;
  line-height: 26px;
  display: block;
  font-size: 12px;
  color: #333;
  background: white;
  border-radius: 25px;
  margin: 0 auto 10px auto;
}

#app-progressbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 30px;
  padding-left: 0;
}
#app-progressbar li {
  float: none;
  width: auto;
  flex: 1 1 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  position: relative;
  z-index: 0;
  color: #6F1418;
}
#app-progressbar li:before {
  margin: 0;
  line-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

/*progressbar connectors*/
#demo-progressbar li:after, #app-progressbar li:after {
  content: '';
  width: 100%;
  height: 2px;
  background: white;
  position: absolute;
  left: -50%;
  top: 9px;
  z-index: -1;
}

#demo-progressbar li:first-child:after,
#app-progressbar li:first-child:after {
  content: none;
}

/* Student Application connector + colors (override the generic white connector) */
#app-progressbar li:after {
  background: rgba(111, 20, 24, 0.22); /* light #6F1418 */
  height: 2px;
  top: 12px; /* circle center */
  left: calc(-50% + 12px);
  width: calc(100% - 24px); /* edge-to-edge between circles */
  z-index: 1; /* behind circle, visible */
}
#app-progressbar li.active:after {
  background: #6F1418;
}
#app-progressbar li:before {
  background: rgba(111, 20, 24, 0.22); /* same as inactive connector */
  color: #6F1418;
}
#app-progressbar li.active:before {
  background: #6F1418;
  color: #fff;
}

/*marking active/completed steps green*/
/*The number of the step and the connector before it = green*/
#demo-progressbar li.active:before, #demo-progressbar li.active:after,
#app-progressbar li.active:before, #app-progressbar li.active:after {
  background: #6F1418;
  color: white;
}

/* UTB primary button color for this form */
#app-msform .btn.btn-primary {
  background-color: #6F1418;
  border-color: #6F1418;
  color: #fff;
}

#app-msform .btn.btn-primary:hover,
#app-msform .btn.btn-primary:focus {
  background-color: #5e1114;
  border-color: #5e1114;
  color: #fff;
}

/* Disabled buttons should still look disabled (blur/fade) */
#app-msform .btn.btn-primary:disabled {
  background-color: #6F1418;
  border-color: #6F1418;
  color: #fff;
  opacity: .65;
  cursor: not-allowed;
}

/* Loading state: keep same color and full opacity */
#app-msform .btn.btn-primary.app-loading,
#app-msform .btn.btn-primary.app-loading:disabled {
  background-color: #6F1418;
  border-color: #6F1418;
  color: #fff;
  opacity: 1;
  pointer-events: none;
  cursor: progress;
}

/* Submit button: keep background unchanged while submitting */
#submit-application:disabled {
  opacity: 1;
}
#submit-application.app-loading,
#submit-application.app-loading:disabled {
  opacity: 1;
  pointer-events: none;
  cursor: progress;
}
