:root {
  --alpha: #8fbcbb;
  --bravo: #3b4252;
  --charlie: #81a1c1;
  --delta: #5e81ac;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  font-family: "Roboto", sans-serif;
}

html {
  color: var(--bravo);
  background: #f9f9f9;
}

h1 {
  margin: 0 0 1rem 0;
}

input[type="button"] {
  border: none;
  background-color: var(--delta);
  color: white;
  padding: 1rem;
  cursor: pointer;
}

input[type="button"].disabled {
  border: 1px solid #ccc;
  background-color: white;
  color: #ccc;
}

#root {
  max-width: 800px;
  margin: auto;
  padding: 2rem;
  background: white;
}

@media (min-width: 600px) {
  #root {
    margin: 4rem auto;
  }
}

.main {
  display: grid;
  grid-template-columns: 100%;
  grid-gap: 2rem;
}

@media (min-width: 600px) {
  .main {
    grid-template-columns: 60% auto;
  }
}

/*
** Search elements
*/

.search__bar {
  display: flex;
}

.search__input {
  flex-grow: 1;
  padding: 1rem;
}

.search__error {
  margin-top: 2rem;
  font-style: italic;
  color: red;
}

.search__result {
  margin-top: 1rem;
}

.search__item {
  display: flex;
  border: 1px solid #ccc;
  padding: 1rem;
  margin-top: 1rem;
  cursor: pointer;
  align-items: center;
}

.search__item:hover {
  border: 1px solid var(--alpha);
}

.search__item.selected {
  border: 3px solid var(--alpha);
}

.search__img {
  width: 100px;
}

.search__text {
  padding: 1rem;
}

.spinner {
  display: inline-block;
  width: 80px;
  height: 80px;
}

.spinner:after {
  content: " ";
  display: block;
  width: 64px;
  height: 64px;
  margin: 8px;
  border-radius: 50%;
  border: 6px solid var(--delta);
  border-color: var(--delta) transparent var(--delta) transparent;
  animation: spinner 1.2s linear infinite;
}

@keyframes spinner {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/*
** My picture elements
*/

.my-pictures {
  display: flex;
  flex-direction: column;
}

.my-pictures__item {
  display: flex;
  border: 1px solid #ccc;
  padding: 1rem;
  margin-top: 1rem;
  cursor: pointer;
  align-items: center;
  justify-content: space-between;
}

.my-pictures__content {
  display: flex;
}

.my-pictures__img {
  width: 50px;
}

.my-pictures__text {
  margin-left: 1rem;
}
