@import url(https://fonts.googleapis.com/css2?family=Titillium+Web:wght@300;400;500;600;700&display=swap);

/* Base styles */
:root {
    --primary-color: #2a3139;
    --accent-color: #f7bb99;
    --accent-light: #fbe8dd;
    --text-color: #2a3139;
    --link-color: #ee8d26;
    --error: #CE483D;
    --white: #fff;
    --border-radius: 4px;
    --font-family: "Titillium Web", -apple-system, Roboto, Helvetica, sans-serif;
    --font-weight: 400;
    --font-size: 16px;
  }

  html {
    scroll-behavior: smooth;
  }
  
  body {
    box-sizing: border-box;
    height: auto;
    width: 100%;
    max-width:1330px;
    margin: 0 auto;
    padding: 0 20px;
    background-color: var(--white);
    color: var(--text-color);
    font-family: var(--font-family);
    font-size: var(--font-size);
    font-weight: var(--font-weight);
  }

  .ui.form, .ui.form .field .dropdown, .ui.form .field .dropdown .menu>.item {
    font-size: var(--font-size);
  }

a {
    font-family: var(--font-family);
    text-decoration: underline;
    color: var(--link-color);
    transition: all 0.3s ease;
  }

a:hover {
    text-decoration: underline;
    color: var(--text-color);
  }

h1, h2, h3, h4 {
    font-family: var(--font-family);
    font-weight: var(--font-weight);
    color: var(--text-color);
  }
  
  /* Banner */
  .banner {
    color: var(--accent-color);
    width: 100%;
  }
  
  .bannerContent {
    background-color: var(--primary-color);
    padding: 0 0px 32px 120px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1000;
    transition: all 0.3s ease;
  }
  
  .logo {
    width: 174px;
    align-self: flex-end;
    object-fit: contain;
    object-position: top;
    background-color: transparent;
    margin: 0;
    padding: 0;
  }
  
  .job-title-small {
    font-size: 30px;
    line-height: 1;
    padding-bottom: 16px;
    margin: 10px 0 0 0;
    color: var(--accent-color);
  }
  
  .job-title-large {
    font-size: 45px;
    font-weight: 600;
    line-height: 54px;
    margin: 0;
    color: var(--accent-color);
  }
  
  .login-options {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    width: 100%;
    max-width: 1062px;
  }
  
   .login-link span {
    font-weight: 600;
  }

  .login-option {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
  }

  .login-question {
    font-weight: 600;
    margin:0px;
  }

  
  
  /* Form Layout */
  main {
    margin-top: 32px;
    gap: 24px 98px;
    padding: 0;
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    width:100%;
  }

  .content {
    width: 100%;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    gap: 80px;
  }
  
  .progress-nav {
    width: 128px;
    padding-top: 40px;
    position: sticky;
    top: 0;
    align-self: flex-start;
    z-index: 100;
  }
  
  .progress-bar {
    background-color: var(--white);
    z-index: 100;
  }
  
  .step {
    border-right: 2px solid var(--accent-light);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-light);
    font-size: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .step:hover {
    background-color: var(--accent-light);
    color: var(--text-color);
  }

  .step.active {
    color: var(--text-color);
    border-color: var(--text-color);
  }
  
  .ui.form {
    flex: 1;
    max-width: 1062px;
  }

  
  /* Form Sections */
  .form-section {
    width: 100%;
    position: relative;
    margin: 52px 0px 180px;
  }
  
  .section-number {
    color: var(--accent-light);
    font-size: 400px;
    font-weight: 700;
    line-height: 0;
    position: absolute;
    right: -25px;
    bottom: 48px;
    opacity: 0.25;
    z-index: 0;
  }
  
  .section-header {
    font-size: 40px;
    color: var(--text-color);
    font-weight: 300;
    margin: 0 0 64px;
    z-index: 1;
    position: relative;
  }

  .docs .section-header {
    margin-bottom: 24px;
  }

  .docs .section-header + p {
    margin-bottom: 64px;
  }
  
  /* Form Fields */
  .form-row {
    display: flex;
    gap: 64px;
    margin-bottom: 64px;
  }

  .radio-group {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 64px;
  }

  .radio-group .form-row {
    margin-bottom:0px;
  }
  
  .ui.form .field {
    flex: 1;
    min-width: 240px;
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 0px;
  }

  .ui.form input:not([type]), .ui.form input[type=date], .ui.form input[type=datetime-local], .ui.form input[type=email], .ui.form input[type=file], .ui.form input[type=number], .ui.form input[type=password], .ui.form input[type=search], .ui.form input[type=tel], .ui.form input[type=text], .ui.form input[type=time], .ui.form input[type=url] {
    font-family: var(--font-family);
    font-size: var(--font-size);
    border-color: var(--accent-color);
  }

  .ui.form .field input:not(:placeholder-shown):invalid {
    background-color: var(--white);
  }

  .ui.form .field.error input:not([type]), .ui.form .field.error input[type=date], .ui.form .field.error input[type=datetime-local], .ui.form .field.error input[type=email], .ui.form .field.error input[type=file], .ui.form .field.error input[type=number], .ui.form .field.error input[type=password], .ui.form .field.error input[type=search], .ui.form .field.error input[type=tel], .ui.form .field.error input[type=text], .ui.form .field.error input[type=time], .ui.form .field.error input[type=url], .ui.form .field.error select, .ui.form .field.error textarea, .ui.form .fields.error .field input:not([type]), .ui.form .fields.error .field input[type=date], .ui.form .fields.error .field input[type=datetime-local], .ui.form .fields.error .field input[type=email], .ui.form .fields.error .field input[type=file], .ui.form .fields.error .field input[type=number], .ui.form .fields.error .field input[type=password], .ui.form .fields.error .field input[type=search], .ui.form .fields.error .field input[type=tel], .ui.form .fields.error .field input[type=text], .ui.form .fields.error .field input[type=time], .ui.form .fields.error .field input[type=url], .ui.form .fields.error .field select, .ui.form .fields.error .field textarea {
    background-color: var(--white);
    border-color: var(--error)!important;
  }

  .file-input-wrapper.error {
    border-color: var(--error)!important;
  }
  
  .field label,
  .ui.form:not(.inverted) .field>label:not(.button) {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 400;
    font-size: var(--font-size);
  }

  .field label.floating-label {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    font-size: 16px;
    color: var(--text-color);
    transition: all 0.3s ease;
    padding: 0 10px;
    background-color: var(--white);
    width: auto;
    max-width: calc(100% - 70px);
  }

  .field input:focus + label.floating-label,
  .field input.withValue ~ label.floating-label,
  .field .ui.dropdown.selection.active + label.floating-label,
  .field .ui.dropdown.selection.withValue ~ label.floating-label {
    top: -10px;
    left: 10px;
    font-size: 12px!important;
  }



  .field input:focus-visible {
    outline-color: var(--accent-color);
    outline-width: 0px;
  }

  .field .ui.dropdown.selection.active + label.floating-label,
  .field .ui.dropdown.selection.withValue ~ label.floating-label {
    z-index: 10;
  }

  .ui.dropdown .menu {
    z-index: 1000;
  }

  .ui.dropdown .menu>.item {
    font-size: 16px;
    height: 56px;
    display: flex;
    align-items: center;
  }

  .ui.dropdown .menu>.item:hover {
    background-color: var(--accent-light);
  }

  .ui.selection.active.dropdown .menu,
  .ui.selection.active.dropdown:hover .menu {
    border-color: var(--accent-color);
  }
  
  .field input,
  .field select {
    width: 100%;
    min-height: 56px;
    padding: 0 20px;
    border: 1px solid var(--accent-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family);
    font-size: 16px;
    background-color: var(--white);
  }
  
  .ui.selection.dropdown,
  .ui.selection.dropdown:hover,
  .ui.selection.dropdown:focus,
  .ui.selection.active.dropdown:hover,
  .ui.selection.active.dropdown {
    width: 100%!important;
    border: 1px solid var(--accent-color);
    height: 56px;
    padding-right: 56px;
  }

  .ui.selection.dropdown>.dropdown.icon {
    display: flex;
    width: 56px;
    height: 54px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background: var(--FunctionalColor-100, #FBFCFC);
    box-shadow: 4px -4px 6px 0px rgba(34, 34, 34, 0.03) inset;
    right: 0px;
    margin: 0px;
    padding: 0px;
    opacity: 1;
    top:0px;
    border-top-right-radius: var(--border-radius);
    border-bottom-right-radius: var(--border-radius);
  }

  .ui.dropdown>.dropdown.icon:before {
    display: block;
    content: "";
    width: 24px;
    height: 24px;
    background-image: url(../images/arrow-down.svg) !important;
    background-size: cover !important;
}

  .ui.dropdown>.text {
    position: absolute;
    top: 20px;
    left: 20px;
    background-color: var(--white);
    font-size: var(--font-size);
  }
  
  .select-field::after {
    content: "";
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 56px;
    background-color: #fbfcfc;
    border: 1px solid var(--accent-color);
    border-left: none;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    pointer-events: none;
    background: var(--FunctionalColor-100, #FBFCFC);
    box-shadow: 4px -4px 6px 0px rgba(34, 34, 34, 0.03) inset;
  }
  
  input[type="date"].custom-date {
    position: relative;
    padding-right: 56px;
    appearance: none;
    -webkit-appearance: none;
  }
  
  input[type="date"].custom-date::-webkit-calendar-picker-indicator, .ui.form input[type=date]:focus::-webkit-calendar-picker-indicator {
    opacity: 0;
    position: absolute;
    right: 20px;
    width: 24px;
    height: 100%;
    cursor: pointer;
  }
  
  input[type="date"].custom-date::after {
    content: "";
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    background: url('../images/calendar.svg') no-repeat center center;
    background-size: contain;
    pointer-events: none;
  }

  /* Checkboxes and Radios */
  .ui.checkbox,
  .ui.radio.checkbox {
    min-height: 28px;
    font-size: var(--font-size);
  }

 .ui.checkbox label:before,
 .ui.radio.checkbox label:before {
    width: 28px;
    height: 28px;
    border-color: var(--text-color);
    border-width: 2px;
  }

  .ui.checkbox input:focus~label:before {
    border-color: var(--text-color);
  }

  .ui.checkbox input:checked ~ label:after {
    content: ""!important;
    margin: 0px!important;
    display: inline-block;
    width: 28px;
    height: 28px;
    background-color: var(--text-color);
    border-radius: var(--border-radius);
    background-image: url('data:image/svg+xml;utf8,<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M4 9.5L8 13L14 5" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: 3px 3px;
    background-size: 18px 18px;
    vertical-align: middle;
    color: var(--white)!important;
  }

  .ui.radio.checkbox input[type="radio"]:checked ~ label:before {
    background: var(--text-color);
  }

  .ui.radio.checkbox input:checked ~ label:after {
    content: "";
    position: absolute;
    left: 8px;
    top: 8px;
    width: 12px;
    height: 12px;
    background-color: var(--white);
    border-radius: 50%;
    z-index: 3;
    display: block;
    transform: none;
    transition: none;   
  }

  .ui.radio.checkbox input:focus:checked~label:after {
    background-color: var(--white);
  }

  .ui.checkbox input:checked:focus~label:before {
    border-color: var(--text-color);
  }
  
  .ui.checkbox label,
  .ui.radio.checkbox label {
    padding-left: 42px;
    line-height: 28px;
  }
  
  /* Additional Fields */
  .form-row.additional-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
  
  .form-row.additional-fields .field {
    min-width: 0;
  }
  
  .form-row.additional-fields .field:nth-child(3) {
    grid-column: 1 / span 2;
    width: 100%;
  }

   /* Input File Upload */
  .additional-docs-fields {
    display: flex;
    flex-direction: column;
    gap: 64px;
    flex: 1;
  }
  
  .field.file-field {
    width: 100%;
    margin-bottom: 0; /* gap is handled by flex container */
    display: block;
    position: relative;
  }
  .file-input-wrapper {
    position: relative;
    height: 56px;
    width: 100%;
    border: 1.5px solid #FFCDB2;
    border-radius: 4px;
    background-color: white;
    transition: all 0.3s ease;
  }

  .field .file-input-wrapper label.floating-label,
  .field .file-input-wrapper input:focus + label.floating-label {
    font-size: 16px;
  }
  
  /* The actual file input element (hidden but functional) */
  .file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 3;
  }
  
  /* Upload icon (visible when no file is selected) */
.file-input-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="rgb(42,49,57)" stroke-width="1" stroke-linecap="round" stroke-linejoin="round" viewBox="0 0 28 28" xmlns="http://www.w3.org/2000/svg"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    z-index: 1;
  }
  
  /* Remove button (only visible with file) */
  .file-input-remove {
    position: absolute;
    right: 25px;
    top: 32%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    font-size: 34px;
    line-height: 34px;
    text-align: center;
    cursor: pointer;
    z-index: 4;
    display: none;
    color: var(--text-color)
  }
  
  /* Filename display (only visible with file) */
  .file-input-filename {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #333;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: calc(100% - 50px);
    display: none;
    z-index: 1;
  }
  
  /* Styles for when a file is selected */
  .file-input-wrapper.has-file {
    background-color: #FFCDB2;
  }
  
  .file-input-wrapper.has-file .floating-label  {
    top: -15px!important;
    left: 10px;
    font-size: 12px!important;
    background-color: white;
    z-index: 2;
  }
  
  .file-input-wrapper.has-file .file-input-icon {
    display: none;
  }
  
  .file-input-wrapper.has-file .file-input-remove {
    display: block;
  }
  
  .file-input-wrapper.has-file .file-input-filename {
    display: block;
  }
  
  /* Counter styles */
  #counter {
    font-weight: bold;
  }
  
  .counter-field {
    gap: 5px;
    align-items: flex-end!important;
    padding-bottom: 15px;
}
  
  
  /* Submit Button */
  .button {
    width: auto;
    min-height: 48px;
    padding: 12px 64px;
    border-radius: 24px;
    background-color: var(--primary-color);
    color: var(--accent-color);
    border: none;
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 24px;
  }

  .button:hover {
    background-color: var(--accent-color);
    color: var(--primary-color);
    transition: all 0.3s ease;
  }

  .button.disabled {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
  }

  /* Overlay covering the entire screen */
.overlay {
  display: none;
  position: fixed; /* Fixed position to cover the whole screen */
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8); /* White background with transparency */
  z-index: 1000; /* High z-index to be on top of other content */
  align-items: center; /* Center content vertically */
  justify-content: center; /* Center content horizontally */
}

.overlay.active {
  display: flex;
}

.spinner-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
}

/* Spinner styles */
.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1); /* Light grey border */
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border-top-color: var(--link-color);
  animation: spin 1s infinite linear;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Text style below the spinner */
.overlay-text {
  color: var(--text-color);
  font-size: 18px;
  margin-left: 20px; /* Margin to separate from the spinner */
}

  /* Form Validation */
  .ui.form .required.field>.checkbox:after, .ui.form .required.field>label:after, .ui.form .required.fields.grouped>label:after, .ui.form .required.fields:not(.grouped)>.field>.checkbox:after, .ui.form .required.fields:not(.grouped)>.field>label:after {
    color: var(--text-color)
  }

  .ui.basic.red.label,
  .ui.form .field .prompt.label {
    position: absolute!important;
    bottom: -22px!important;
    left: 0px!important;
    border: none!important;
    font-family: var(--font-family)!important;
    font-size: 14px!important;
    line-height: 14px!important;
    font-weight: 400!important;
    color: var(--error)!important;
    padding:0px;
    margin:0px;
  }

  .file-input-wrapper .ui.basic.red.label + .prompt.label,
  .file-input-wrapper .prompt.label + .ui.basic.red.label {
    bottom: -37px !important;
  }

  .ui.radio .ui.basic.red.label,
  .ui.checkbox .ui.basic.red.label {
    bottom: -16px!important;
  }

  .ui.form .field.error .ui.dropdown, .ui.form .field.error .ui.dropdown .item, .ui.form .field.error .ui.dropdown .text, .ui.form .fields.error .field .ui.dropdown, .ui.form .fields.error .field .ui.dropdown .item {
    background: var(--white);
    border: 1px solid var(--error)!important;
  }

  .ui.basic.pointing.label:before {
    display: none;
  }

  .confirmation {
    margin: 48px 120px;
  }

  .ui.form .field.error.ui.checkbox label::before {
    border-color: var(--error)!important;
  }
  
.warning {
  display: block;
  margin-top: 4rem;
  padding: 1em 2rem;
  border: solid 3px var(--accent-secondary);
  background-color: var(--accent-light);
  font-weight: 400;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  color:var(--text-color);
}

 .warning div.icon {
  width: 40px;
 }

  .warning svg * {
    fill: var(--accent-secondary);
  }

.warning strong {
  font-size: 18px;
  margin-top: 10px;
}

.warning ul {
  margin-bottom: 0px;
}

  /* Responsive Design */
  @media (max-width: 1301px) {
    .login-options {
      flex-direction: column;
      gap: 10px;
      align-items: flex-end;
      justify-content: flex-end;
    }

    .logo {
      width: 124px;
    }

    .content {
      gap: 64px;
    }

    .form {
      gap: 20px 56px
    }

    .form-row {
      gap: 32px;
      margin-bottom: 32px;
    }

    .section-header {
      margin-bottom: 32px;
    }
  }

  @media (max-width: 991px) {
    .job-title-small {
      font-size: 20px;
      line-height: 30px;
    }

    body {
      padding: 0px;
    }

    .logo {
      width: 104px;
    }

    .bannerContent {
      padding: 0 0 48px 20px;
    }

    .form,
    .content {
      display: block;
    }

    .form {
      margin-top: 24px;
    }

    .job-title-large {
      font-size: 30px;
      line-height: 36px;
    }

    .login-options {
      align-items: flex-start;
      gap: 32px;
      padding: 0 20px;
      margin-bottom: 16px;
    }

    .login-option {
      white-space: normal;
      flex-direction: column;
      gap: 4px;
      align-items: flex-start;
    }

    .progress-nav {
      width: 100%;
      padding-top: 0px;
      height: 80px;
    }

    .step {
      width: 25%;
      border-right: none;
      border-top: 2px solid var(--accent-light);
      font-size: 22px;
    }

    .progress-bar {
      display: flex;
    }

    .form-section {
      margin: 32px 0 90px;
      padding: 0 20px;
    }

    .section-header {
      font-size: 32px;
      line-height: 43px;
    }
  
    .form-row {
      flex-wrap: wrap;
      gap: 40px;
      margin-bottom: 40px;
    }

    .form-section:first-of-type .form-row:first-of-type .field:nth-child(2) {
      display: none;
    }

    .form-row.additional-fields {
      display: flex;
      flex-wrap: wrap;
      gap: 40px;
    }

    .form-row.additional-fields .field {
      min-width: 100%;
    }

    .section-number {
      font-size: 200px;
      right: 8px!important;
      bottom: 28px;
    }

    .form-section:first-of-type .section-number {
      right: 0px!important;
    }

    .counter-field {
      display: block!important;
    }

    .field label.floating-label {
      font-size: 13px!important;
    }
  
    .submit-button {
      padding: 12px 32px;
    }

    .field .file-input-wrapper label.floating-label,
    .field .file-input-wrapper input:focus + label.floating-label {
      font-size: 14px;
    }

    .button {
      width: 100%;
    }

    .confirmation {
      margin: 48px 20px;
    }
  } 