@import "../../../style/mixin.scss";

@include export-module('co-image-upload-layout') {
  .co-image-upload {
    .upload-container {
      border-radius: 10px;
      padding: 40px;
      text-align: center;
      cursor: pointer;
      position: relative;

      .image-upload-icon {
        width: 75px;
        height: 75px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
      }
    }

    .preview {
      margin-top: 20px;
    }

    .preview img {
      max-width: 300px;
      border-radius: 8px;
    }


    .uploaded-files-preview-container {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
      gap: 10px;
      margin-top: 10px;
      .uploaded-file-preview {
        position: relative;
        img {
          width: 100%;
          height: 100%;
          object-fit: cover;
          border-radius: 10px;
        }
        .uploaded-file-overlay {
          position: absolute;
          top: 0;
          left: 0;
          right: 0;
          bottom: 0;
          border-radius: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 14px;
          text-align: center;
          width: 100%;
          visibility: hidden;

          .remove-button {
            position: absolute;
            top: 5px;
            right: 5px;
            cursor: pointer;
          }
        }

        &:hover .uploaded-file-overlay {
          visibility: visible;
        }
      }
    }
  }

  .image-upload-compact {
    .upload-container {
      padding: 20px;

      .image-upload-icon {
        visibility: hidden;
        width: 0;
        height: 0;
        overflow: hidden;
      }
    }
  }




}
