@import '@/styles/responsive.scss';

.uploadImager {
  // box-shadow: 0px 6px 20px 0px rgba(0, 0, 0, 0.1);
  // border: 2px dashed rgba(56, 124, 68, 0.2);
  // height: 108px;
  border-radius: 10px;
  // background: rgba(56, 124, 68, 0.1);
  width: 100%;

  .dropZone {
    transition: all 0.3s ease;
    margin-bottom: 1rem;
    border: 2px dashed rgba(56, 124, 68, 0.2);
    border-radius: 8px;
    background: #f8f8f8;
    padding: 2rem;
    text-align: center;

    &:hover {
      border-color: #30713a;
      background: rgba(48, 113, 58, 0.05);
    }

    input {
      display: none;
    }

    .uploadLabel {
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 0.5rem;
      cursor: pointer;
      color: #666;

      svg {
        color: #30713a;
      }

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

  p {
    @include small-screen {
      text-align: center;
    }
  }
}

.fileList {
  display: flex;
  flex-direction: column;
  gap: 1rem;

  .fileItem {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    padding: 1rem;

    .fileInfo {
      display: flex;
      position: relative;
      align-items: center;
      gap: 0.75rem;
      margin-bottom: 0.75rem;

      .fileDetails {
        position: relative;
        flex: 1;
        min-width: 0; // Important for text overflow to work

        .fileName {
          display: block;
          overflow: hidden;
          color: #333;
          font-size: 14px;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .fileSize {
          display: block;
          margin-top: 2px;
          color: #666;
          font-size: 12px;
        }
      }

      svg {
        &.imageIcon {
          color: #2196f3; // Blue for images
        }

        &.pdfIcon {
          color: #f44336; // Red for PDFs
        }

        &.wordIcon {
          color: #2b579a; // Word blue
        }

        &.excelIcon {
          color: #217346; // Excel green
        }
      }

      .removeBtn {
        display: flex;
        position: absolute;
        right: 10px;
        justify-content: center;
        align-items: center;
        transition: all 0.2s ease;
        cursor: pointer;
        border: none;
        border-radius: 4px;
        background: none;
        padding: 4px;
        color: #666;

        &:hover {
          background: rgba(0, 0, 0, 0.05);
          color: #dc3545;
        }
      }
    }

    .progressWrapper {
      position: relative;
      border-radius: 2px;
      background: #eee;
      height: 4px;
      overflow: hidden;

      .progressBar {
        position: absolute;
        top: 0;
        left: 0;
        transition: width 0.3s ease;
        background: #30713a;
        height: 100%;
      }

      .progressText {
        position: absolute;
        top: -20px;
        right: 0;
        color: #666;
        font-size: 12px;
      }
    }
  }
}
