.custom-uploads-v2 {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  padding: 14px;

  .upload-header {
    margin-bottom: 20px;

    .upload-title {
      font-size: 14px;
      margin-bottom: 12px;
      padding-top: 5px;
      color: #1c2127;
    }

    .upload-constraints {
      .format-text, .size-text {
        font-size: 12px;
        font-weight: 500 !important;
        font-family: var(--font-family);
        color: #000;
        margin-bottom: 4px;
      }

      .quality-note {
        font-size: 12px;
        font-weight: 400 !important;
        color: #00000066;
      }
    }
  }

  .upload-section {
    margin-bottom: 16px;

    .file-input {
      display: none;
    }

    .upload-button {
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
      width: 100%;
      padding: 10px 16px;
      background-color: #FFFFFF;
      border: 0.5px solid #0000003D;
      border-radius: 4px;
      box-shadow: 0px 2px 6px 0px #0000000A;
      color: #000;
      font-size: 14px;
      font-weight: 400;
      cursor: pointer;
      transition: all 0.15s ease;

      &:hover{
        background-color: #f5f5f5;
      }

      &:focus:not(:disabled) {
        background-color: #ffffff;
        outline: none;
      }

      &:active:not(:disabled) {
        background-color: #f5f5f5;
      }

      &.uploading,
      &:disabled {
        cursor: not-allowed;
        opacity: 0.6;
        background-color: #f6f7f9;
      }

      svg {
        width: 16px;
        height: 16px;
        color: #5c7080;
        flex-shrink: 0;
      }

      .button-text {
        color: #1c2127;
        font-weight: 500;
      }
    }
  }

  .images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    overflow-y: auto;

    .loading-state, .empty-state {
      grid-column: 1 / -1;
      text-align: center;
      padding: 40px 20px;
      color: #6a737d;
      font-size: 14px;
    }

    .image-item {
      position: relative;

      .image-wrapper {
        position: relative;
        border-radius: 6px;
        overflow: hidden;
        cursor: pointer;
        transition: transform 0.2s ease;
        background: #f6f8fa;
        border: 1px solid #e1e4e8;

        &:hover {
          transform: translateY(-2px);
          box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);

          .image-menu {
            opacity: 1;
          }
        }

        .image-preview {
          width: 100%;
          height: 120px;
          object-fit: cover;
          display: block;
        }

        .image-menu {
          position: absolute;
          top: 8px;
          right: 8px;
          opacity: 0;
          transition: opacity 0.2s ease;
          cursor: pointer;
          z-index: 2;

          .menu-dots {
            display: flex;
            flex-direction: row;
            align-items: center;
            gap: 2px;
            padding: 4px;
            background: #fff;
            border-radius: 4px;
            backdrop-filter: blur(4px);
            width: 16px;
            height: 16px;
            border-radius: 4px;

            span {
              width: 1.6px;
              height: 1.6px;
              background: #28303F;
              border-radius: 50%;
            }
          }

          &:hover .menu-dots {
            background: #fff;
          }
        }
      }

      .dropdown-menu {
        position: absolute;
        top: 32px;
        right: 0px;
        background: white;
        border: 1px solid #e1e4e8;
        border-radius: 4px;
        box-shadow: 2px 8px 24px 0px #00000029;
        z-index: 1000;
        min-width: 120px;
        overflow: hidden;
        padding: 12px 8px;
        display: flex;
        flex-direction: column;
        gap: 8px;

        .dropdown-item {
          display: flex;
          align-items: center;
          gap: 8px;
          width: 100%;
          border: none;
          background: none;
          font-size: 12px;
          font-family: var(--font-family);
          font-weight: 300 !important;
          color: #000000;
          cursor: pointer;
          transition: background-color 0.15s ease;
          text-align: left;
          height: 22px;
          border-radius: 4px;

          &:hover {
            background-color: #f6f8fa;
          }

          &:focus {
            background-color: #f6f8fa;
            outline: none;
          }

          &:disabled {
            opacity: 0.5;
            cursor: not-allowed;

            &:hover {
              background-color: transparent;
            }
          }

          .item-icon {
            width: 14px;
            height: 14px;
            flex-shrink: 0;
          }
        }
      }
    }
  }
}

// Media queries for responsiveness
@media (max-width: 768px) {
  .custom-uploads-v2 {
    .images-grid {
      grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
      gap: 8px;

      .image-item .image-wrapper .image-preview {
        height: 100px;
      }
    }

    .upload-section .upload-area {
      padding: 16px;
      min-height: 100px;

      .upload-icon svg {
        width: 32px;
        height: 32px;
      }

      .upload-text {
        font-size: 14px;
      }
    }
  }
}

@media (max-width: 480px) {
  .custom-uploads-v2 {
    .images-grid {
      grid-template-columns: repeat(2, 1fr);
    }
  }
}
