.sub-heading {
  color: #F62440;

  text-align: center;

  font-size: 30px;

  padding: 12px;
}

.sub-heading p {
  color: #FF0052;

  font-size: 30px;
}

#main {
  padding: 30px;

  margin-bottom: 30px;

  box-sizing: border-box;
}

.main-container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;

  gap: 10px;

  width: 100%;

  max-width: 1200px;

  margin: 0 auto;

  box-sizing: border-box;
}

.file-container {
  height: 60vh;

  min-width: 0;

  box-sizing: border-box;

  background-color: white;

  border: 2px dotted red;

  display: flex;

  flex-direction: column;

  justify-content: center;

  align-items: center;

  gap: 25px;

  padding: 20px;

  overflow: hidden;
}

.drop-message {
  color: #F62440;

  font-size: 16px;

  text-align: center;
}

.drop-message h2 {
  margin: 0;
}

.button-container {
  display: flex;

  justify-content: center;

  align-items: center;

  gap: 80px;

  margin-bottom: 5px;

  flex-wrap: wrap;
}

.hidden-input {
  display: none;
}

.upload-btn {
  background-color: #499A13;

  color: white;

  font-family: Arial, Helvetica, sans-serif;

  font-size: 15px;

  font-weight: bold;

  border: none;

  border-radius: 5px;

  padding: 20px 30px;

  cursor: pointer;

  display: inline-flex;

  justify-content: center;

  align-items: center;

  gap: 5px;

  box-sizing: border-box;

  transition: opacity 0.20s;
}

.upload-btn img {
  width: 30px;

  height: 30px;

  object-fit: contain;
}

.upload-btn:hover{
  opacity: 0.8;
}

.upload-btn:active {
  opacity: 0.5;
}

.convert-btn {
  background-color: #F62440;

  color: white;

  font-family: Arial, Helvetica, sans-serif;

  font-size: 15px;

  font-weight: bold;

  border: none;

  border-radius: 5px;

  padding: 20px 30px;

  cursor: pointer;

  display: inline-flex;

  justify-content: center;

  align-items: center;

  gap: 5px;

  box-sizing: border-box;

  transition: opacity 0.20s;
}

.convert-btn img {
  width: 30px;

  height: 30px;

  object-fit: contain;
}

.convert-btn:hover{
  opacity: 0.8;
}

.convert-btn:active {
  opacity: 0.5;
}

.preview-section {
  background-color: white;

  border: 2px solid black;

  height: 60vh;

  min-width: 0;

  display: flex;

  flex-direction: column;

  overflow: hidden;

  box-sizing: border-box;
}

.preview-section h2 {
  color: white;

  background-color: black;

  text-align: center;

  margin: 0;

  padding: 15px 10px;

  font-family: Arial, Helvetica, sans-serif;

  flex-shrink: 0;
}

#preview-container {
  padding: 10px;

  overflow-y: auto;

  overflow-x: hidden;

  flex: 1;

  min-height: 0;

  box-sizing: border-box;

  -webkit-overflow-scrolling: touch;
}

#preview-container img,
.preview-image {
  display: block;

  width: 100%;

  height: auto;

  margin-bottom: 10px;

  max-width: 100%;
}

footer {
  background-color: black;

  padding: 10px;
}

.footer-text {
  text-align: center;

  font-size: 15px;

  margin-bottom: 10px;
}

.terms-container {
  font-size: 15px;

  display: flex;

  flex-direction: row;

  justify-content: center;

  align-items: center;

  gap: 5px;

  flex-wrap: wrap;
}

.terms-container a {
  color: white;

  text-decoration: none;

  transition: color 0.20s;
}

.terms-container a:hover {
  color: grey;
}

.pdf-options {
  display: none;

  width: 100%;
  height: 100%;

  box-sizing: border-box;

  justify-content: center;
  align-items: center;

  padding: 20px;

  overflow-y: auto;
  overflow-x: hidden;
}

.custom-size-box {
  width: min(760px, 100%);

  box-sizing: border-box;

  background-color: #f5f5f5;

  border: 1px solid #ddd;

  border-radius: 8px;

  padding: 20px;

  margin: auto;

  font-family: Arial, Helvetica, sans-serif;
}

.custom-size-box h2 {
  margin: 0 0 20px;

  text-align: center;

  color: #F62440;

  font-size: 24px;
}

.custom-size-box > .option-row:nth-of-type(1) {
  width: 100%;

  display: grid;

  grid-template-columns:
    max-content minmax(0, 1fr);

  align-items: center;

  column-gap: 12px;

  margin-bottom: 15px;
}

.custom-size-box > .option-row:nth-of-type(2) {

  width: 100%;

  display: grid;

  grid-template-columns:
    max-content minmax(0, 1fr)
    max-content minmax(0, 1fr);

  column-gap: 10px;

  row-gap: 12px;

  align-items: center;

  margin-bottom: 20px;
}

.custom-size-box .option-row label {

  font-family: Arial, Helvetica, sans-serif;

  font-weight: bold;

  color: #222;

  white-space: nowrap;
}

.custom-size-box .option-row select {

  width: 100%;

  min-width: 0;

  box-sizing: border-box;

  padding: 9px;

  border: 1px solid #bbb;

  border-radius: 5px;

  background-color: white;

  font-size: 14px;

  cursor: pointer;
}

.custom-size-options {

  display: none;

  width: 100%;

  grid-template-columns:
    repeat(3, minmax(0, 1fr));

  gap: 10px;

  margin-bottom: 20px;
}

.size-input {

  display: flex;

  flex-direction: column;

  gap: 5px;

  min-width: 0;
}


.size-input label {

  font-size: 13px;

  font-weight: bold;

  color: black;
}


.size-input input,
.size-input select {

  width: 100%;

  box-sizing: border-box;

  padding: 9px;

  border: 1px solid #bbb;

  border-radius: 5px;

  background-color: white;

  font-size: 14px;
}

.options-buttons {

  display: flex;

  justify-content: center;

  align-items: center;

  gap: 15px;

  margin-top: 5px;

  flex-wrap: wrap;
}

.apply-btn,
.add-btn,
.options-create-btn {

  border: none;

  border-radius: 5px;

  padding: 11px 20px;

  color: white;

  font-family: Arial, Helvetica, sans-serif;

  font-weight: bold;

  cursor: pointer;

  white-space: nowrap;

  transition: opacity 0.20s;
}


.apply-btn {
  background-color: #0089d8;
}


.add-btn {
  background-color: #499A13;
}


.options-create-btn {
  background-color: #F62440;
}

.apply-btn:hover,
.add-btn:hover,
.options-create-btn:hover {
  opacity: 0.8;
}

.apply-btn:active,
.add-btn:active,
.options-create-btn:active {

  opacity: 0.5;
}


.file-container.settings-active {

  justify-content: center;

  align-items: center;

  overflow: hidden;
}


.file-container.settings-active .pdf-options {

  min-width: 0;

  max-width: 100%;
}



@media (max-width: 900px) {

  .custom-size-box {

    width: 95%;

    padding: 18px;
  }


  .custom-size-box > .option-row:nth-of-type(2) {

    column-gap: 8px;

    row-gap: 12px;
  }


  .custom-size-box .option-row select {

    font-size: 13px;

    padding: 8px;
  }
}

@media (max-width: 800px) {

  #main {
    width: 100%;
    padding: 10px 0;
    margin: 0;
    box-sizing: border-box;
  }

  .main-container {

    width: 92%;
    max-width: 500px;

    margin: 0 auto;

    display: flex !important;
    flex-direction: column !important;

    gap: 10px;

    height: auto;
    min-height: 0;

    box-sizing: border-box;

    overflow: visible;
  }

  .file-container {

    width: 100%;
    max-width: 100%;

    height: auto;

    min-height: 190px;

    box-sizing: border-box;

    padding: 20px 12px;

    background-color: white;

    border: 2px dotted red;

    display: flex;

    flex-direction: column;

    justify-content: center;

    align-items: center;

    gap: 20px;

    flex-shrink: 0;

    overflow: hidden;
  }

  .drop-message {

    width: 100%;

    color: #F62440;

    font-size: 16px;

    text-align: center;

    box-sizing: border-box;
  }


  .drop-message h2 {

    margin: 0;

    font-size: 20px;

    line-height: 1.25;
  }


  .button-container {

    width: 100%;

    display: flex;

    flex-direction: row;

    justify-content: center;

    align-items: center;

    gap: 10px;

    margin: 0;

    flex-wrap: nowrap;

    box-sizing: border-box;
  }


  .upload-btn,
  .convert-btn {

    flex: 0 1 auto;

    padding: 10px 14px;

    font-size: 14px;

    white-space: nowrap;

    box-sizing: border-box;
  }


  .upload-btn img,
  .convert-btn img {

    width: 24px;

    height: 24px;
  }


  .preview-section {

    width: 100%;
    max-width: 100%;

    height: 300px;

    min-height: 300px;

    box-sizing: border-box;

    background-color: white;

    border: 2px solid black;

    display: flex;

    flex-direction: column;

    flex-shrink: 0;

    overflow: hidden;
  }


  .preview-section h2 {

    width: 100%;

    margin: 0;

    padding: 9px 8px;

    box-sizing: border-box;

    background-color: black;

    color: white;

    text-align: center;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 16px;

    flex-shrink: 0;
  }


  #preview-container {

    width: 100%;

    flex: 1;

    min-height: 0;

    padding: 8px;

    box-sizing: border-box;

    overflow-y: auto;

    overflow-x: hidden;

    -webkit-overflow-scrolling: touch;
  }


  #preview-container img,
  .preview-image {

    display: block;

    width: 100%;

    max-width: 100%;

    height: auto;

    margin-bottom: 8px;
  }


  .pdf-options {
    display: none;

    width: 100%;
    height: auto;
    min-height: 0;

    padding: 10px;

    box-sizing: border-box;

    justify-content: center;
    align-items: center;

    overflow: visible;
  }


  .custom-size-box {

    width: 100%;

    max-width: 100%;

    box-sizing: border-box;

    padding: 15px;

    margin: 0;

    background-color: #f5f5f5;

    border: 1px solid #ddd;

    border-radius: 8px;
  }

  .custom-size-box h2 {

    margin: 0 0 18px;

    text-align: center;

    color: #F62440;

    font-size: 20px;
  }

  .custom-size-box > .option-row:nth-of-type(1) {

    width: 100%;

    display: grid;

    grid-template-columns: 1fr;

    gap: 5px;

    margin-bottom: 15px;
  }

  .custom-size-box > .option-row:nth-of-type(2) {

    width: 100%;

    display: grid;

    grid-template-columns: 1fr 1fr;

    column-gap: 10px;

    row-gap: 10px;

    align-items: center;

    margin-bottom: 18px;
  }


  .custom-size-box > .option-row:nth-of-type(2) label {

    font-size: 13px;

    font-weight: bold;

    color: #222;

    white-space: nowrap;
  }


  .custom-size-box > .option-row:nth-of-type(2) select {

    width: 100%;

    min-width: 0;

    padding: 8px;

    box-sizing: border-box;

    font-size: 13px;
  }

  .custom-size-box > .option-row:nth-of-type(2)
  label:nth-child(1) {

    grid-column: 1;

    grid-row: 1;
  }


  .custom-size-box > .option-row:nth-of-type(2)
  select:nth-child(2) {

    grid-column: 2;

    grid-row: 1;
  }

  .custom-size-box > .option-row:nth-of-type(2)
  label:nth-child(3) {

    grid-column: 1;

    grid-row: 2;
  }


  .custom-size-box > .option-row:nth-of-type(2)
  select:nth-child(4) {

    grid-column: 2;

    grid-row: 2;
  }

  .custom-size-box > .option-row:nth-of-type(2)
  label:nth-child(5) {

    grid-column: 1;

    grid-row: 3;
  }


  .custom-size-box > .option-row:nth-of-type(2)
  select:nth-child(6) {

    grid-column: 2;

    grid-row: 3;
  }

  .custom-size-box > .option-row:nth-of-type(2)
  label:nth-child(7) {

    grid-column: 1;

    grid-row: 4;
  }


  .custom-size-box > .option-row:nth-of-type(2)
  select:nth-child(8) {

    grid-column: 2;

    grid-row: 4;
  }

  .custom-size-options {

    width: 100%;

    grid-template-columns: 1fr;

    gap: 10px;

    margin-bottom: 15px;
  }

  .options-buttons {

    width: 100%;

    display: flex;

    flex-direction: row;

    justify-content: center;

    align-items: center;

    gap: 8px;

    flex-wrap: nowrap;

    margin-top: 5px;
  }


  .apply-btn,
  .add-btn,
  .options-create-btn {

    padding: 10px 13px;

    font-size: 13px;

    white-space: nowrap;
  }

  .footer-text {

    font-size: 12px;
  }


  .terms-container {

    flex-wrap: wrap;

    gap: 5px;
  }


  .terms-container a {

    font-size: 12px;
  }

  .sub-heading {

    color: #F62440;

    text-align: center;

    font-size: 16px;

    font-weight: bold;

    padding: 12px;
  }


  .sub-heading p {

    color: #FF0052;

    font-size: 12px;
  }
}

@media (max-width: 380px) {

  .main-container {

    width: 94%;

    max-width: 360px;
  }


  .file-container {

    min-height: 180px;

    padding: 15px 8px;
  }


  .drop-message h2 {

    font-size: 18px;
  }


  .button-container {

    gap: 7px;
  }


  .upload-btn,
  .convert-btn {

    padding: 9px 10px;

    font-size: 13px;
  }


  .upload-btn img,
  .convert-btn img {

    width: 21px;

    height: 21px;
  }


  .preview-section {

    height: 280px;

    min-height: 280px;
  }


  .custom-size-box {

    padding: 12px;
  }


  .custom-size-box h2 {

    font-size: 18px;
  }


  .options-buttons {

    gap: 5px;
  }


  .apply-btn,
  .add-btn,
  .options-create-btn {

    padding: 9px 9px;

    font-size: 12px;
  }
}