:root {
  --font-color: #000;
  --font-color-accent: #666;
  --font-color-dark: #fff;
  --background-color: #fff;
  --background-color-accent: #e0e0e0;
  --background-color-dark: #444;
  --background-color-dark-hover: #666;
  --shadow-color: rgba(0, 0, 0, 0.4);
}


html,
input,
button {
  font-size: calc(max(1em, (1vh + 1vw) / 2));
  font-family: sans-serif;
}

body {
  padding: 0px;
  margin: 0px;
}

body.app-view {
  margin: 0px;
}

body.app-view iframe {
  width: 100%;
  height: 100%;
}

.hidden {
  display: none;
}

.center {
  text-align: center;
  justify-content: center;
}

.center-frame {
  margin: 0 auto;
  max-width: 900px;
  padding: 20px;
}

.section {
  padding: 20px 0px;
}

.button-text,
.button-border {
  padding: 5px 10px;
  border-radius: 10px 10px;
  background: none;
}

.button-border {
  background-color: var(--background-color-dark);
  color: var(--font-color-dark);
  border: none;
  box-shadow: var(--shadow-color) 1px 1px 2px;
  padding: 5px 15px;
  border-radius: 20px;
  font-weight: 600;
}

.button-border:hover {
  background-color: var(--background-color-dark-hover);
  cursor: pointer;
}

.red-button {
  background-color: #d22;
}

.button-text {
  border: none;
}

.top-bar {
  box-shadow: var(--shadow-color) 0px 1px 4px;
  background-color: var(--background-color-accent);
  padding: 5px 10px;
  height: 48px;
  box-sizing: border-box;
  font-size: 1.5rem;
}

.middle-title {
  display: grid;
  grid-template-columns: max-content 1fr max-content;
}

.top-bar button {
  font-size: 1.2rem;
}

.top-bar-title {
  display: flex;
  align-items: center;
}

.top-bar-buttons {
  margin-left: 20px;
}

.top-bar-menu {
  display: flex;
  align-items: center;
  justify-content: end;
}

.top-bar-menu button {
  border: none;
  background: none;
  font-size: 1.6rem;
}

.drop-down-menu {
  box-shadow: rgba(0, 0, 0, 0.36) 0px 2px 4px;
  min-width: min(100vw, 300px);
  position: absolute;
  box-sizing: border-box;
  top: 48px;
  right: 0px;
  background-color: var(--background-color-accent);
  z-index: 99;
  border-radius: 0 0 5px 5px;
}

.drop-down-menu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.hint-text {
  font-size: 0.9rem;
  color: #666;
}

.drop-down-menu li {
  margin: 0;
  padding: 5px 10px;
}
.drop-down-menu li:hover{
  background-color: rgba(0,0,0,0.05);
}

h2 {
  margin: 0;
}

.floating-buttons {
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  z-index: 10;
}

.bottom {
  align-content: end;
}

.floating-action {
  background-color: var(--background-color-dark);
  color: var(--font-color-dark);
  border: none;
  box-shadow: var(--shadow-color) 1px 1px 3px;
  font-size: 1.6rem;
  font-weight: 600;
  padding: 5px 15px;
  border-radius: 20px;
}

/* --- Apps --- */

.app-title {
  background-color: #ccc;
  padding: 1em;
  height: 3em;
}

.app-title .name {
  display: inline-block;
  margin-top: 1em;
}

.app-title .buttons {
  display: inline-block;
  float: right;
  margin-top: 1em;
}

.app-pane {
  position: absolute;
  top: 48px;
  left: 0px;
  right: 0px;
  bottom: 0px;
}

.app {
  display: inline-block;
  padding: 1em;
  position: relative;
}

.app .name {
  margin-top: 0.5em;
  text-align: center;
}

.app .icon {
  width: 128px;
  height: 128px;
  margin: 0px;
}

.app button.app-icon {
  background: none;
  border: none;
  padding: 0px;
  width: 132px;
  height: 132px;
}

.app button:hover {
  cursor: pointer;
}

.app .unread-dot {
  background-color: red;
  border-radius: 10px 10px;
  position: absolute;
  top: 7px;
  right: 7px;
  width: 20px;
  height: 20px;
}

.info {
  text-align: center;
  margin: 2em;
}

.space-chat {
  width: 25%;
  min-width: 150px;
  min-height: 400px;
  max-height: 80%;
  overflow-y: scroll;
  padding: 1em;
  margin-top: 1em;
}

.space-chat .details {
  background-color: #ddd;
  margin-top: 1em;
}

.details pre {
  font-size: 0.8rem;
}

.create-space {
  margin: auto;
  max-width: 500px;
  text-align: center;
}

.create-space h3 {
  margin-top: 0;
  text-align: left;
}

.create-space input[name="name"] {
  width: 100%;
  padding: 1ex;
  box-sizing: border-box;
  border-radius: 5px 5px;
  border: 1px solid grey;
}

.create-space .regenerate {
  text-align: left;
}

.create-space .button-border {
  margin-top: 10px;
  padding: 10px 20px;
}

.create-space button.de-emphasize {
  cursor: pointer;
  border-width: 0px;
  background-color: transparent;
  text-decoration: underline;
}

button.edit {
  cursor: pointer;
  background-color: transparent;
  border-width: 0px;
  font-size: 1em;
}

form.edit-name {
  display: inline-block;
}

.action-box {
  margin: 40px auto;
  text-align: center;
  padding: 20px;
  background: var(--background-color-accent);
  max-width: 500px;
  box-shadow: var(--shadow-color) 0px 1px 3px;
}

button.add-app {
  background-color: #777;
  color: #fff;
  padding: 1ex;
  border: 2px solid #444;
  border-radius: 1.5ex;
  text-align: center;
  font-weight: bold;
  width: 3em;
  font-size: 0.6em;
  margin-left: 1em;
}

.left-right-grid {
  display: grid;
  grid-template-columns: 1fr max-content;
}

.apps-layout {
  margin: 0 auto;
  max-width: 900px;
  padding: 0px 10px;
}

.appstore-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 20px 20px;
}

.appstore-item {
  display: flex;
  gap: 10px;
  padding: 10px;
  background-color: var(--background-color-accent);
  box-shadow: var(--shadow-color) 1px 1px 2px;
  border-radius: 5px 5px;
}

.appstore-description {
  display: flex;
  flex: fit-content;
  flex-direction: column;
}

.appstore-item .add-button {
  width: 60px;
  margin-left: auto;
  font-size: 1.4rem;
}

.appstore-item-title {
  font-weight: bold;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.appstore-item img {
  width: 96px;
  max-height: 96px;
}