/*
  colors: https://flatuicolors.com/palette/in
*/

/*
  basics
*/

body {
  font-family: sans-serif;
  background-color: #f1f2f6;
  color: #2C3A47;
  margin: 0;
  padding: 0;
}

body:has(.modal) {
  overflow: hidden;
}

a {
  text-decoration: none;
  color: #1B9CFC;
}

pre {
  padding: .75rem;
  background-color: #F8EFBA;
  border-radius: .25rem;
  border: #EAB543 solid 1px;
}

.text-center {
  text-align: center;
}

.cursor-pointer {
  cursor: pointer;
}

/*
  header
*/

header {
  background-color: #B33771;
  padding: 1rem;
}

header > .content {
  display: flex;
  max-width: 800px;
  margin: auto;
  padding: .5rem;
  align-items: center;
  justify-content: space-between;
}

header > .content > h1 {
  font-size: 1.5rem;
  padding: 0;
  margin: 0;
}

header > .content > h1 > a {
  color: #f1f2f6;
  text-decoration: none;
}

header > .content > h1 > a > span {
  white-space: nowrap;
}

header > .content > .item-types > a {
  display: inline-block;
  color: #f1f2f6;
  text-decoration: none;
  text-transform: uppercase;
  font-weight: bolder;
  padding: .5rem;
}

.prowlarr-bar {
  margin: 0;
  padding: 1rem;
  background-color: #FD7272;
  color: white;
}

.prowlarr-bar a {
  color: #F8EFBA;
}

.prowlarr-bar > p {
  font-size: 1.25rem;
  text-align: center;
  margin: 0;
  padding: 0;
}

/*
  search
*/

.search {
  margin: 2rem auto;
  max-width: 800px;
  padding: .5rem;
}

.search > p {
  margin: 0;
  font-size: .75rem;
  text-transform: uppercase;
  font-weight: bolder;
}

.search > form {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.search > form > .field {
  flex: 1;
}

.search > form > .field > input {
  width: 100%;
  font-size: 1.5rem;
}

.search > form > .submit {
  flex: 0 0 auto;
}

.search > form > .submit > button {
  border: none;
  background: none;
  font-size: 2rem;
  cursor: pointer;
}

/*
  main
*/

main {
  max-width: 800px;
  margin: auto;
  padding: .5rem;
}

/*
  footer
*/

footer {
  max-width: 800px;
  margin: 5rem auto;
  padding: .5rem;
  font-size: .75rem;
}

/*
  pagination
*/

.pagination-status {
  text-align: center;
  font-weight: lighter;
}

nav {
  display: flex;
  margin: 5rem 0;
  justify-content: space-between;
}

nav > a {
  display: inline-block;
}

nav > a.next {
  margin-left: auto;
}

/*
  item
*/

.item {
  position: relative;
  display: flex;
  align-items: flex-start;
  max-width: 100%;
  margin: 1rem 0;
  padding: .5rem;
  background-color: white;
  gap: .5rem;
  box-shadow: 0px 0px 10px -2px rgba(0, 0, 0, .5);
  border-radius: .125rem;
  overflow: hidden;
}

@media only screen and (max-width: 850px) {
  .item {
    display: block;
  }
}

.item > .item-type {
  position: absolute;
  top: 0;
  left: 0;
  color: white;
  text-transform: uppercase;
  font-weight: bolder;
  padding: .25rem .5rem;
  font-size: .75rem;
  border-radius: .125rem;
  overflow: hidden;
  background-color: #2C3A47;
}

.item > .item-type.movie {
  background-color: #58B19F;
}

.item > .item-type.tv {
  background-color: #EAB543;
}

.item > .poster {
  display: block;
  border-radius: .5rem;
  overflow: hidden;
  width: 120px;
  flex-shrink: 0;
  margin-bottom: 1rem;
}

.item > .poster > img {
  display: block;
  width: 100%;
}

.item > .details {
  flex: 1;
  min-width: 0;
  overflow: auto;
}

.item > .details > * {
  margin: .25rem 0;
}

.item > .details > .title {
  font-size: 1.5rem;
}

.item > .details > .title,
.item > .details > .external-links {
  margin: 0 0 .5rem 0;
}

.item > .details > .provider {
  border-radius: .25rem;
  overflow: hidden;
  background-color: #F8EFBA;
}

.item > .details > .provider > .header {
  display: flex;
  justify-content: space-between;
  padding: .5rem;
  border-radius: .25rem;
  border: solid #F97F51 1px;
}

.item > .details > .provider > .header > .name {
  font-weight: bolder;
}

.item > .details > .provider > .header > .name > .languages {
  text-transform: uppercase;
  font-size: .5rem;
  vertical-align: middle;
}

.item > .details > .provider > .torrents {
  padding: .25rem;
}

.item > .details > .provider > .torrents > .torrent {
  display: flex;
  gap: .25rem;
  font-weight: lighter;
  padding: .25rem;
}

.item > .details > .provider > .torrents > .torrent:nth-child(2n) {
  background-color: rgba(255, 255, 255, .5);
}

.item > .details > .provider > .torrents > .torrent > .name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.item > .details > .provider > .torrents > .torrent > .size {
  white-space: nowrap;
}

/*
  modal
*/

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, .5);
  overflow: scroll;
  padding: 2rem 0;
}

.modal > .close,
.modal > .modal-content {
  margin: 1rem auto;
  max-width: 600px;
}

.modal > .close {
  text-align: right;
}

.modal > .close > button {
  font-size: 2rem;
  color: white;
  background: none;
  border: none;
  cursor: pointer;
}

.modal > .modal-content {
  margin: 1rem auto;
  padding: 1rem;
  background-color: white;
  border-radius: .25rem;
  box-shadow: 0px 0px 10px -2px rgba(0, 0, 0, .5);
}

.modal > .modal-content > h1,
.modal > .modal-content > h2 {
  padding: 0;
}

.modal > .modal-content > h1 {
  margin: 1.5rem 0;
  font-size: 1rem;
  font-weight: bolder;
  text-transform: uppercase;
  text-align: center;
}

.modal > .modal-content > h2 {
  margin: 1rem 0;
  font-size: .75rem;
}

.modal > .modal-content > ul > li {
  font-family: monospace;
}

.modal > .modal-content > .download {
  margin: 2rem 0;
  text-align: center;
}

.modal > .modal-content > .download > a {
  display: inline-block;
  padding: 1rem 1.5rem;
  color: white;
  background-color: #3B3B98;
  font-weight: bolder;
  text-transform: uppercase;
  border-radius: .25rem;
  letter-spacing: .25rem;
}
