/*
exists because of https://github.com/digitalsparky/jekyll-minifier/issues/54
*/

cart-container {
  --overview-width: 500px;
  position: fixed;
  right: calc(-1 * var(--overview-width));
  inset-block: 0;
  width: var(--overview-width);
  background: white;
  z-index: 9999;
  transition: right .5s ease;
  display: flex;
  flex-direction: column;

  #article-template {
    display: none;
  }

  > * {
    padding: 1rem;
  }

  header {
    align-items: baseline;
    display: flex;
    justify-content: space-between;

    #close {
      background-color: transparent;
      border: none;
      svg {
        fill: #555;
        height: 20px;
      }
    }
  }

  main {
    flex: 1;
    overflow: auto;

    ul {
      list-style: none;
      padding: 0;
      
      li {
        padding: 1.5rem 1rem;

        &:not(:first-child) {
          border-top: 1px solid #ccc;
        }
      }

      article {
        display: grid;
        grid-template-columns: 70px 4fr 1fr;
        grid-template-rows: 70px 1fr;
        gap: 1rem;

        .info {
          grid-row: 1 / 3;
          grid-column: 2 / 4;
          display: flex;
          gap: 3ch;
          padding-inline: 0.5rem;
          justify-content: space-between;

          h3 {
            font-size: 22px;
          }

          p {
            hyphens: none;
            text-align: start;
          }

          span {
            font-weight: bold;
          }
        }

        .remove {
          background: none;
          border: none;
          font-size: 14px;
          grid-column: 3;
          grid-row: 2;

          &:hover, &:focus-visible {
            color: #fa7070;
          }
        }
      }
    }
  }

  footer {
    margin-top: auto;

     #proceed-checkout {
      background-color: #662d91;
      box-shadow: 0px 20px 30px 0px rgba(90, 70, 176, 0.3);
      border: 1px solid transparent;
      border-radius: 30px;
      color: white;
      cursor: pointer;
      display: inherit;
      padding: 10px 40px;
      text-align: center;
      width: 100%;

      &[disabled] {
        background-color: #662d9177;
        cursor: auto;
      }
     }
  }

}

cart-container[open] {
  right: 0;
}
