// _cart.scss
.cart-container {
  padding: 2rem;
  display: flex;
  gap: 2rem;

  .poster-grid {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    padding-right: 1rem;

    .poster-card {
      position: relative;
      aspect-ratio: 2/3;
      border-radius: 8px;
      overflow: hidden;

      &:hover .delete-overlay {
        opacity: 1;
      }

      .poster-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .delete-overlay {
        position: absolute;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.7);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.2s ease;

        .delete-button {
          background-color: #e74c3c;
          border: none;
          color: white;
          padding: 0.5rem;
          border-radius: 50%;
          cursor: pointer;
          transition: transform 0.2s ease;

          &:hover {
            transform: scale(1.1);
          }
        }
      }
    }

    .empty-poster {
      width: 100%;
      height: 100%;
      background-color: #f5f6fa10;
      border: 2px #95a5a6;
      border-radius: 8px;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      color: #7f8c8d;

      svg {
        margin-bottom: 1rem;
        color: #95a5a6;
      }

      p {
        font-size: 0.875rem;
        text-align: center;
        padding: 0 1rem;
      }
    }
  }

  .action-panel {
    width: 300px;
    position: sticky;
    top: 2rem;
    background-color: #34495e;
    border-radius: 8px;
    padding: 1.5rem;
    height: fit-content;

    h2 {
      color: white;
      margin-bottom: 1.5rem;
      font-size: 1.25rem;
    }

    .format-select {
      width: 100%;
      margin-bottom: 1.5rem;
      padding: 0.5rem;
      background-color: #2c3e50;
      border: 1px solid #95a5a6;
      color: white;
      border-radius: 4px;
    }

    .download-button {
      width: 100%;
      padding: 0.75rem;
      background-color: #00a346;
      color: white;
      border: none;
      border-radius: 4px;
      margin-bottom: 1rem;
      cursor: pointer;
      transition: background-color 0.2s ease;

      &:hover {
        background-color: darken(#00a346, 10%);
      }

      &:disabled {
        background-color: darken(#00a346, 20%);
        cursor: not-allowed;
      }
    }
  }
}
