:root {
  --gray-border: #ccc;
  --gray-bg: #f9f9f9;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

main {
  padding-bottom: 1rem;
  overflow: scroll;
}

svg text {
  user-select: none;
}

input[type=file] {
  display: none;
}

#controls {
  gap: 0.5rem;
}

#files {
  align-items: center;
  margin: 0.5rem 0;
}

#actions {
  margin: 0.5rem 0;
}

#event-form {
  border-radius: 0.25rem;
  padding: 0 0.4rem 0.5rem;

  background: white;
  border: 1px solid var(--gray-border);

  input {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

.swatch {
  border-radius: 0;
  width: 1rem;
  height: 1rem;
  margin-right: 0.15rem;
}

.standalone {
  body& { background: none }
  #masthead, #docs, #footer { display: none }
}

@media (display-mode: standalone) {
  #masthead, #docs, #footer { display: none }
}

#menu { position: relative }
#menu-toggle {
  display: none;
  margin-bottom: 0.5rem;
}

.close {
  display: none;
  position: absolute;
  top: 0.25rem;
  right: 0.5rem;
}

@media (max-width: 700px) {
  #controls, #files {
    flex-direction: column;
    align-items: start;
  }
  #menu {
    position: fixed;
    top: 0;
    left: -100%;
    bottom: 0;
    padding: 1rem 0.5rem 0.5rem;
    transition: left 0.3s ease;

    background: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.5);
  }
  #menu.menu--open { left: 0 }
  #menu-toggle { display: block }
  .close { display: block }
}
