.popupContainer {
  display: none;
  position: fixed;
  z-index: 999999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.popupBox {
  width: 80%;
  height: 90%;
  padding: 20px;
  display: flex;
  border: 1px solid #888;
  border-radius: 0.25rem;
  flex-direction: column;
  background-color: #fefefe;
  overflow-y: auto;
}

.popupHeader {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

.popupContent {
  width: 100%;
  flex: 1;
  display: flex;
  gap: 8px;
  overflow-y: auto;
}

.generationForm { 
  max-width: 500px;
  min-width: 350px;
  max-height: 500px;
  flex: 1;
}

.divider {
  width: 1px;
  align-self: stretch;
  background-color: #dbdbdb;
}

.generationResult {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow-y: auto;
}

@media screen and (max-width: 700px) {
  .popupContent {
    flex-direction: column;
  }

  .divider {
    width: 100%;
    height: 1px;
    align-self: auto;
  }

  .resultContent {
    max-height: 500px;
  }
}

.resultPlaceholder {
  color: #b1b1b1;
}

.resultContainer {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.resultHeader {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 32px
}

.resultContent {
  width: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
}

.resultGrid {
  flex: 1;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  grid-auto-rows: max-content;
  gap: 8px;
}

.resultGrid > * {
  max-width: 300px;
  min-width: 200px;
  flex: 1;
  border-radius: 4px;
}

.resultGrid img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.indeterminateContent {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background-color: #e7e7e7;
  padding: 12px;
}

.indeterminateContent h4 {
  overflow-wrap: break-word;
}

.spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid #e42314;
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
  -webkit-animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { -webkit-transform: rotate(360deg); }
}
@-webkit-keyframes spin {
  to { -webkit-transform: rotate(360deg); }
}

.subtitle {
  color: #414042;
}

.popupHeader h3 {
  font-style: normal;
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 2.8125rem;
  letter-spacing: -0.015em;
  color: #414042;
}

.popup-open {
  overflow: hidden;
}

.closeBtn {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.closeBtn:hover,
.closeBtn:focus {
  color: black;
  text-decoration: none;
  cursor: pointer;
}

.resize-input {
  flex-direction: unset !important;
}

#resizeForm {
  display: flex;
  margin: 1rem 0rem;
}

#width {
  margin-right: 1rem;
}

 #upload-single-btn {
  margin: 1rem;
}

.download-btn {
  width: fit-content;
  margin-top: 1.2rem;
  margin: 0 auto;
}

#mergedImage {
  max-width: 100%;
}

.badgeLabel {
  width: 50%;
  border: 1px solid #eee;
  padding: 1rem;
  background-color: #F5F5F5;
  border-radius: 0.3125rem;
}

.resizeThumbnailBtn:hover {
  cursor: pointer;
}

.resize-form-row {
  position: relative;
  width: 100%;
}

.resize-input {
  background-color: #F5F5F5;
  border-radius: 0.3125rem;
  border: 1px solid #eee;
  padding: 1rem;
}

.resize-input input {
  width: 100%;
}

#widthError, #heightError {
  color: #e42314;
  display: none;
  border-left: 3px solid #e42314;
  padding: 3px;
  margin-top: 10px;
  position: relative;
  font-size: 15px;
}

#upload-btn:disabled, #upload-single-btn:disabled, .download-btn:disabled {
  color: white;
  border: 0.125rem solid #e42314;
  background: #e42314 !important;
  opacity: 0.6;
  cursor: not-allowed 
}

#upload-btn, #upload-single-btn {
  transition: none!important;
}

#options-container > h4, .formatContainerSingleGame > h4 {
  padding: 1rem;
}

.formatContainerSingleGame .singleFile {
  margin-top: 1rem;
}

.formatContainerSingleGame > h4, .formatContainerSingleGame > .options  {
  text-align: center;
}

.options span {
  padding: 0.3rem;
}

.options span label {
  padding: 5px
}

.options {
  padding-bottom: 1rem;
}

#requiredMessage {
  background-color: #f5c6cb;
  color: #721c24;
  padding: 1rem;
  font-size: 15px;
}

#dimensionMessage {
  background-color: #fff3cd;
  color: #856404;
  font-size: 14px;
  border-radius: 0.335em;
  margin-top: 1rem;
  padding: 1rem;
}

/* Style the tooltip container */
.tooltip {
position: relative;
display: inline-block;
}

/* Tooltip text */
.tooltip .tooltip-text {
visibility: hidden;
width: 200px;
background-color: #555;
color: #fff;
text-align: center;
border-radius: 6px;
padding: 5px;
font-size: 14px;
/* Positioning */
position: absolute;
z-index: 1;
bottom: 100%; /* Position it above the button */
left: 50%;
margin-left: -100px; /* Center the tooltip */

/* Fade in effect */
opacity: 0;
transition: opacity 0.3s;
}

/* Tooltip arrow */
.tooltip .tooltip-text::after {
content: "";
position: absolute;
top: 100%; /* Arrow at the bottom of the tooltip */
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: #555 transparent transparent transparent;
}

/* Show the tooltip text when hovering over the tooltip container */
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}

/* Style for the disabled button */
button:disabled {
cursor: not-allowed;
background-color: #ccc; /* Change the button style when disabled */
}

/* Hide the tooltip when the button is enabled */
button:not(:disabled) + .tooltip-text {
display: none;
}

#popupInfo {
font-size: 15px;
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
border-radius: 0.325em;
padding: 0.5rem;
margin-bottom: 1rem;
transition: opacity 1s ease-in-out;
}

#popupInfo.fade-out {
opacity: 0;
}

#generatePopupInfo {
  font-size: 18px;
  color: #856404;
  background-color: #fff3cd;
  border-color: #fff3cd;
  CONTAIN-INTRINSIC-BLOCK-SIZE: AUTO 100PX;
  padding: 1.5rem;
  margin: 1rem 0rem;
  transition: opacity 1s ease-in-out;
  line-height: 27px;
  border-radius: 0.3125rem;
}

#generatePopupInfo.fade-in {
  opacity: 1;
}

#generatePopupInfo.hide {
  opacity: 0; 
}

.infoMessage {
background-color: #d6d8d9;
border-color: #c6c8ca;
color: #000000;
font-size: 15px;
padding: 1rem;
border-radius: 0.3125rem;
}

.hidden-canvas {
  display: none;
}

.formatContainerSingleGame {
  justify-items: center;
}