/* CSS Variables */
html,
body {
  margin: 0px;
}
body {
  --background-primary: #fff;
  --font-color-primary: #333;
  --elevation-background: #f3f3f3;
  --link-color: #006eb8;
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --handwriting-font: 'Homemade Apple', cursive;
  --primary-color: #2563eb;
  --ink-color: #000f55;
  --label-color: #333;
  --field-borders: #e0e0e0;
  --primary-button-bg: #2563eb;
  --primary-button-color: #fff;
  --font-color-delete: #dc2626;
  --delete-button-borders: #dc2626;

  width: 100%;
  overflow-x: hidden;
}
body.dark {
  --background-primary: #111827;
  --font-color-primary: #e5e7eb;
  --elevation-background: #1f2937;
  --link-color: #60a5fa;
  --label-color: #9ca3af;
  --field-borders: #374151;
  --primary-button-bg: #3b82f6;
  --primary-button-color: #fff;
  --delete-button-borders: #ef4444;
  --font-color-delete: #ef4444;
}
@font-face {
  font-family: 'Hindi_Font';
  src: url(../fonts/Hindi_Type.ttf);
}

@font-face {
  font-family: 'BornomalaVintage';
  src: url(../fonts/BornomalaVintage.ttf);
}
@font-face {
  font-family: 'ShamimRobi';
  src: url(../fonts/ShamimRobi.ttf);
}
@font-face {
  font-family: 'MainakSignatureUnicode';
  src: url(../fonts/MainakSignatureUnicode.ttf);
}
@font-face {
  font-family: 'BrownBag';
  src: url(../fonts/BrownBag.ttf);
}
@font-face {
  font-family: 'JottFLF';
  src: url(../fonts/JottFLF.ttf);
}
@font-face {
  font-family: 'WriteSong';
  src: url(../fonts/WriteSong.ttf);
}
@font-face {
  font-family: 'IndieFlower';
  src: url(../fonts/IndieFlower.ttf);
}
@font-face {
  font-family: 'DSFont';
  src: url(../fonts/DSFont.ttf);
}
@font-face {
  font-family: 'geeKzoid';
  src: url(../fonts/geeKzoid.ttf);
}
@font-face {
  font-family: 'JohnCaplin';
  src: url(../fonts/JohnCaplin.ttf);
}
@font-face {
  font-family: 'KevinShirley';
  src: url(../fonts/KevinShirley.ttf);
}
@font-face {
  font-family: 'MamasAndPapas';
  src: url(../fonts/MamasAndPapas.ttf);
}
@font-face {
  font-family: 'PrintVersion';
  src: url(../fonts/PrintVersion.ttf);
}
@font-face {
  font-family: 'Rufus';
  src: url(../fonts/Rufus.ttf);
}
@font-face {
  font-family: 'TonyFlores';
  src: url(../fonts/TonyFlores.ttf);
}
@font-face {
  font-family: 'VickyCaulfield';
  src: url(../fonts/VickyCaulfield.ttf);
}
@font-face {
  font-family: 'DonaldRoss';
  src: url(../fonts/DonaldRoss.ttf);
}
@font-face {
  font-family: 'CarolineMutiboko';
  src: url(../fonts/CarolineMutiboko.ttf);
}
@font-face {
  font-family: 'BradenHill';
  src: url(../fonts/BradenHill.ttf);
}


/* Default CSS Changes */
* {
  box-sizing: border-box;
}
body {
  background-color: var(--background-primary);
  color: var(--font-color-primary);
  padding: 40px 100px;
  font-size: 1.05rem;
  font-family: var(--font-family-primary);
}
a {
  text-decoration: none;
  color: var(--link-color);
}
section {
  padding: 20px 0px;
}
button {
  border: none;
  background-color: var(--elevation-background);
  color: var(--font-color-primary);
  border-radius: 8px;
  cursor: pointer;
  padding: 10px 20px;
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

button:hover {
  opacity: 0.9;
}

button i {
  font-size: 1rem;
}

h1 {
  font-size: 3rem;
  margin: 0 0 20px 0;
}

label {
  color: var(--label-color);
  font-size: 0.75rem;
}

label.block {
  display: block;
  padding-bottom: 5px;
}

select {
  background: url('../images/dropdown.svg') no-repeat;
  background-position: calc(100% - 14px) center;
  border: none;
  color: #333;
  border-radius: 4px;
  font-size: 0.9rem;
  display: block;
  -moz-appearance: none;
  -webkit-appearance: none;
}

option {
  color: #333;
}

body.dark select {
  background: url('../images/dropdown-white.svg') no-repeat;
  background-position: calc(100% - 14px) center;
}

input, select {
  border: 1px solid var(--field-borders);
  background-color: var(--background-primary);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: 0.875rem;
  transition: border-color 0.2s;
}

input:focus, select:focus {
  outline: none;
  border-color: var(--primary-color);
}

input[type='number']::-webkit-outer-spin-button,
input[type='number']::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type='number'] {
  -moz-appearance: textfield !important;
  -webkit-appearance: none;
  width: 100%;
}

/* global classes */
ul.info-ul {
  padding-left: 20px;
}

ul.info-ul > li {
  padding: 5px 5px;
}

.shadow {
  box-shadow: 12px 12px 24px 0 rgba(0, 0, 0, 0.2);
}
.display-flex {
  display: flex;
}
.display-flex.padded-flex > div {
  padding: 0px 10px;
}
.display-flex.padded-flex > div:first-child {
  padding-left: unset;
}
.flex-1 {
  flex: 1;
}
.padding-around {
  padding-right: 30px;
  padding-left: 30px;
}
.padding-up-down {
  padding-top: 6px;
  padding-bottom: 7px;
}

/* Other Styles */
.generate-image-section {
  padding: 10px 10px;
  font-size: 1.2rem;
  margin-top: -20px;
}
.generate-image-button {
  background-color: var(--primary-button-bg);
  color: var(--primary-button-color);
  padding: 12px 24px;
  font-size: 1rem;
}
.github-corner {
  position: absolute;
  top: 0;
  z-index: 99999;
  right: 0px;
}
body.dark .github-corner {
  filter: invert(100%);
}
.imp-button {
  color: var(--font-color-primary);
  border: 1px solid var(--font-color-primary);
}
.delete-button {
  color: var(--font-color-delete);
  border: 1px solid var(--delete-button-borders);
  background-color: transparent;
}
.customization-col {
  padding: 0px 50px !important;
}

.left-margin-and-content {
  min-height: calc(100% - 50px);
}

.sponsor-name-section {
  padding: 50px 0px;
}
.sponsor-container {
  display: inline-block;
  color: var(--font-color-primary);
}
.sponsor-title {
  display: block;
  text-align: center;
  font-size: 1.6rem;
  font-weight: bold;
}

.page-a {
  width: 400px;
  height: calc(11.7 * 400px / 8.3); /* A4 Ratio */
  background: #fff;
  border: 1px solid var(--elevation-background);
  font-size: 10pt;
  position: relative;
  top: 0px;
  font-family: var(--handwriting-font);
  color: var(--ink-color);
  line-height: 1.5em;
  overflow-y: auto;
  scrollbar-color: transparent;
  scrollbar-width: thin;
}
.paper-content {
  margin: 10px;
  width: 100%;
}
.page-a.lines .paper-content {
  background-image: linear-gradient(#999 0.05em, transparent 0.1em);
  background-color: unset !important;
  background-size: 100% 1.5em;
}

.margined .paper-content {
  padding: 5px;
  margin: 0px;
  padding-left: 55px;
}

.left-margin,
.top-margin {
  display: none;
}

.margined .top-margin {
  height: 50px;
  border-bottom: 2px solid pink;
  width: 100%;
  display: block;
  overflow-y: auto;
}

.margined .left-margin {
  width: 50px;
  height: calc(100%);
  display: inline-block;
  border-right: 2px solid pink;
  top: 0px;
  padding-top: 50px;
  overflow-x: hidden;
  position: absolute;
  left: 0;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  display: none;
}

.overlay.shadows {
  display: block;
  /* background-image: linear-gradient(10deg, #000a, #0001); */
}

/* OUTPUT */
.output {
  width: 100%;
  padding: 30px;
  white-space: nowrap;
  overflow-x: auto;
  border: 1px solid var(--elevation-background);
}
.output .close-button {
  position: absolute;
  right: -3px;
  top: -11px;
  border-radius: 100%;
  padding: 4px 10px;
  background-color: #333;
  color: #fff;
  font-size: 15pt;
  font-weight: bold;
}
.download-image-button {
  display: inline-block;
  text-align: center;
  margin-top: 10px;
  background-color: #1d1d1d;
  color: #ccc;
  font-weight: bold;
  font-size: 0.9rem;
  padding: 10px 15px;
  border-radius: 8px;
}
#download-as-pdf-button {
  display: none;
}
#download-as-pdf-button.show {
  display: inline-block;
}
#delete-all-button {
  display: none;
}
#delete-all-button.show {
  display: inline-block;
}
.output img {
  width: 300px;
  margin: 0px 10px;
}

#faq p {
  overflow-wrap: break-word;
  overflow: hidden;
  width: 100%;
}

#covid-donations ul li {
  padding: 5px 0px;
}

.donations-list {
  padding: 58px 0px;
  text-align: center;
}

@media (max-width: 768px) {
  body {
    padding: 40px 10px;
  }
  h1 {
    margin-top: 0;
    font-size: 3rem;
  }
  .padding-around {
    padding-left: 5px;
    padding-right: 5px;
  }
  .display-flex.responsive-flex {
    flex-direction: column;
  }
  .customization-col {
    padding: 100px 5px !important;
  }
  .page-container {
    width: 100%;
    overflow-x: scroll;
  }

  .page-container-super {
    display: flex;
    flex-direction: column;
  }

  .output img {
    width: 200px;
    margin: 0px 10px;
  }

  .project-contributors {
    width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    white-space: nowrap;
  }

  .contributor-profile {
    width: 7.5em;
    height: 150px;
  }

  .contributor-username {
    font-size: 9pt;
  }
}

fieldset {
  padding: 17px 20px;
  border-radius: 5px;
  border: 1px solid var(--field-borders);
  margin-top: 16px;
}

legend {
  font-size: 0.88rem;
  padding: 0px 6px;
  color: var(--font-color-primary);
}

select,
input {
  width: 100%;
  border: 1px solid var(--field-borders);
  padding: 10px;
  padding-right: 30px;
  color: var(--font-color-primary);
}

input[type='file'] {
  position: relative;
  width: 100%;
  height: 33px;
  padding: 0;
  background: var(--background-primary);
  border: 1px solid var(--field-borders);
  border-radius: 8px;
  cursor: pointer;
}

input[type='file']::-webkit-file-upload-button {
  display: none;
}

input[type='file']::before {
  content: 'Choose File';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  padding: 7px 12px;
  background-color: var(--elevation-background);
  color: var(--font-color-primary);
  border-radius: 8px 0 0 8px;
  border-right: 1px solid var(--field-borders);
  font-size: 0.875rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

input[type='file']::after {
  content: 'No File Chosen';
  position: absolute;
  left: 110px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--label-color);
  font-size: 0.875rem;
}

/* Style for when file is selected */
input[type='file']:not([value=''])::after {
  content: attr(value);
  color: var(--font-color-primary);
}

/* Add icon to Choose File button */
.upload-handwriting-container input[type='file']::before {
  content: '\f07c  Choose File';
  font-family: 'Font Awesome 6 Free', var(--font-family-primary);
  font-weight: 900;
  font-size: 0.8125rem;
}

.upload-paper-container input[type='file']::before {
  content: '\f03e  Choose File';
  font-family: 'Font Awesome 6 Free', var(--font-family-primary);
  font-weight: 900;
  font-size: 0.8125rem;
}

.postfix-input {
  position: relative;
}
.postfix-input label {
  display: block;
  margin-bottom: 5px;
}

.postfix-input::after {
  content: attr(data-postfix);
  position: absolute;
  right: 25px;
  bottom: 12px;
  font-size: 12px;
}

.experimental {
  opacity: 0.8;
  cursor: not-allowed;
}

.category-grid {
  display: grid;
  grid-gap: 10px;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
}

.fade-in-dark,
.fade-in-light {
  transition: 0.3s ease;
}

@media (max-width: 768px) {
  .category-grid {
    grid-auto-flow: row;
    grid-auto-rows: 1fr;
  }
}

/*To generate margin between download as pdf and delete button in small screens*/
@media (max-width: 430px) {
  .delete-button {
    margin-top: 10px;
  }
}

/* Add copyright styles */
.copyright {
  text-align: center;
  padding: 20px 0;
  color: var(--label-color);
  font-size: 0.875rem;
  margin-top: 40px;
  border-top: 1px solid var(--field-borders);
}

.copyright a {
  color: var(--font-color-primary);
  text-decoration: none;
}

.copyright a:hover {
  text-decoration: underline;
}
