/* Map page: items/show, items/show/_data, items/show/_action */

.item {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;

  .wrap-around {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 1rem;
  }

  .header {
    width: 100%;
    box-shadow: none;

    span {
      margin-right: 15px;

      i {
        margin-right: 10px;
        font-size: 20px;
      }
    }

    @media (max-width: 500px) {
      .wrap-around {
        font-size: 10px;

        span i {
          font-size: 14px;
        }
      }
    }
  }

  .body {
    display: flex;
    flex-wrap: wrap;
    min-width: 100%;
  }

  /* Download / request buttons */
  .actions {
    align-items: center;

    @media (max-width: 500px) {
      width: 100%;
    }

    .action {
      position: relative;
      display: flex;
      align-items: center;

      p {
        padding-right: 2em;
      }

      i {
        margin-left: auto;
        padding-left: 20px;
      }

      &.download:hover,
      &.cart:hover {
        color: green;
        transition: all 0.3s ease-out;
      }

      &.disabled {
        color: #9a9a9a;

        i {
          color: #b3b3b3;
        }

        &:hover {
          cursor: not-allowed;
        }
      }

      a.cover {
        position: absolute;
        inset: 0;
      }
    }
  }

  /* Metadata column */
  .meta-data {
    flex: 1 0 0;
    width: auto;
    min-width: auto;

    .data {
      display: flex;
      flex-direction: column;
      background-color: transparent;
    }

    .data-item {
      i {
        min-width: 20px;
        margin-right: 10px;
        font-size: 20px;
      }

      #pub-date-i {
        font-size: 25px;
      }
    }

    .subtitle {
      margin-top: -10px;
      padding-left: 5px;
      font-size: 14px;
    }

    .tile {
      padding: 5px;
      border-bottom: solid 1px var(--atlas-border);

      &.last {
        border: none;
      }
    }

    .publisher,
    .reeldata {
      margin-top: 50px;

      @media (max-width: 500px) {
        width: 100%;
        margin-top: 5px;
      }
    }

    .reeldata p {
      margin-bottom: 20px;
    }

    .data-bundle {
      @media (max-width: 500px) {
        display: flex;
        flex-wrap: wrap;
        justify-content: space-between;

        h6 {
          font-size: 14px;
        }

        p.subtitle {
          font-size: 10px;
        }

        .reeldata p {
          margin-bottom: 10px;
        }

        .data-item i {
          font-size: 14px;

          &#pub-date-i {
            font-size: 19px;
          }
        }
      }
    }
  }
}

.glyphicon-warning-sign.text-warning {
  color: var(--atlas-primary);
}

/* Map image with the magnifying lens (setupZoomLens in application.js) */
.preview img {
  position: relative;
  z-index: 50;
  display: block;
  max-width: 100%;
  max-height: 400px;
  margin-inline: auto;
}

.zoom-lens {
  position: absolute;
  z-index: 51; /* above the preview image */
  width: 200px;
  height: 200px;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  background-color: #fff;
  background-repeat: no-repeat;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  cursor: none;
}

/* Delete button for admins in the page header */
.item-show-delete-form {
  display: inline;
  float: right;
  margin-left: auto;
}

.item-show-delete {
  display: flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: none;
  color: rgba(0, 0, 0, 0.5);
  font-size: 14px;
  transition: 0.5s all;

  &:hover,
  &:focus {
    color: red;
  }

  @media (max-width: 500px) {
    font-size: 10px;
  }
}
