
:root {
  --main-bg: #f8f8ff;
  --border-color: #888;
  --popup-bg: #211929;
  --popup-accent: #bfa100;
  --popup-accent-hover: #ffe066;
  --shadows: #aaa;
  --list-item-bg: #e0e0ff;
  --list-item-bg-hover: #c0c0ff;
  /* Add more as needed */
}

@font-face {
  font-family: 'FoulisGreekFont';
  src: url('resources/fonts/FoulisGreek-3Wry.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'AdonisFont';
  src: url('resources/fonts/AdonisBold-l84e.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}



h1 {
  font-size: 4em;
  font-family: 'AdonisFont', serif;
  margin: 10px 5px 0px;
}

html, body {
  font-family: 'FoulisGreekFont',serif;
  font-size: 1.1em;
}

#messages {
 margin: 10px;
 font-size: 1.1em;
}

#main-container {
  display: flex;
  justify-content: left;
  align-items: flex-start;
  gap: 20px;
}

#canvas-container {
  flex: 0 0 auto;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  background: var(--main-bg);
  box-shadow: 2px 2px 8px var(--shadows);
  position: relative; /* for absolute positioning of trash icon */
  display: inline-block; /* shrink to fit canvas */
}

#inventory {
  flex: 0 0 auto;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 8px;
  background: var(--main-bg);
  box-shadow: 2px 2px 8px var(--shadows);
  height: 610px;
  width: 190px;
}

#inventory h3 {
  margin-top: 0;
  margin-bottom: 12px;
  font-size: 1.4em;
  font-weight: normal;
}

#element-list {
  list-style: none;
  padding: 0;
  margin: 0;
  min-width: 100%; /* must fill the parent container's */
  overflow-y: auto; /* to make scrollbar appear */
  max-height: 550px;
}

#element-list li {
  padding: 5px 5px;
  margin-bottom: 4px;
  background: var(--list-item-bg);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

#element-list li:hover {
  background: var(--list-item-bg-hover);
}

#trash-icon {
  position: absolute;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  opacity: 0.4;
  z-index: 10;
  pointer-events: none;
}

#element-view {
  width: 100%;
  background: var(--main-bg);
  border-radius: 8px;
  border: 2px solid var(--border-color);
  box-shadow: 2px 2px 8px var(--shadows);
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 80px;
  
  /* Allow height to grow with content */
  height: auto;
  max-width: 300px;
}

#element-title {
  width: 100%;
  text-align: center;
  font-size: 1.4em;
  margin-bottom: 6px;
}

#element-image {
  width: 95%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  display: block;
  margin: 0 auto 6px auto;
}

#element-description {
  width: 90%;
  text-align: center;
  font-size: 1em;
  color: #444;
  height: 6em; /* lines at 1.2em line-height */
  overflow-y: auto;
}

#popup-dialog {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--popup-bg);
  color: white;
  border-radius: 16px;
  padding: 2em 2.5em;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 8px 32px var(--shadows);
  min-width: 320px;
  max-width: 90vw;
  max-height: 80vh;
}

#popup-dialog.hidden { display: none; }

#popup-dialog-content {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2em;
}

#popup-image {
  max-width: 400px;
  max-height: 400px;
  margin-bottom: 0;
  border-radius: 8px;
  flex-shrink: 0;
}

#popup-text {
  font-size: 1.1em;
  margin-bottom: 0;
  text-align: left;
  max-width: 350px;
}

#popup-next {
  margin-top: 2em;
  font-size: 1em;
  padding: 0.5em 1.5em;
  border-radius: 8px;
  border: none;
  background: var(--popup-accent);
  color: #222;
  cursor: pointer;
  transition: background 0.2s;
}

#popup-next:hover {
  background: var(--popup-accent-hover);
}

#settings {
  margin: 10px;
}