.modalOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 100;
  
  /* Adds the 100px gap at the top and allows scrolling if the modal is tall */
  padding-top: 100px; 
  padding-bottom: 40px; /* Prevents the box from hitting the absolute bottom */
  box-sizing: border-box;
  overflow-y: auto; 
}

.modalBox {
  background-color: rgb(255, 255, 255);
  border: 1.6px solid black;
  max-width: 560px;
  width: 86%;
  /* Removed margin-top: 100px; handled by overlay padding now */
  animation: slideDown 0.3s ease-out;
  
  /* Ensures the box doesn't break out of the flex container */
  flex-shrink: 0; 
}
 
.modalOverlay.hidden {
    display: none;
}
 
@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}
 
.modalHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 16px;
    border-bottom: 1.6px solid black;
    font-size: 1.4em;
}
 
.modalHeader .text {
    font-size: 1.12em;
    color: black;
    text-shadow: none;
}
 
.modalClose {
    background: none;
    border: none;
    font-size: 1.44em;
    cursor: pointer;
    line-height: 1;
    font-family: FingerPaint, Verdana;
}
 
.modalBody {
    padding: 10px;
    background-color: rgb(235, 232, 232);
}

.modalBody > *:last-child {
  margin-bottom: 0;
}
 
.modalBody .text {
    color: black;
    text-shadow: none;
}

.modalIntro {
    margin-bottom: 1.5rem;
}

.modalContent {
    margin-bottom: 2em;
}

.modalBody .modalBodyHeader {
    font-size: 1.3em;
    line-height: 0;
}

.modalPatchnote {
  margin: auto;
    margin-bottom: 1.2em;
    background-color: rgb(202, 194, 194);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0 10px;
}

.modalPatchnoteHeader {
    text-align: center;
    margin: 0;
    margin-top: 10px;
}

.settingRow {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.settingLabel {
    margin: 0;
}

.switch { 
  position: relative; 
  display: inline-block; 
  width: 75px; 
  height: 43px; 
  flex-shrink: 0; 
} 

.switch input { 
  opacity: 0; 
  width: 0; 
  height: 0; 
} 

.switch .slider { 
  position: absolute; 
  cursor: pointer; 
  inset: 0; 
  background-color: #a3fa7b; 
  border: 1.8px solid black; 
  border-radius: 22.5px; 
} 

.switch .slider::after { 
  content: ""; 
  position: absolute; 
  height: 40px; 
  width: 40px; 
  left: 0; 
  bottom: 0; 
  background-color: #a9ffbd; 
  border-radius: 45px; 
} 

.switch input:checked + .slider { 
  background-color: #f1706f; 
} 

.switch input:checked + .slider::after { 
  left: 33px; 
  background-color: #550000; 
}

.switch:hover .slider::after {
  background-color: #76b384; 
}

.switch:hover input:checked + .slider::after {
  background-color: #3b0000; 
}

.dataDropdownOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  
  margin: auto;
  padding-bottom: 40px; /* Prevents the box from hitting the absolute bottom */
  box-sizing: border-box;
  overflow-y: auto; 
}

.dataDropdownBox {
  background-color: rgb(255, 255, 255);
  border: 1.6px solid black;
  width: 282px;
  animation: slideDown 0.3s ease-out;

  flex-shrink: 0;
}

.dataDropdownHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 16px;
  border-bottom: 1.6px solid black;
  font-size: 1em;
}

.dataDropdownHeader .text {
  font-size: 1.12em;
  color: black;
  text-shadow: none;
}

#dataDropdownButtonContainer {
  display: flex;
  justify-content: flex-start;
  flex-direction: column;
  align-items: center;
  height: 300px;
  overflow: scroll; 
  overflow-x: hidden;
}

.buttonOption{
  font-family: FingerPaint, Verdana;
  text-align: center;
  font-size: 1.3em;
  width: 100%;
  max-width: 260px;
  height: auto;
  border: 1.6px solid black;
  background-color: rgb(226, 222, 222);
  margin-top: 4px;
  box-sizing: border-box;
}

.buttonOption:hover{
  cursor: pointer;
  background-color: rgb(203, 201, 201);
}

.buttonOption:last-child {
  margin-bottom: 4px;
}

.buttonOption:disabled {
  opacity: 0.7;
  background-color: rgb(180, 180, 180);
  cursor: default;  
}
 
#completionShareBox {
  display: flex;
  align-items: center;
  text-align: center; 
  flex-direction: column;
  background-color: rgba(255, 255, 255, 0.767);
  border: 1.2px solid black;
  max-width: 340px;
  height: auto;
  text-align: center;
  margin: auto;
  overflow: hidden;
  margin: auto;
  margin-top: 20px;
  margin-bottom: 20px;
}
 
#completionShareHeader {
  margin-bottom: 0;
  font-size: 1.44em;
  font-family: FingerPaint, Verdana;
  text-shadow: 
    -1px -1px 0 #000,  
    1px -1px 0 #000,
    -1px  1px 0 #000,
    1px  1px 0 #000;
  color: white;
  background-color: rgba(198, 198, 198, 0.418);
  border: 1.2px solid black;
  width: 100%;
  padding: 4px;
}
 
#completionShareBox p{
  margin-top: 8px;
  margin-left: 16px;
  margin-right: 16px;
  margin-bottom: 0;
}
 
#completionShareResultHeader {
  text-shadow: none;
  font-size: 1.12em;
  color: black;
}   
 
#completionShareWeblink {
  font-family: FingerPaint, Verdana;
  font-size: 0.96em;  
  color: white;
  text-shadow: 
      -1px -1px 0 #000,  
      1px -1px 0 #000,
      -1px  1px 0 #000,
      1px  1px 0 #000;
}

#completionShareResultBody {
  margin: 10px;
  display: flex;
  flex-direction: column;
}
 
.completionShareRow {
    font-size: 1.04em;
}

#completionShareRow {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;
}

.completionShareButton {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 120px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.767);
  border: 1.2px solid black;
  cursor: pointer;
  font-size: 1.12em;
  padding: 3.2px;
  box-sizing: border-box;
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s ease;
  margin-bottom: 16px;
  margin-top: 16px;
  font-family: FingerPaint, Verdana;
  color: black;
}

.completionShareButton:hover {
  background-color: rgba(216, 216, 216, 0.829);
}
 
.completionShareButton svg {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  color: black;
}

.completionShareButton img {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: black;
}


