@outer-padding: 0.7em;
@entity-icon-size: 1.2em;
@border-radius: 6px;
@black: #262626;
@boxes-background-color: #f7f7f7;

#metadata-viewer {
  padding: 0.25em;

  // In smaller screen sizes, wrap content on two lines
  display: block;
  > * {
    width: auto;
    margin: 0;
    max-width: 100%;
  }

  .no-listen {
    height: 100%;
    font-size: 1.2em;
    padding: 2em;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    .pause-icon {
      margin-top: -2.1em;
      background-color: white;
      display: block;
      width: max-content;
      margin-left: auto;
      margin-right: auto;
    }
  }

  @media (min-width: @screen-xs) {
    // In bigger screen sizes, use flexbox
    display: flex;
    flex-wrap: wrap;

    div.left-side {
      margin-right: @outer-padding;
      resize: horizontal;
      overflow: auto;
      min-width: 340px;
      max-width: 50%;
      margin-bottom: 0;
    }
    .right-side {
      flex: 1;
    }
  }

  .left-side {
    resize: none;
    padding: @outer-padding;
    background-color: fadein(@black, 30%);
    transition: background-color 0.3s;
    border-radius: @border-radius;
    margin-bottom: @outer-padding;

    display: flex;
    flex-direction: column;
    justify-content: space-between;
    .track-info a,
    .bottom > a {
      color: inherit;
      &:visited {
        color: inherit;
      }
    }
    .album-art {
      height: 100%;
      display: flex;
      justify-content: space-around;
      max-height: calc(100vh - 130px);
      img {
        flex: 1;
        max-width: 100%;
        object-fit: cover;
        object-position: center;
      }
    }
    .track-info {
      display: flex;
      padding: @outer-padding 0;
      .track-name {
        font-size: 1.4em;
        line-height: 1em;
      }
      .artist-name {
        opacity: 0.85;
      }
      > *:first-child {
        flex: 3;
      }
    }
    .love-hate {
      display: flex;
      justify-content: space-between;
      font-size: 0.9em;
      align-items: start;
      .love {
        stroke: @love;
        color: transparent;
        stroke-width: 1.3em;
        &:hover,
        &.loved {
          stroke: transparent;
          color: @love;
        }
      }

      .hate {
        stroke: @hate;
        color: transparent;
        stroke-width: 1.3em;
        &:hover,
        &.hated {
          stroke: transparent;
          color: @hate;
        }
      }
    }
    .bottom {
      display: flex;
      align-items: center;
      padding-top: @outer-padding;
      .logo {
        height: 1.5em;
      }
      .support-artist-btn {
        margin-left: auto;
        .caret {
          margin-left: 1em;
        }
      }
    }
  }
  .right-side {
    display: flex;
    flex-direction: column;
    overflow: auto;
    margin-bottom: 0;

    .content-box {
      padding: 0.4em;
      border-radius: @border-radius;
      box-shadow: 0px 0px 4px rgba(0, 0, 0, 0.1) inset;
      background-color: @boxes-background-color;
      min-height: 2.8em; // adapt to add-tag component height
      align-items: center;

      &.white {
        background-color: white;
      }
      & + .content-box {
        margin-top: @outer-padding;
      }
    }

    > * {
      &.expanded {
        flex: 1;
        display: flex;
        flex-direction: column;
        .panel-heading .caret {
          transform: rotate(0deg);
        }
      }
      .panel-collapse {
        flex: 1;
      }
      .panel-body {
        padding: @outer-padding;
        display: flex;
        flex-direction: column;
        height: 100%;
        > *:last-child {
          align-self: center;
          margin-top: auto;
        }
        > *:not(:last-child) {
          margin-bottom: 0.7em;
        }
      }
      .panel-heading {
        background: inherit;
        cursor: pointer;
        .date {
          font-size: 0.7em;
          margin-left: auto;
        }
        .caret {
          transform: rotate(-90deg);
          transition: transform ease-out 0.35s;
          margin-left: @outer-padding;
        }
        .panel-title {
          .name {
            font-size: 1.3em;
          }
          > * {
            display: flex;
            align-items: center;
          }
        }
      }

      .credits-table {
        line-height: 2em;
        margin: 0;
        > tbody > tr:first-of-type > td {
          border-top: none;
        }
        tr td + td {
          text-align: right;
        }
      }
    }
  }
}

.btn-outline {
  background: white;
  border: 1px solid @blue;
  border-radius: @border-radius;
  &:hover,
  &:focus {
    color: @blue;
  }
}
.strong {
  font-weight: 600;
}
