@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700;900&display=swap');

:root {
  font-family: 'Raleway', sans-serif;
  font-weight: 600;

  --foreground-color: black;
  --background-color: white;

  color: var(--foreground-color);
  border-color: var(--foreground-color);
  background-color: var(--background-color);
}

@media (prefers-color-scheme: dark) {
  :root {
    --foreground-color: white;
    --background-color: black;
  }
}

:host {
  display: block;
}

html {
  height: 100vh;
}

body {
  margin: 0;
}

ul {
  padding: 0;
  margin: 0;
  list-style: none;
}

.x-button {
  display: block;
  border-style: solid;
  border-width: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 900;
  cursor: pointer;
}

.x-input-label {
  font-size: 0.75rem;
  line-height: 1rem;
  font-weight: 700;
}

select,
.x-input {
  border-style: solid;
  border-width: 0.25rem;
  background-color: var(--background-color);
  padding: 0.25rem 0.5rem;
  font-size: 1rem;
  line-height: 1.5rem;
  font-weight: 900;
}

.x-type-selection {
  display: flex;
  flex-direction: column;
  margin-top: -1rem;
}

select {
  font-family: 'Raleway', sans-serif;
  color: var(--foreground-color);
  border-color: var(--foreground-color);
  padding: 0.34375rem;
}

x-connection-manager > * {
  width: 100%;
}

x-connection {
  max-width: 24rem;
}

.x-connection-submit {
  display: table;
  margin-top: 0.5rem;
  margin-left: auto;
}

x-connection-manager,
.x-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1ch;
}

x-connection-manager {
  width: 100%;
  height: 100vh;
}

x-create {
  position: fixed;
  bottom: 1rem;
  right: 1rem;

  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 1rem;
}

.cta::part(x-button) {
  line-height: 1rem;
  width: 1rem;
  height: 1rem;
  padding: 0.5rem;
}

.x-hostname {
  font-size: 4rem;
}

x-interfaces {
  height: 100%;
  padding: 4rem;
  box-sizing: border-box;
}

.x-interface {
  font-size: 2rem;
}

.x-peers-container {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}

.x-peer {
  display: inline-flex;
  flex-direction: column;
  border-style: solid;
  border-width: 0.25rem;
  padding: 1rem;
  gap: 0.25rem;
}

.x-peer-name {
  margin: 0;
}
