select.selectric-disabled {
  min-width: auto;
  padding: 5px 70px 5px 5px;
  margin-top: 1rem;
  font-size: 15px;
  border: 1px solid #666;
  height: 2rem;
  cursor: pointer;
  width: 100%;
}

select,
.selectric-disabled {
  opacity: 1;
  color: initial;
}

div.autoComplete_wrapper {
  width: 100%;
}

#calculator-section {
  position: relative;
  z-index: 1;
  padding: 2rem;
  background: #f0f0f0;
  min-width: 320px;
  /*min-height: 750px; removed per request */ 
}

#calculation-results {
  /*font-weight: bold;*/
  min-height: 1rem;
  display: inline;
}

input#autoComplete {
  text-indent: 10px;
  margin: 0;
  padding: 0;
  border-radius: 0;
}

#section-credit-points,
#section-unit-selection {
  display: none;
}

#calculator-section select {
  /* styling */
  /* background-color: white;
  border: thin solid blue;
  border-radius: 4px;
  display: inline-block;
  font: inherit;
  line-height: 1.5em;
  padding: 0.5em 3.5em 0.5em 1em; */

  /* reset */
  transition: none;
  margin: 0;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  text-indent: 0.5rem;
}

#calculator-section select {
  background-image: linear-gradient(45deg, transparent 50%, white 50%), linear-gradient(135deg, white 50%, transparent 50%),
    linear-gradient(to right, #006dae, #006dae);
  background-position: calc(100% - 18px) calc(1em - 2px), calc(100% - 13px) calc(1em - 2px), 100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
  background-repeat: no-repeat;
  background-color: white;
}

#calculator-section select:focus {
  background-image: linear-gradient(45deg, white 50%, transparent 50%), linear-gradient(135deg, transparent 50%, white 50%),
    linear-gradient(to right, gray, gray);
  background-position: calc(100% - 13px) calc(1em - 2px), calc(100% - 18px) calc(1em - 2px), 100% 0;
  background-size: 5px 5px, 5px 5px, 2.5em 2.5em;
  background-repeat: no-repeat;
  border-color: grey;
  outline: 0;
}

#calculator-section div.loader-overlay {
  position: absolute; /* Sit on top of the page content */
  display: none; /* Hidden by default */
  width: 100%; /* Full width (cover the whole page) */
  height: 100%; /* Full height (cover the whole page) */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgb(255 255 255 / 85%);
  z-index: 10;
  cursor: pointer;

  /* display: flex; */
  justify-content: center;
  align-content: space-around;
  flex-wrap: wrap;
  z-index: 10;
}

#calculator-section div.loader-overlay p {
  position: relative;
  z-index: 20;
  background: #006dae;
  width: 100%;
  text-align: center;
  padding: 1rem;
  color: white;
}

#handbook-link {
  width: 100%;
  margin-bottom: 0;
}

#unit-selection-table button.btn-x {
  padding: 0.2rem 0.5rem !important;
  white-space: nowrap !important;
  font-size: small !important;
  float: right !important;
}

.ppw-modal {
  padding: 50px 5vw;
  max-width: 750px;
  text-align: left;
}

#calculator-section {
  h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
  }
}

#loading-message {
  text-align: center;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Dialog styling */
dialog {
  padding: 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  max-width: 600px;
  width: 90%;
  pointer-events: auto; /* Ensure dialog receives click events */
}

/* Darker backdrop styling */
dialog::backdrop {
  background-color: rgba(0, 0, 0, 0.6); /* Adjust opacity as needed */
  pointer-events: auto; /* Ensure clicks are captured */
}

/* Dialog header with X button */
.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #eee;
}

/* X button styling */
.close-button {
  background: transparent;
  border: none;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
  position: absolute;
  top: 0;
  right: 0;
  font-size: 30px;
  background: transparent;
  border: none;
  margin: 0.2rem;
}

/* Clear, obvious hover state */
/* Accessible focus state */
.close-button:hover,
.close-button:focus {
  font-weight: bold;
  outline: 2px solid #006dae; /* Blue outline */
  border-radius: 4px; /* Match the button's border-radius */
}



/* UNIT SELECT RESULTS */

#unit-selection-table  tbody td:nth-child(1) {
  white-space:nowrap
}
#unit-selection-table  tbody td:nth-child(2) {
  width:100%
}
#unit-selection-table tbody td:nth-child(2) span {
  display: none;
}

@media only screen and (max-width: 600px) {

  #unit-selection-table td,
  #unit-selection-table button
  {
    padding: .425rem;
    font-size: .9rem;
  }

  #unit-selection-table button {
    font-size: .8rem !important;
  }

  #unit-selection-table tbody  td:nth-child(1) {
    visibility: hidden;
    padding: 0;
    width: 0px !important;
    display: block;
  }

  #unit-selection-table tbody td:nth-child(2) {
    width: 100%;
  }
  #unit-selection-table tbody td:nth-child(2) span {
    display: block;
  }

  #unit-selection-table tbody td:nth-child(3) {
    padding: 0;
    visibility: hidden; 
    width: 0px !important;
    display: block;
  }

  #unit-selection-table tbody td:nth-child(4) {
    text-align: right;
  }



}

