:root {
  --bs-primary: #1c698d;
}

* {
  position: relative;
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Helvetica Neue", "Helvetica Neue LT", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #222222;
  text-align: left;
}

.purple-bg {
  background-color: #482458;
}

.blue-bg {
  background-color: #12698f !important;
}

.text-primary {
  color: var(--bs-primary) !important;
}

.btn {
  font-weight: 700;
  line-height: 1.5;
  border-radius: 0;
  padding: 9px 10px;
}

.btn:hover {
  color: #fff;
  background-color: #004d6b;
  border-color: #00445e;
}

.btn-primary {
  color: #fff;
  background-color: var(--bs-primary);
  border-color: #222222;
}

.btn.btn-icon {
  font-size: 1.6rem;
  padding: 0;
  line-height: 1;
  vertical-align: middle;
  color: var(--bs-primary);
  background: none !important;
  border: none !important;
}

.form-control, .form-select, .select-selected {
  padding: 9px 10px;
  border: 1px solid #006991;
  border-radius: 0;
  line-height: 1.5;
}

.form-label, .form-check-label {
  font-weight: 500;
  color: #006991;
  display: inline-block;
}

select option {
  font-family: 'Arial', sans-serif;
  line-height: 1;
  padding-top: 10px;
  margin-top: 10px;
  position: relative;
  box-sizing: border-box;
  font-size: 17px;
  font-weight: 500;
  text-indent: 5px;
  -moz-appearance: none;
  -webkit-appearance: none;
}

/*CUSTOM SELECT*/
.custom-select {
  position: relative;
  cursor: pointer;
}

.custom-select select {
  /* display: none; */
  /*hide original SELECT element: */
}

.disabled .select-selected,
.custom-select[disabled=true] .select-selected,
.custom-select[disabled=true] .select-items {
  background-color: #e9ecef;
  pointer-events: none;
}

.select-selected:after {
  position: absolute;
  content: "";
  top: 50%;
  margin-top: -3px;
  right: 13px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: #006991 transparent transparent transparent;
}

.select-selected.select-arrow-active:after {
  transform: rotate(180deg);
  margin-top: -9px;
}

.select-items {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  background-color: #fff;
  box-shadow: 0px 8px 14px -4px rgb(0 0 0 / 50%);
  border: 1px solid #006991;
  border-top-width: 0;
  margin-top: -1px;
  max-height: 300px;
  overflow: auto;
}

.select-items > div {
  display: block;
  width: 100%;
  padding: 4px 10px;
  border-top: 1px solid #006991;
}

/* Hide the items when the select box is closed: */
.select-hide {
  display: none;
}

.select-items div:hover, .same-as-selected {
  background-color: rgba(0, 0, 0, 0.1);
}

/*CUSTOM SELECT*/
.cursor-pointer {
  cursor: pointer;
}

.form-check.form-switch * {
  cursor: pointer;
}

#logo {
  width: 100px;
  margin: 0 auto;
}

#logo img {
  width: 100%;
}

.site-footer {
  padding: 40px 0;
  background-color: #003549;
  background-image: linear-gradient(to bottom, #006991, #003549);
  color: #fff;
  /* overflow: hidden; */
}

.site-footer__footer-text {
  margin-top: auto;
  font-size: 0.75rem;
  line-height: 1.66667;
}

#form-loading {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, .75);
font-size: 50px;}

@media screen and (max-width: 992px) {
  body {
    padding-top: 62px;
  }

  h1 {
    font-size: 2rem !important;
  }

  #navbar-top {
    position: fixed;
    width: 100%;
    left: 0;
    top: 0;
    z-index: 999;
    background-color: #fff;
    box-shadow: 0 5px 12px 4px rgb(0 0 0 / 20%);
  }
}

/* Fix form inputs disappearing below 992px - Override umbraco-main.css */
@media (max-width: 991.98px) {
  /* Fix .filters-col being hidden on listing pages - make it visible for CCT form */
  .filters-col,
  .filters-col .filters {
    position: static !important;
    z-index: auto !important;
    flex: 1 !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    border: none !important;
    background-color: transparent !important;
    visibility: visible !important;
    overflow: visible !important;
    opacity: 1 !important;
    transform: none !important;
  }

  /* Force form elements to be visible */
  form .input-container,
  form .input-wrap,
  form .form-control,
  form input:not([type="hidden"]),
  form select,
  form textarea,
  form label,
  form fieldset,
  #baseCalcForm,
  #baseCalcForm .input-container,
  #baseCalcForm .input-wrap,
  #baseCalcForm input:not([type="hidden"]),
  #baseCalcForm select,
  #baseCalcForm textarea {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  /* Keep input-wrap as flex for proper layout */
  form .input-wrap,
  #baseCalcForm .input-wrap,
  .input-wrap {
    display: flex !important;
  }

  /* Ensure proper width */
  form .input-container,
  #baseCalcForm .input-container,
  .input-container {
    width: 100%;
  }
}

/* Mobile Usability Improvements */
@media (max-width: 768px) {
  /* Fix inputs disappearing on mobile - override position relative */
  .input-container,
  .input-wrap,
  .form-control,
  input,
  select,
  textarea {
    position: static !important;
  }

  /* Ensure inputs are visible and in the flow */
  .input-container {
    display: block !important;
    width: 100%;
  }

  .input-wrap {
    display: flex !important;
    width: 100%;
  }

  /* Larger touch targets for mobile */
  .btn {
    padding: 12px 16px;
    min-height: 44px;
    font-size: 1rem;
  }

  .btn-sm {
    padding: 10px 14px;
    min-height: 40px;
    font-size: 0.9rem;
  }

  /* Prevent iOS zoom on focus */
  .form-control,
  .form-select,
  input[type="text"],
  input[type="number"],
  input[type="email"],
  textarea,
  select {
    font-size: 16px !important;
    min-height: 44px;
    padding: 12px;
  }

  /* Select2 mobile optimization */
  .select2-container--bootstrap-5 .select2-selection {
    min-height: 44px !important;
    font-size: 16px !important;
  }

  .select2-container--bootstrap-5 .select2-selection__rendered {
    padding: 12px !important;
  }

  /* Responsive tables */
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  table.table {
    font-size: 14px;
  }

  table.table th,
  table.table td {
    padding: 8px 4px;
    white-space: nowrap;
  }

  /* Modal optimization */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-body {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
  }

  /* Repeater button spacing */
  .btn-edit-repeater,
  .btn-remove-repeater {
    min-width: 44px !important;
    min-height: 44px !important;
  }

  /* Form spacing */
  .input-container {
    margin-bottom: 1rem;
  }

  /* Improve label readability */
  label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
  }
}

/* Input alignment within rows */
.row .input-container {
  display: flex;
  flex-direction: column;
}

.row .input-container label {
  display: block;
  min-height: 2.4em; /* Ensure consistent label height for alignment */
  margin-bottom: 0.5rem;
}

.row .input-wrap {
  flex: 1;
  display: flex !important;
  align-items: center;
}

/* Hide file upload inputs (custom styled with buttons) */
#file-upload-progress,
input[type="file"]#file-upload-progress {
  display: none !important;
  visibility: hidden !important;
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Loading state styles */
body.loading {
  cursor: wait;
  pointer-events: none;
}

body.loading::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.loading::before {
  content: 'Loading...';
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10000;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--bs-primary);
}

@font-face {
  font-family: "Helvetica Neue LT";
  src: url("/fonts/HelveticaNeueLTProRoman/font.woff2") format("woff2"), url("/fonts/HelveticaNeueLTProRoman/font.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  descent-override: 0%;
}

@font-face {
  font-family: "Helvetica Neue LT";
  src: url("/fonts/HelveticaNeueLTProLt/font.woff2") format("woff2"), url("/fonts/HelveticaNeueLTProLt/font.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  descent-override: 0%;
}

@font-face {
  font-family: "Helvetica Neue LT";
  src: url("/fonts/HelveticaNeueLTProMd/font.woff2") format("woff2"), url("/fonts/HelveticaNeueLTProMd/font.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  descent-override: 0%;
}

@font-face {
  font-family: "Helvetica Neue LT";
  src: url("/fonts/HelveticaNeueLTProBd/font.woff2") format("woff2"), url("/fonts/HelveticaNeueLTProBd/font.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  descent-override: 0%;
}
