/* fonts */
.lato-regular {
  font-family: "Lato", sans-serif;
  font-weight: 400;
  font-style: normal;
}
.lato-bold {
  font-family: "Lato", sans-serif;
  font-weight: 700;
  font-style: normal;
}
.lato-black {
  font-family: "Lato", sans-serif;
  font-weight: 900;
  font-style: normal;
}

/* color palette */
:root {
  --palette-1: #003840;
  --palette-2: #005A5B;
  --palette-3: #007369;
  --palette-4: #008C72;
  --palette-5: #02A676;
  --palette-6: #01bf86;
}

/* actual styling */
.loader {
  width: 50px;
  aspect-ratio: 1;
  display: grid;
  border: 4px solid #0000;
  border-radius: 50%;
  border-right-color: var(--palette-4);
  animation: l15 1s infinite linear;
}
.loader::before,
.loader::after {
  content: "";
  grid-area: 1/1;
  margin: 2px;
  border: inherit;
  border-radius: 50%;
  animation: l15 2s infinite;
}
.loader::after {
  margin: 8px;
  animation-duration: 3s;
}
@keyframes l15{
  100%{transform: rotate(1turn)}
}

::placeholder {
  color: var(--palette-3);
}

html, body {
  height: 100%;
}
body {
  background: #005A5B;
  background: linear-gradient(125deg, var(--palette-2) 0%, var(--palette-4) 100%);
  background-attachment: fixed;
  display: flex;
  flex-direction: row;
  color: #ffffff;
}
main {
  background: #003840;
  padding: 2rem;
  border-radius: .5rem;
  border-bottom: 3px solid #002828;
  display: flex;
  flex-direction: column;
  margin: auto;
  gap: 1rem;
}
.results {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
main header,
main button#header {
  font-size: 1.5rem;
  text-shadow: 0 2px 0 #001316;
  user-select: none;
  text-wrap: nowrap;
}
main header.branding {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
  display: none;
}
main button#header {
  text-transform: none;
  background: rgba(0, 0, 0, 0.25);
  border: none;
  text-align: left;
  background-image: var(--clipboard-icon-url);
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 20px;
  background-opacity: 0.6;
  opacity: 0.75;
  cursor: pointer;
  padding-right: 3rem;
  transition: opacity 0.1s;
}
main button#header:disabled {
  background-image: var(--checkmark-icon-url);
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 20px;
}
main button#header:not(.static):hover {
  opacity: 1;
}
/* TODO: .static makes no sense as a name for this */
main button#header.static {
  padding: 0;
  background: none;
  cursor: default;
}
main header .uid,
main button#header .uid,
main .dim {
  opacity: 0.4;
}
main h1 {
  /* text-transform: uppercase; */
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}
.search-wrapper {
  padding: 2rem 2rem 2rem 2rem;
  background: #004e59;
  border-radius: .5rem;
}
.search-wrapper hr {
  height: .3rem;
  background: var(--palette-5);
  border: none;
  border-radius: .5rem;
  margin: 1.25rem 0 1.25rem 0;
}
.search {
  display: flex;
  flex-direction: row;
  gap: .5rem;
}
input[type=text] {
  background: var(--palette-6);
  opacity: 0.75;
  color: #000000;
  padding: .5rem .8rem;
  font-size: 1rem;
  outline: none;
  border: 2px solid #e0e0e0;
  border: none;
  border-bottom: 3px solid #001316;
  border-radius: .5rem;
  font-family: inherit;
  transition: opacity 0.1s ease-in;
  min-width: 300px;
  flex-grow: 1;
  background: rgba(0, 0, 0, 0.25);
  color: var(--palette-6);
}
input[type=text]:focus {
  opacity: 1;
}
button {
  background: var(--palette-6);
  opacity: 0.7;
  color: var(--palette-1);
  padding: .5rem 1rem;
  font-size: 1rem;
  font-weight: bold;
  outline: none;
  border: 2px solid #007369;
  border: none;
  border-bottom: 3px solid #001316;
  border-radius: .5rem;
  font-family: inherit;
  transition: opacity 0.1s ease-in;
  text-transform: uppercase;
  cursor: pointer;
}
button#header {
  background: #005A5B;
  color: #ffffff;
}
button:hover:not(:disabled) {
  opacity: 1;
}
button:disabled {
  opacity: 0.5;
  cursor: default;
}
a {
  text-decoration: none;
}
.result {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  align-items: center;
  background: #008C72;
  background: linear-gradient(90deg, rgba(0, 90, 91, 1) 0%, rgba(0, 140, 114, 1) 100%);
  padding: .5rem 2rem;
  padding: 0;
  border-radius: .5rem;
  opacity: .8;
  transition: opacity 0.1s ease-out;
  border-bottom: 3px solid #001316;
  min-width: 400px;
  min-height: 75px;
  overflow: hidden;
}
.result:hover {
  opacity: 1;
}
.result .img-bg {
  align-self: stretch;
  display: flex;
  justify-content: center;
  align-items: center;
  background: black;
}
.result img {
  width: 75px;
}
.result .info {
  display: flex;
  flex-direction: column;
  color: white;
  gap: .25rem;
  text-wrap: nowrap;
  max-width: 45vw;
  text-shadow: 0 3px 0 var(--palette-2);
}
.result .info > * {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  height: 1.3rem;
}
.result .info .title {
  font-size: 1.2rem;
}
.result .info .artist {
  font-size: 1rem;
  opacity: 0.8;
}
.result .logo {
  flex-grow: 1;
  padding-right: 2rem;
  opacity: 0.25;
  height: 30px;
  min-width: 30px;
}
.result .logo.p-tidal {
  background-image: var(--tidal-icon-url);
  background-repeat: no-repeat;
  background-position: right 2rem center;
  background-size: 30px;
}
.result .logo.p-spotify {
  background-image: var(--spotify-icon-url);
  background-repeat: no-repeat;
  background-position: right 2rem center;
  background-size: 30px;
}
.result .logo.p-youtube {
  background-image: var(--youtube-icon-url);
  background-repeat: no-repeat;
  background-position: right 2rem center;
  background-size: 30px;
}
.result .logo.p-applemusic {
  background-image: var(--apple-music-icon-url);
  background-repeat: no-repeat;
  background-position: right 2rem center;
  background-size: 30px;
}
.choice {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.choice .result {
  border-bottom: none;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.choice .result img {
  border-bottom-left-radius: 0
}
.choice button {
  border-top: none;
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  flex-grow: 1;
}
.loading {
  padding-top: 1rem;
  opacity: 0.8;
  height: 60px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: height .2s, opacity .2s;
}
.loading.hidden {
  height: 0;
  opacity: 0;
}
.platform-selector {
  margin-top: .5rem;

  display: flex;
  flex-direction: row;
  align-items: center;
  font-size: 1.2rem;

  background: var(--palette-6);
  color: var(--palette-1);
  font-size: 1rem;
  font-weight: bold;
  border-radius: .5rem;
  text-transform: uppercase;
  overflow: hidden;
  user-select: none;
}
.platform-selector span {
  padding: 0 1rem;
}
.platform-selector select {
  flex-grow: 1;
  text-transform: uppercase;
  border: none;
  border-left: 1px solid var(--palette-3);
  outline: none;
  padding: .5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  font-family: inherit;
  font-weight: 900;
  background: var(--palette-4);
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.2s ease-in;
}
.platform-selector select:hover {
  color: rgba(255, 255, 255, 1);
}

/*responsiveness stuff*/
@media all and (max-width: 550px) {
  main {
    border-radius: 0;
    width: 100vw;
    padding: 1rem .5rem;
  }
  main.listing {
    padding: 1.5rem 1rem;
  }
  .search-wrapper {
    /* border-radius: 0; */
    padding: 2rem 1.5rem;
  }
  .search {
    flex-direction: column;
    gap: 0;
  }
  input[type=text] {
    border-bottom: 1px solid var(--palette-1);
    width: 65vw;
    width: auto;
    min-width: 0;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }
  button:not(#header) {
    border-top: none;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
  }
  .result {
    gap: .5rem;
    min-width: 0;
  }
  .result .info {
    max-width: 35vw;
  }
  .result .logo {
    height: 25px;
    min-width: 25px;
    background-size: 25px!important;
  }
}
