/* Ressetings */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    interpolate-size: allow-keywords;
  }
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  max-height: 100%;
  user-select: none;
}

input,
button,
textarea,
select {
  font: inherit;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

#root,
#__next {
  isolation: isolate;
}

/* General CSS */

body {
  font-family:
    system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
  background: var(--bg);
  color: var(--text);

  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;

  /* Variables */
  --bg: hsl(0 0% 5%);
  --bg-light: hsl(0 0% 10%);
  --text: hsl(0 0% 95%);
  --text-muted: hsl(0 0% 70%);
  --border: hsl(0 0% 25%);
}

.header {
  line-height: 1;
  display: flex;
  align-items: center;
  padding: 0.8rem 2rem;
  border-bottom: 2px solid var(--border);
  background-color: var(--bg);
  gap: 1rem;
}

.logo {
  margin-right: auto;
  font-weight: 700;
  font-size: 1.7rem;
  color: var(--text);
  text-decoration: none;
}

.button {
  color: var(--text-muted);
  background-color: var(--bg-light);
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  cursor: pointer;
  text-decoration: none;
}

.button:hover {
  color: var(--text);
}

.navlink {
  text-decoration: none;
  padding: 0.7rem 1rem;
  font-weight: 500;
  font-size: 1.1rem;
}

.withSvg {
  display: flex;
  gap: 0.75ch;
  align-items: center;
}

.withSvg svg {
  flex: none;
}

.footer {
  background-color: var(--bg);
}

.footer a {
  padding: 0.8rem 1rem;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  border-top: 2px solid var(--border);
}

.footer a:hover {
  color: var(--text);
}

.form {
  margin: auto;
  background-color: var(--bg);
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  padding: 1.25rem;
  width: 24rem;
}

.sign-in-error {
  margin-top: 0.5rem;
  display: flex;
  gap: 0.5ch;
}

.sign-in-error svg {
  flex: none;
}
.form h1 {
  text-align: center;
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
}

.fields {
  margin-top: 0.5rem;
  display: grid;
  gap: 1rem;
}

.form label {
  font-size: 1.1rem;
  font-weight: 500;
}

.form input {
  display: block;
  width: 100%;
  background-color: var(--bg);
  border: 2px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.25rem 0.5rem;
  color: var(--text);
}

.form button {
  padding: 0.4rem 1rem;
  font-weight: 500;
  font-size: 1.1rem;
  margin-top: 1rem;
  display: block;
  margin-inline: auto;
}

.view {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  padding: 1rem 2rem;
  row-gap: 1rem;
}

.actions {
  display: flex;
  gap: 0.25rem;
}

.actions a {
  padding: 0.25rem 0.5rem;
}

.backdrop {
  position: absolute;
  inset: 0;
  display: flex;
}

.overlay {
  background-color: black;
  opacity: 0.5;
  position: absolute;
  inset: 0;
  cursor: default;
}

.backdrop form {
  z-index: 1;
  margin: auto;
  position: relative;
}

.backdrop .close {
  margin: 0.5rem;
  position: absolute;
  right: 0;
  top: 0;
  border: none;
  background-color: transparent;
  color: var(--border);
  cursor: pointer;
  padding: 0;
}

.backdrop .close svg {
  width: 1.75rem;
  height: 1.75rem;
}

.backdrop form input[type="file"] {
  border: none;
}

.backdrop form input::file-selector-button {
  color: var(--text-muted);
  background-color: var(--bg-light);
  border-radius: 0.5rem;
  border: 2px solid var(--border);
  padding: 0.75rem 1.5rem;
  cursor: pointer;
  text-decoration: none;
  margin-right: 1rem;
}

.backdrop form input::file-selector-button:hover {
  color: var(--text);
}

.backdrop form h3 {
  margin-bottom: 1rem;
}

.path {
  padding: 0;
  display: flex;
  gap: 0.25rem;
  font-size: 1.1rem;
}

.path li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-muted);
}

.path li svg {
  flex: none;
}
.path li a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}

.path li:last-child a {
  color: var(--text);
}

.path li a:hover {
  color: var(--text);
}

.entries {
  display: grid;
  grid-template-columns: 1fr repeat(3, 12rem);
  grid-auto-rows: 2.5rem;
  row-gap: 0.25rem;
  grid-column: span 2;
}

.entries > * {
  display: grid;
  grid-template-columns: subgrid;
  grid-column: span 4;
}

.params a:last-child {
  grid-column: span 2;
}

.params a,
.entry {
  text-decoration: none;
  color: var(--text-muted);
  align-items: center;
  border-radius: 0.5rem;
  font-weight: 500;
}

.entry p {
  padding: 0 0.8rem;
}

.params a {
  display: flex;
  padding: 0 0.8rem;
}
.entry {
  background-color: var(--bg-light);
  border: 2px solid var(--border);
}

.entry:hover:not(:has(.entityActions .button:hover)),
.params a:hover {
  background-color: var(--bg-light);
  color: var(--text);
}

.entityActions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.entityActions .button {
  padding: 0.4rem;
  border: none;
}

.entityActions .button:hover {
  background-color: var(--border);
}
