/* CSS Variables */
:root {
  --padding-small: 0.3125rem;
  --padding: 0.625rem;
  --padding-medium: 0.9375rem;
  --padding-large: 1.25rem;

  --margin-small: 0.9375rem;
  --margin: 1.25rem;
  --margin-large: 2.5rem;

  --text-size: 1rem;

  --width-dropdown: 15rem;
  --heighth-dropdown: 20rem;
  --max-heighth-dropdown: 30vh;

  --text-indent: 1.25rem;
  --body-padding: 1.25rem;
  --mobile-padding: 0.9375rem;
  --font-family: "Inter", sans-serif;

  --radius-tiny: 0.25rem;
  --radius: 1rem;

  --border-width: 2px;

  --color-bg: #FFFCF0;
  --color-text: #282726;
  --color-text-secondary: #6c6a64;
  --color-link: #2990EF;
  --color-link-hover: #64b5f6;
  --color-backing-light: #fffdf4;
  --color-backing: #e6e4d9;
  --color-backing-dark: #d3d1c4;
  --color-backing-darker: #575751;
  --color-backing-darkest: #21211f;
  --color-outline: var(--color-backing-dark);
  --color-shadow: #00000030;
  --color-shadow-light: #00000020;
  --color-highlight: #D0A21560;

  --color-light: #FFFCF0;
  --color-light-transparent: #FFFCF0CC;

  --shadow: var(--color-shadow) 1px 3px 7px 2px;
}

/* Dark mode */
/* @media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #100F0F;
    --color-text: #E6E4D9;
    --color-text-secondary: #B3B1A9;
    --color-backing-light: #343331;
    --color-highlight: #D0A215;
  }
} */

body {
  font-family: BlinkMacSystemFont, -apple-system, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Helvetica,
    Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background-color: #fafafa;
  margin: 0;
  padding: 0;
  text-rendering: optimizeLegibility;
}

.padding {
  padding: 1rem;
}

.spacing {
  margin: 1rem;
}

.header {
  /* font-size: 2.4em;
  font-weight: 600;
  color: #333;
  opacity: 1; */
}

.hidden {
  display: none;
}

.page {
  /* background-color: ; */
  padding-top: 2em;
  width: 90%;
  max-width: 640px;
  margin: 0 auto;
}

.row {
  display: flex;
  /* align-items: center; */
  /* justify-content: center; */
  flex: 1;
  flex-direction: row;
}

.centered-container {
  background-color: rgba(255, 255, 255, 0.4);
  /* background-color: #fff; */
  box-shadow: rgba(108, 108, 108, 0.201) 0 0 16px 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  flex: 1;
  margin: 0 auto 1em auto;
  padding: 0.2em 0;
  border-radius: 72px;
}

.dropzone-container {
  background-color: rgba(255, 255, 255, 0.5);
  box-shadow: rgba(108, 108, 108, 0.201) 0 0 16px 8px;
  border: 6px rgb(7, 123, 255) dashed;
  padding: 50px 0;
  /* line-height: 0; */
  text-align: center;
  border-radius: 72px;
}

.dropzone-mini {
  padding: 20px 0 !important;
}

.dropzone-container.hover {
  box-shadow: unset;
  background-color: rgba(255, 255, 255, 0.8);
  border: 6px rgb(255, 171, 69) dashed;
}

.dropzone-container.hover p {
  color: rgb(255, 171, 69);
}

#dropzone-window-container {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

#dropzone-window-container.hover {
  display: block;
  background-color: rgba(255, 255, 255, 0.8);

  /* interior border */
  border: 6px rgb(255, 171, 69) dashed;
}

.dropzone p {
  color: rgb(82, 136, 228);
}

.dropzone .sub {
  display: block;
  font-size: 0.5em;
  opacity: 0.5;
}

.dropzone input {
  opacity: 1;
}

.dropzone {
  font-size: 3em;
}

.btn {
  /* font-size: 1.2em;
  border-radius: 16px;
  padding: 0.5em 1em;
  border: 4px solid rgba(7, 123, 255, 0.497);
  background-color: #fff;
  cursor: pointer;
  margin-right: 0.5em; */
}

.btn.selected {
  /* background-color: rgb(7, 123, 255);
  color: #fff; */
}

.btn:hover {
  /* background-color: rgb(75, 175, 222); */
  /* background-color: rgb(7, 123, 255);
  color: #fff; */
}

.btn:hover strong {
  /* color: #fff; */
}

.btn.small {
  font-size: 0.8em;
}

.btn.special {
  /* background-color: rgb(75, 175, 222); */
  border: 4px solid rgb(164, 7, 255);
  color: rgb(164, 7, 255);
}

.btn.special:hover {
  background-color: rgb(164, 7, 255);
  color: #fff;
}

.cell {
  display: inline-block;
  padding: 0.5em;
  margin: 0.25em;
  font-size: 0.8em;
}

.concept {
  border-radius: 8px;
  border: 4px solid transparent;
  background-color: rgba(82, 136, 228, 0.12);
  padding: 0.5em;
  margin-bottom: 1em;
}

.close-btn {
  color: transparent;
  text-shadow: 0 0 0 black;
  float: right;
  opacity: 0.5;
  cursor: pointer;
}

.add-btn {
  display: inline-block;
  cursor: pointer;

  border-radius: 8px;
  background-color: rgba(82, 136, 228, 0.12);
  padding: 0.5em;
  margin-bottom: 1em;

  border: 4px solid transparent;
}

.add-btn:hover {
  background-color: rgba(82, 136, 228, 0.4);

}

.add-btn.selected {
  background-color: rgba(82, 136, 228, 0.33);
  border: 4px solid rgba(58, 175, 247, 0.418);
}

.padleft {
  padding-left: 0.5em;
}

button {
  cursor: pointer;
}

input[type="text"], textarea {
  border: 2px dashed rgba(0, 0, 0, 0.1);
  /* border: none; */
  font-size: 1.1rem;
  padding: 0.5em;
  border-radius: 0.5em;
  /* padding: 0.5em; */
  /* margin: 0.25em; */
  background-color: transparent;
  /* width: 100%; */
  resize: none;
}

input[type="text"]:hover, textarea:hover {
  border: 2px solid rgb(7, 123, 255, 0.3);
}

::placeholder {
  color: #000;
  opacity: 0.2;
}

input[type="text"].error {
  border: 4px solid red;
}

input[type="text"].ai-suggestion {
  color: green;
  font-style: italic;
  font-weight: bold;
}

.noticeable {
  border: 2px solid transparent !important;
  background-color: rgba(255, 255, 255, 1) !important;
}

textarea:focus, input[type="text"]:focus, input[type="text"].noticeable:focus {
  /* blue */
  border: 2px solid rgb(7, 123, 255) !important;
  outline: none;
}

.subtle {
  opacity: 0.75;
}

.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

p {
  margin: 1em 0 !important;
}

table {
  width: 100%;
}

th {
  text-align: left;
}

td {
  position: relative;
}

.concept.selected {
  background-color: rgba(82, 136, 228, 0.33);
  border: 4px solid rgba(58, 175, 247, 0.418);
}

.subtitle {
  font-size: 1.2em !important;
}

/* .section {
  font-size: 1.2em !important;
  opacity: 0.5;
  padding: 1em;
} */

select {
  cursor: pointer;
  border: 1px solid rgba(82, 136, 228, 0.4);
  font-size: large;
  padding: 0.5em;
  border-radius: 0.5em;
  padding: 0.5em;
  margin: 0.25em;
  background-color: var(--color-light-transparent);
  text-align: center;
}

select:hover {
  background-color: #d4e3fe
}

select option {
  text-align: center;
}

.titlebar {
  position: fixed;
  background-color: white;
  border-bottom: 1px solid #ccc;
  width: 100%;
  top: 0;
  opacity: 1;
  z-index: 100;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  display: flex;
}

.title {
  display: inline-block;
  font-size: 1.5em !important;
  font-weight: 600;
  padding: 0.8em;
  margin: 0;
  margin-right: 1em;
}

.main {
  padding-top: 2em;
  margin-top: 3em;
  margin-bottom: 3em;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 999;
  background-color: rgba(0, 0, 0, 0.5);
  animation: modal-appear ease 0.4s;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: white;
  border-radius: 8px;
  padding: 1em;
  width: 80%;
  max-width: 600px;
  min-width: 300px;
  height: auto;
  max-height: 80%;
  overflow: auto;
}

@keyframes modal-appear {
  0% {
    transform: scale(1);
  }

  20% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.infocard-container {
  display: flex;
  flex-direction: row;
  margin: 1rem 1rem 0 0;
  flex-wrap: wrap;
  gap: 1rem;
}

.infocard {
  background-color: #fff;
  border: 3px solid #4b4b4b;
  border-radius: 16px;
  padding: 1rem;
  margin-right: 1.5rem;
  flex-basis: 20vw;
  max-width: 320px;
  font-size: 2em;
}

.infocard-header {
  font-size: 0.8em;
  font-weight: bold;
  margin-bottom: 0.1em;
  line-height: 1.8em;
}

.infocard-body {
  font-size: 0.6em;
  color: rgba(0, 0, 0, 0.7);
}

.infocard img {
  width: 1.2em;
  filter: invert(1);
}

.infocard.clickable {
  cursor: pointer;
}

.infocard.clickable:hover {
  border: 3px solid rgba(82, 136, 228, 0.4);
  color: rgba(82, 136, 228);
}

.infocard.clickable:hover .infocard-body {
  color: rgba(82, 136, 228, 0.7);
}

.infocard.clickable:hover img {
  /* tint black image to be blue */
  filter: brightness(50%) sepia(100) saturate(5) hue-rotate(190deg)
}

.back-button {
  cursor: pointer;
  color: rgba(82, 136, 228, 0.8);
}

.underline {
  text-decoration: underline;
}

.tiny-header {
  /* font-size: 0.9em; */
  padding: 1em 0 0.1em 0;
  font-weight: bold;
  opacity: 0.5;
}

.imports {
  margin-top: 2rem;
}

.imports .section {
  background-color: #fff;
  border-radius: 12px;
  border-style: solid;
  border-color: rgba(0, 0, 0, 0.1);
  border-width: 2px;
  padding-left: 1rem;
  padding-right: 1rem;
  margin: 1rem;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: rgba(108, 108, 108, 0.1) 2px 4px 16px 4px;
}

.section.with-input {
  display: flex;
  flex-direction: column;
  position: relative;
  padding: 0 !important;
  /* margin: 1rem !important; */
}

.section.with-input input[type="text"], .section.with-input textarea {
  flex: 1;
}

.section.with-input textarea:nth-child(2n) {
  background-color: #fcfcfc;
}

.section h2 {
  background-color: #fff;
  border-radius: 8px;
  position: absolute;
  z-index: 100;
  top: -1.55rem;
  font-size: 1rem;
  padding-left: 0.5rem;
  padding-right: 0.5rem;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.5)
}

.section.with-input h2 {
  margin-left: 1rem;
  z-index: 0;
}

button {
  border-radius: 8px;
  border-style: solid;
  border-width: 2px;
  border-color: rgba(255, 255, 255, 0.5);
  background-color: rgba(75, 175, 222, 0.2);
  display: block;
  padding: 0.5rem;
  font-size: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  margin-bottom: 1rem;
  margin-right: 1rem;
  margin-top: 1rem;
  /* font-style: italic; */
  color: rgba(0, 0, 0, 0.5);

  transition: transform 0.2s;
  transform: scale(1);
}

button strong {
  color: rgba(0, 0, 0, 1);
  font-weight: 500;
  font-style: normal;
}

button:hover {
  background-color: rgba(75, 175, 222, 0.5);
  transform: scale(1.02);
}

.hoverable {
  transition: all 0.1s;
  cursor: pointer;
}

.selectable:hover {
  background-color: var(--color-link-hover);
  color: var(--color-light);
}

.hoverable:hover {
  opacity: 0.9;
  transform: scale(1.01) translateY(-1px);
}

.light {
  opacity: 0.5;
}

.tiny-inline-icon-wrapper {
  /* position: relative; */
  display: inline-block;
  margin-right: 1.5em;
}

.tiny-inline-icon {
  position: absolute;
  left: 0.5em;
  top: 0.3em;
  height: 1.6em;
}

.tags-container {
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  align-content: center;
}

.tag {
  background-color: #e2e2e2;
  border-radius: 8px;
  padding: 0.2em 0.5em;
  margin-right: 0.4rem;
  color: #848484;
  font-weight: 600;
  cursor: text;
  margin-top: 0.2rem;
  margin-bottom: 0.2rem;
  display: flex;
  align-items: center;
}

.add.tag {
  background-color: #54bb63;
  color: rgba(255, 255, 255, 0.92) !important;
  font-weight: 600;
  cursor: pointer;
}

.tag:hover {
  background-color: #64acd7;
  color: white;
}

.add.tag:hover {
  background-color: #5e9166;
}

.tag.editing {
  background-color: #64acd7;
  color: rgba(255, 255, 255, 0.697);
  /* font-size: 1em; */
}

.tag-container {
  position: relative;
}

.tag-container .icon {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-40%);
  transition: all 0.15s;
}

.tag-container .icon:hover {
  cursor: pointer;
  /* visual signifier */
  filter: brightness(0.9);
}

.tiny {
  font-size: 0.5em;
}

.titlebar {
  background-color: var(--color-backing-darkest);
  color: var(--color-light);
}

.titlebar button {
  background-color: rgba(75, 175, 222, 0.6);
}

.titlebar button strong {
  color: var(--color-light);
}

.titlebar button:hover {
  background-color: rgba(75, 175, 222, 0.8);
}

.pill {
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: var(--color-backing);
  border: var(--border-width) solid var(--color-backing-darker);
  border-radius: var(--radius);
  padding: var(--padding-small) var(--padding);
  box-shadow: var(--shadow);
  font-weight: 500;
}

.pill .icon {
  filter: invert(1);
}

.pill:hover {
  border-color: var(--color-light);
}

.pill:hover .icon {
  filter: unset;
}

.pill span {
  padding: 0 0.5rem;
}

.fade {
  opacity: 0.5;
}

.dropdown-container:hover {
  opacity: 1 !important;
}

.dropdown-container {
  position: relative;
}

.dropdown-container.open {
  z-index: 9002;
}

.dropdown-container input[type="text"] {
  font-size: 1rem;
  font-weight: bold;
}

.dropdown-container:hover input[type="text"] {
  color: white;
}

.dropdown:not(select) {
  position: absolute;
  width: 100%;
  min-width: var(--width-dropdown);
  /* top: calc(100% + var(--margin-small)); */
  top: 100%;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  background-color: var(--color-backing-light);
  border-radius: var(--radius);
  flex-direction: column;

  box-shadow: var(--shadow);

  height: var(--heighth-dropdown);
  max-height: var(--max-heighth-dropdown);

  overflow-y: scroll;
}

.dropdown-item {
  flex: 1;
  /* margin-bottom: var(--margin-small); */
  padding: var(--padding-small) var(--padding);
  color: var(--color-text);
}

.dropdown-item:first-of-type {
  border-radius: var(--radius) var(--radius) 0 0;
}

.dropdown-item:last-of-type {
  border-radius: 0 0 var(--radius) var(--radius);
}

.dropdown-item:hover {
  background-color: var(--color-link-hover);
  color: var(--color-light);
}